Repository navigation
1.0.11
dc-agent 1.0.11
This release delivers the backend side of Commands management for the dc-operator console — list, details, and fully-typed create/edit over the control plane with write-only API keys — plus periodic agent-config backups on the operator, a mirror mode for zip-dirs, a local verification harness, and a git pull fix for non-SSH remotes. The bundled operator UI is updated to dc-agent-react v1.2.0.
Commands over the control plane
- New
command/listendpoint on the agent's control plane, with a matching operator API. Commands are discovered by scanningCONFIG_DIRfor*.json/*.ymlconfig files (the docker commanddc-docker.*is excluded); the name comes from the file name, and the type is taken from an explicittypefield or inferred from the present fields. - Command details now return all configuration parameters, with API keys masked to stable ids.
- Create and edit are fully typed: one request DTO per command type (
WAR,JAR,NODE,SAVE_ARTIFACT,ZIP_ARCHIVE,ZIP_DIRS,FETCH_URL,DOCKER), serialized from the finished config model — no hand-built JSON. API keys are write-only: the client sends masked ids to keep plus new secrets to add, and the agent merges them against the on-disk map. A server-sideCommandValidatormirrors the UI validation rules. - Together these power the new Commands screens in the React console.
Agent config backups
- The operator now periodically backs up every agent's config files over the control plane, archiving them locally — one subdirectory per agent, each backup a
<agent>-yyyy-MM-dd-HH-mm-ss.zip. Unchanged snapshots are skipped via a stable content hash, only the last N archives are kept, and each run is logged to.last.txt. - New operator startup parameters:
DC_AGENT_BACKUP_INTERVAL(ISO-8601 duration, defaultPT1H),DC_AGENT_BACKUP_DIR, andDC_AGENT_BACKUP_KEEP(default5).
zip-dirs: mirror mode
- New
deleteoption (defaultfalse). Withdelete: true, the target directory exactly mirrors the uploaded archive: after extraction, every file under the resolved target dir that is not in the ZIP is removed, along with directories left empty. This is destructive by design — it applies to the whole resolved target dir — and is documented with an explicit caution in the docs.
Fixes
- git pull no longer throws
ClassCastExceptionon non-SSH remotes. The publickey session factory is now applied only toSshTransport, sofile://andhttp(s)config-repo remotes work as expected.
Operator
- New
/infoendpoint reporting the operator's build version from the jar manifest (Implementation-Version, set by theoperator-shadedprofile; falls back todevwhen running unshaded). This powers the new version footer in the console. - Bundled UI pin bumped to dc-agent-react v1.2.0 (SHA-256 verified): Commands screens, renamed navigation (Applications / Agents / Services / Commands), reworked error handling, and the frontend/backend version footer.
Developer experience
- New
verify/harness for a repeatable local run of the whole system — dc-agent, dc-operator, and the React UI wired together with test config — to manually verify the UI before cutting a release. Two frontend modes:separate(Rsbuild dev server on :3000 proxying the API) andbundled(UI baked into the operator jar, mirroring a real release). - New
frontend-localMaven profile builds the operator with a locally builtdc-agent-reactdist instead of downloading the pinned GitHub release:./mvnw -pl dc-agent-operator -am -Pfrontend-local,operator-shaded package.
Documentation
- Documented the
/app-statusendpoint: guarded by its own bearer token (APP_STATUS_TOKEN, separate from the control-plane token), response fields (appInstanceName,appVersion,uptimeMs, …), and thematch-all/host/{h}/instance/{i}/port/{p}variant that returns412on mismatch — handy as a load-balancer or deploy sanity check. - Documented the operator's
agent/listendpoint that powers the dc-agent list screen, and updated the architecture page with the per-host token channels.
Full changelog: 1.0.10...1.0.11