As an agent user, I want to tell the app which agent server to use, so that I see and talk to the agents that live on my own server.
Situation
My agents run on a server other than the default one, or I am moving to a new one. I know its web address. I am in the Agents tab or looking at my settings in Me.
What I do
In the Agents tab, tap the row that shows the server address. Or in Me, under "Connections", tap "Agent server".
Replace the address in the field with my server's address.
Tap "Save".
Watch the Agents list connect to the new server.
What I should see
The Agent server sheet rises with "Cancel" on the left, the title "Agent server" and "Save" on the right.
A section "Server URL" holds one field, already filled with the server I use now. When it is empty its hint reads "https://".
Under the field: "Your agent server runs conversations and stores their history."
"Save" is dimmed while the field is empty.
After a good save the sheet closes and I am back where I opened it: the Agents list, or Me.
The Agents list shows the new address, says "Connecting…" and then "Online", and lists the agents my identity has on that server.
In Me, the "Agent server" row shows the server's name without https://, for example "agentic.seed.hyper.media".
A trailing slash, a query or a trailing /agents typed at the end of the address is tidied away when it is saved.
"Cancel" closes the sheet and keeps the old server.
The server I chose is still set after I quit and reopen the app.
When something goes wrong
If I type something that is not a web address, the sheet stays open, my text is kept, and a red line reads "Use an http:// or https:// server URL." I correct the text and tap "Save" again. The server in use has not changed.
If the address contains a user name or password, the red line reads "Use an http:// or https:// server URL without credentials."
If the address is well formed but no agent server answers there, it is saved, and the Agents list then shows "Offline" with the reason and "Retry". I open the sheet again to fix it.
Not included
The app does not check that the server answers before saving the address.
There is one agent server at a time. There are no presets and no list of servers I used before, unlike the reading server in Server.
Changing the agent server does not change the server I read documents from.
Trace
Story US-AGENT-02, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
The sheet: one field, Cancel and Save, error under the field | |
The server row that opens the sheet and shows the result | |
The Agent server row under Connections, the second door to the sheet | |
The server rows in Me, including the agent server row | |
Why the sheet opens over Me and closes back to it | |
Why this is a sheet | |
Cancel leading, Save trailing | |
Draft held until Save, error kept with the input | |
This form among all forms | |
The status line that reports the new server | |
A bad address is neither accepted nor thrown away | |
The footer and error wording |
Implementation
Page | Part it plays |
|---|---|
normalizeAgentServerUrl and the two endpoint layouts | |
AgentServerScreen | |
agentsNormalizeServer and the reconnect to the new server | |
Package overview and default server | |
What an agent server is and its endpoints | |
agentServer (persisted), agentsServerDraft, agentsSetting, agentsServerForm | |
The agent-server route, reachable from two tabs | |
The owner stamp that drops replies from the previous server | |
The Me row that links to the sheet | |
Network grants for arbitrary http and https servers | |
The UI tests of the sheet | |
Unit tests of URL normalization | |
The mock server address the tests keep |
Code
File | What |
|---|---|
AgentServerScreen | |
The server row on the Agents list | |
The Agent server row in Me | |
agent-server route | |
state agentServer, persisted, default https://agentic.seed.hyper.media | |
agentsSetting mutation and agentsServerForm task | |
agentsInitServer, agentsEditServer, agentsSaveServer, agentsAfterSetting | |
AgentServerScreen wiring | |
agentsNormalizeServer | |
normalizeAgentServerUrl | |
agentEndpoint |
Tests
File | What it checks |
|---|---|
agent server validates the URL before saving | |
polish: Me lists the agent server and its row opens the agent server settings | |
agents protocol: normalizes user URLs and resolves both endpoint layouts |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime