fix: resolve live config paths in status and gateway metadata (#39952)

* fix: resolve live config paths in status and gateway metadata

* fix: resolve remaining runtime config path references

* test: cover gateway config.set config path response
This commit is contained in:
Tak Hoffman
2026-03-08 09:59:32 -05:00
committed by GitHub
parent da3cccb212
commit d9e8e8ac15
8 changed files with 73 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";
import { listChannelPlugins } from "../../channels/plugins/index.js";
import {
CONFIG_PATH,
createConfigIO,
loadConfig,
parseConfigJson5,
readConfigFileSnapshot,
@@ -197,6 +197,7 @@ function buildConfigRestartSentinelPayload(params: {
threadId: ReturnType<typeof extractDeliveryInfo>["threadId"];
note: string | undefined;
}): RestartSentinelPayload {
const configPath = createConfigIO().configPath;
return {
kind: params.kind,
status: "ok",
@@ -208,7 +209,7 @@ function buildConfigRestartSentinelPayload(params: {
doctorHint: formatDoctorNonInteractiveHint(),
stats: {
mode: params.mode,
root: CONFIG_PATH,
root: configPath,
},
};
}
@@ -323,7 +324,7 @@ export const configHandlers: GatewayRequestHandlers = {
true,
{
ok: true,
path: CONFIG_PATH,
path: createConfigIO().configPath,
config: redactConfigObject(parsed.config, parsed.schema.uiHints),
},
undefined,
@@ -440,7 +441,7 @@ export const configHandlers: GatewayRequestHandlers = {
true,
{
ok: true,
path: CONFIG_PATH,
path: createConfigIO().configPath,
config: redactConfigObject(validated.config, schemaPatch.uiHints),
restart,
sentinel: {
@@ -500,7 +501,7 @@ export const configHandlers: GatewayRequestHandlers = {
true,
{
ok: true,
path: CONFIG_PATH,
path: createConfigIO().configPath,
config: redactConfigObject(parsed.config, parsed.schema.uiHints),
restart,
sentinel: {