Skip to content

v0.8.10

Choose a tag to compare

@github-actions github-actions released this 25 Sep 12:39
· 76 commits to main since this release

Patch release that stops a settings save from losing configuration. A save from the web interface rebuilt every agent from the form alone, so it dropped every agent's environment variables and shell script, and "Restart the agents" did so even when nothing was edited, restarting the agents without their environment; on both front ends a save reformatted agents it had not changed, and the security tab dropped settings it did not show. A save now writes only what was edited, and a save that changes nothing leaves the file as it was.

Fixed

  • A save from the web interface lost every agent's environment variables and shell script, and has since relayer serve was introduced in v0.5.0. The gateway rebuilt each agent from the form alone, and the form carries neither: every save of the Agents tab wrote each agent back without its env, API keys included, and turned a shell: agent into command: [<id>], a program named after the agent. It also wrote the catalogue's adapter over a blank adapter. "Restart the agents" sends the agents even when nothing was edited, so a plain restart did the same, and the agents came back without their environment. The gateway now shows and saves agents through the desktop's resolver, now shared (internal/agentprofile), as docs/configuration.md always said it did:

    • an agent with environment variables, a shell script or an adapter the form does not know is read-only in the editor, and every save copies it exactly as the file has it. A save that leaves it out, or sends its ID as a new agent or with a command, is refused and writes nothing;
    • an existing agent keeps its command and adapter; the form changes its name, working directory and backend, and replaces its command only as a whole;
    • an agent removed and added again under the same ID is a new agent and inherits nothing from the one it replaces, its environment included;
    • the interface sends preserve, which the gateway read as preserveOnSave and so never saw;
    • a configuration written by hand often could not be saved from the web interface at all: the gateway named no catalogue entry for a custom command or a shell agent and showed a blank adapter as blank, which the form refuses, so Save and Restart stayed disabled. Every profile now names a catalogue entry and the adapter the agent runs with.

    TestAWebRestartKeepsEachAgentsEnvironment, TestAWebSaveKeepsEveryAgentItDidNotChange, TestAWebSaveCannotDropOrReplaceAReadOnlyAgent and TestTheWebProfileViewShowsNothingItCannotRoundTrip fail against v0.8.9. A file edited while the editor is open is refused as stale on both front ends, so a save can neither drop an environment variable added in the YAML nor bring back one removed there (TestAnEnvironmentEditedWhileTheWebEditorWasOpenIsNeitherLostNorRevived and its desktop counterpart). Found by the v0.8.9 acceptance pass; v0.8.8 did the same.

  • Saving the agents rewrote every agent in the file, on the desktop and the web gateway alike, since the agent editor was introduced in v0.1.0-alpha: a desktop save that changed one agent, and on the gateway every save of the Agents tab and every "Restart the agents", rebuilt every entry. Every agent lost its comments, flow sequences became block lists, a shell script's quoting changed, and every agent that inherited the file's backend was pinned to it with backend: pty, so a later change of the file's backend no longer reached it. A relative cwd came back as an absolute path naming the user's home directory for an agent added again under a new ID. An agent a save did not change now keeps its entry as written, its values, comments, flow sequences and quoting; a changed agent keeps every field it did not change where it was, and a changed field keeps its comment (TestAReplacedCommandKeepsItsComment); a new agent in a directory another entry already names gets that entry's relative text; the file keeps its Windows line endings and byte-order mark, where a rename in a CRLF file changed every line (TestASaveKeepsTheFilesLineEndingsAndByteOrderMark); and a save that changes nothing writes nothing: the revision stays, and no open editor has to reload. A save that writes still re-encodes the whole file, so blank lines between entries, folded and multi-line plain scalars, escape sequences, the spacing before a comment and the %YAML and --- markers are normalized wherever they are; docs/configuration.md lists them. Every value loads back the same. Both front ends also issued a new revision token after every save, written or not, so after one tab saved without a change, or restarted the agents, another tab's next save was refused as stale and the interface replaced that tab's unsaved edits with the file; a token is now issued only when a save writes the file. The writer also refuses to publish a file that would not load back as the agents requested. TestSavingOneAgentLeavesTheOthersAsWritten, TestRenamingOneAgentOnTheDesktopLeavesEverythingElseAsWritten, TestAWebRenameLeavesEverythingElseAsWritten, TestAWebRestartWithNothingEditedWritesNothing, TestASaveThatChangesNothingLeavesEveryOpenEditorCurrent and TestADesktopSaveThatChangesNothingLeavesTheRevisionAsItWas fail against v0.8.9.

  • A security save rewrote the whole policies block, on the desktop and the web gateway alike, since the settings editor was introduced in v0.3.0: the block was rebuilt from the effective policy, which drops what that rebuild does not write. A save that only toggled dry-run, or changed nothing, removed profile: custom and every guardrail set to false, and lost the block's comments and flow lists; since v0.8.6, which resolves a relative workspace_root when loading, it also wrote workspace_root: ./workspace back as an absolute path naming the user's home directory. The block is now edited: a field whose value the file already gives keeps its text, a changed field is written where it is, a profile the file names stays as the base of the fields it does not set, and a save that changes nothing writes nothing. An absolute or rooted workspace_root keeps its text too: the loader now cleans it as the save does, so a save no longer rewrites /srv/ws as \srv\ws on Windows, which Linux does not read as that directory, so that with a configuration shared with Linux every path an agent named there was outside the workspace, or drops a trailing separator (TestASecuritySaveKeepsAnAbsoluteWorkspaceRootAsWritten). Turning the workspace guardrail on in a file that names no root writes only the guardrail: the save also wrote the root the guardrail defaults to, the configuration's directory, as an absolute workspace_root, which then no longer followed the file when it moved (TestTurningTheWorkspaceGuardrailOnWritesOnlyTheGuardrail). When the editor switches to a preset and the file names a profile, the file names that preset, also when a field was adjusted after the preset was chosen: the writer recognized only a preset the policy matched exactly, so choosing strict and then setting the rate limit dropped the profile line and its comments and wrote every field of strict out (TestAPresetChosenThenAdjustedIsNamedWhereTheFileNamesAProfile, TestAWebPresetChosenThenAdjustedIsNamedInTheFile, TestADesktopPresetChosenThenAdjustedIsNamedInTheFile). The writer refuses to publish a file whose policy would not load back as requested. TestASecuritySaveChangesOnlyWhatItChanged, TestAWebSecuritySaveKeepsThePolicyAsWritten and TestADesktopSecuritySaveKeepsThePolicyAsWritten fail against v0.8.9. Found by the v0.8.9 acceptance pass; v0.8.8 did the same.

  • Turning the workspace guardrail on from the web interface guarded a directory that does not exist when relayer serve was given a relative --config, since v0.8.6. With the root field left empty, the root is the configuration's directory; the gateway passes that directory as its command line gave it, cfg, and the save resolved it against itself, writing workspace_root: <cwd>\cfg\cfg, so every path an agent named was outside the workspace. The default root is now resolved once, against the configuration's directory. The desktop passes an absolute directory and was not affected. TestAWebGuardrailOnARelativelyAddressedConfigurationGuardsItsDirectory and TestTheDefaultWorkspaceRootOfARelativelyAddressedConfigurationIsItsDirectory fail against v0.8.9.

Changed

  • The web gateway no longer sends an agent's existing command line to operators, as the desktop never has: an argument can be a credential, and every operator token received it. The Agents tab shows each agent's executable label and argument count, and Replace the command starts a new argv from the catalogue's default. A client that saves agents through the gateway's API must send an existing agent back with preserve and no argv, and a new one with its catalogue presetID and an adapter that profile supports, as the interface does. A read-only agent sent back with preserve keeps the file's name, working directory and backend; any sent with it are ignored.

Full commit list: v0.8.9...v0.8.10