Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(runtime): display multica CLI version instead of agent CLI version (#332)
LinYushen682dc20ba90b
diff --git a/apps/web/features/runtimes/components/runtime-detail.tsx b/apps/web/features/runtimes/components/runtime-detail.tsxindex 3e124ff350..286a367094 100644--- a/apps/web/features/runtimes/components/runtime-detail.tsx+++ b/apps/web/features/runtimes/components/runtime-detail.tsx@@ -6,8 +6,12 @@ import { UpdateSection } from "./update-section";import { UsageSection } from "./usage-section";function getCliVersion(metadata: Record<string, unknown>): string | null {- if (metadata && typeof metadata.version === "string" && metadata.version) {- return metadata.version;+ if (+ metadata &&+ typeof metadata.cli_version === "string" &&+ metadata.cli_version+ ) {+ return metadata.cli_version;}return null;}diff --git a/server/cmd/multica/cmd_daemon.go b/server/cmd/multica/cmd_daemon.goindex f7bd496569..bd2bda1846 100644--- a/server/cmd/multica/cmd_daemon.go+++ b/server/cmd/multica/cmd_daemon.go@@ -263,6 +263,7 @@ func runDaemonForeground(cmd *cobra.Command) error {if err != nil {return err}+ cfg.CLIVersion = versionctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)defer stop()diff --git a/server/internal/daemon/config.go b/server/internal/daemon/config.goindex cd2bf7e77e..e8a033abf7 100644--- a/server/internal/daemon/config.go+++ b/server/internal/daemon/config.go@@ -28,6 +28,7 @@ type Config struct {DaemonID stringDeviceName stringRuntimeName string+ CLIVersion string // multica CLI version (e.g. "0.1.13")Profile string // profile name (empty = default)Agents map[string]AgentEntry // "claude" -> entry, "codex" -> entryWorkspacesRoot string // base path for execution envs (default: ~/multica_workspaces)diff --git a/server/internal/daemon/daemon.go b/server/internal/daemon/daemon.goindex cabbf60cc5..29621a3be1 100644--- a/server/internal/daemon/daemon.go+++ b/server/internal/daemon/daemon.go@@ -254,6 +254,7 @@ func (d *Daemon) registerRuntimesForWorkspace(ctx context.Context, workspaceID s"workspace_id": workspaceID,"daemon_id": d.cfg.DaemonID,"device_name": d.cfg.DeviceName,+ "cli_version": d.cfg.CLIVersion,"runtimes": runtimes,}diff --git a/server/internal/handler/daemon.go b/server/internal/handler/daemon.goindex 937ddf9aa3..bab4ce4d8e 100644--- a/server/internal/handler/daemon.go+++ b/server/internal/handler/daemon.go@@ -23,10 +23,11 @@ type DaemonRegisterRequest struct {WorkspaceID string `json:"workspace_id"`DaemonID string `json:"daemon_id"`DeviceName string `json:"device_name"`+ CLIVersion string `json:"cli_version"` // multica CLI versionRuntimes []struct {Name string `json:"name"`Type string `json:"type"`- Version string `json:"version"`+ Version string `json:"version"` // agent CLI version (claude/codex)Status string `json:"status"`} `json:"runtimes"`}@@ -90,7 +91,8 @@ func (h *Handler) DaemonRegister(w http.ResponseWriter, r *http.Request) {status = "offline"}metadata, _ := json.Marshal(map[string]any{- "version": runtime.Version,+ "version": runtime.Version,+ "cli_version": req.CLIVersion,})registered, err := h.Queries.UpsertAgentRuntime(r.Context(), db.UpsertAgentRuntimeParams{