Merge pull request #1194 from pikasTech/fix/1190-code-agent-stdio-supervisor
fix: project code agent stdio supervisor
This commit is contained in:
@@ -703,6 +703,7 @@ lanes:
|
|||||||
repoUrlFrom: runtimeGitReadUrl
|
repoUrlFrom: runtimeGitReadUrl
|
||||||
providerIdFrom: runtimeNodeId
|
providerIdFrom: runtimeNodeId
|
||||||
defaultProviderProfile: fake-echo
|
defaultProviderProfile: fake-echo
|
||||||
|
codexStdioSupervisor: repo-owned
|
||||||
publicExposure:
|
publicExposure:
|
||||||
mode: pk01-caddy-frp
|
mode: pk01-caddy-frp
|
||||||
publicBaseUrl: https://hwlab.pikapython.com
|
publicBaseUrl: https://hwlab.pikapython.com
|
||||||
|
|||||||
@@ -324,6 +324,7 @@ export interface HwlabRuntimeCodeAgentRuntimeSpec {
|
|||||||
readonly repoUrlFrom: "runtimeGitReadUrl";
|
readonly repoUrlFrom: "runtimeGitReadUrl";
|
||||||
readonly providerIdFrom: "runtimeNodeId";
|
readonly providerIdFrom: "runtimeNodeId";
|
||||||
readonly defaultProviderProfile: string;
|
readonly defaultProviderProfile: string;
|
||||||
|
readonly codexStdioSupervisor: "repo-owned";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HwlabRuntimeSourceWorkspaceSpec {
|
export interface HwlabRuntimeSourceWorkspaceSpec {
|
||||||
@@ -784,6 +785,7 @@ function codeAgentRuntimeConfig(value: unknown, path: string): HwlabRuntimeCodeA
|
|||||||
repoUrlFrom: enumStringField(raw, "repoUrlFrom", path, ["runtimeGitReadUrl"]),
|
repoUrlFrom: enumStringField(raw, "repoUrlFrom", path, ["runtimeGitReadUrl"]),
|
||||||
providerIdFrom: enumStringField(raw, "providerIdFrom", path, ["runtimeNodeId"]),
|
providerIdFrom: enumStringField(raw, "providerIdFrom", path, ["runtimeNodeId"]),
|
||||||
defaultProviderProfile: stringField(raw, "defaultProviderProfile", path),
|
defaultProviderProfile: stringField(raw, "defaultProviderProfile", path),
|
||||||
|
codexStdioSupervisor: enumStringField(raw, "codexStdioSupervisor", path, ["repo-owned"]),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ export function nodeRuntimeExpected(spec: HwlabRuntimeLaneSpec): Record<string,
|
|||||||
providerIdFrom: spec.codeAgentRuntime.providerIdFrom,
|
providerIdFrom: spec.codeAgentRuntime.providerIdFrom,
|
||||||
providerId: spec.nodeId,
|
providerId: spec.nodeId,
|
||||||
defaultProviderProfile: spec.codeAgentRuntime.defaultProviderProfile,
|
defaultProviderProfile: spec.codeAgentRuntime.defaultProviderProfile,
|
||||||
|
codexStdioSupervisor: spec.codeAgentRuntime.codexStdioSupervisor,
|
||||||
valuesPrinted: false,
|
valuesPrinted: false,
|
||||||
},
|
},
|
||||||
sourceWorkspace: spec.sourceWorkspace === undefined ? null : {
|
sourceWorkspace: spec.sourceWorkspace === undefined ? null : {
|
||||||
|
|||||||
@@ -1569,6 +1569,7 @@ export function nodeRuntimePipelinePostprocessScript(): string[] {
|
|||||||
" codeAgentRuntimeChanged = setEnvValue(container, 'HWLAB_CODE_AGENT_AGENTRUN_REPO_URL', String(codeAgentRuntime.repoUrl)) || codeAgentRuntimeChanged;",
|
" codeAgentRuntimeChanged = setEnvValue(container, 'HWLAB_CODE_AGENT_AGENTRUN_REPO_URL', String(codeAgentRuntime.repoUrl)) || codeAgentRuntimeChanged;",
|
||||||
" codeAgentRuntimeChanged = setEnvValue(container, 'HWLAB_CODE_AGENT_AGENTRUN_PROVIDER_ID', String(codeAgentRuntime.providerId)) || codeAgentRuntimeChanged;",
|
" codeAgentRuntimeChanged = setEnvValue(container, 'HWLAB_CODE_AGENT_AGENTRUN_PROVIDER_ID', String(codeAgentRuntime.providerId)) || codeAgentRuntimeChanged;",
|
||||||
" codeAgentRuntimeChanged = setEnvValue(container, 'HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE', String(codeAgentRuntime.defaultProviderProfile)) || codeAgentRuntimeChanged;",
|
" codeAgentRuntimeChanged = setEnvValue(container, 'HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE', String(codeAgentRuntime.defaultProviderProfile)) || codeAgentRuntimeChanged;",
|
||||||
|
" codeAgentRuntimeChanged = setEnvValue(container, 'HWLAB_CODE_AGENT_CODEX_STDIO_SUPERVISOR', String(codeAgentRuntime.codexStdioSupervisor)) || codeAgentRuntimeChanged;",
|
||||||
" }",
|
" }",
|
||||||
" }",
|
" }",
|
||||||
" }",
|
" }",
|
||||||
@@ -1893,6 +1894,7 @@ export function nodeRuntimePipelinePostprocessScript(): string[] {
|
|||||||
" checkCodeAgentRuntimeValue(item, file, container, 'HWLAB_CODE_AGENT_AGENTRUN_REPO_URL', String(codeAgentRuntime.repoUrl));",
|
" checkCodeAgentRuntimeValue(item, file, container, 'HWLAB_CODE_AGENT_AGENTRUN_REPO_URL', String(codeAgentRuntime.repoUrl));",
|
||||||
" checkCodeAgentRuntimeValue(item, file, container, 'HWLAB_CODE_AGENT_AGENTRUN_PROVIDER_ID', String(codeAgentRuntime.providerId));",
|
" checkCodeAgentRuntimeValue(item, file, container, 'HWLAB_CODE_AGENT_AGENTRUN_PROVIDER_ID', String(codeAgentRuntime.providerId));",
|
||||||
" checkCodeAgentRuntimeValue(item, file, container, 'HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE', String(codeAgentRuntime.defaultProviderProfile));",
|
" checkCodeAgentRuntimeValue(item, file, container, 'HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE', String(codeAgentRuntime.defaultProviderProfile));",
|
||||||
|
" checkCodeAgentRuntimeValue(item, file, container, 'HWLAB_CODE_AGENT_CODEX_STDIO_SUPERVISOR', String(codeAgentRuntime.codexStdioSupervisor));",
|
||||||
" }",
|
" }",
|
||||||
" }",
|
" }",
|
||||||
" if (Array.isArray(podSpec.volumes) && podSpec.volumes.some((volume) => volume && volume.name === 'hwlab-metrics-sidecar')) metricsRefs.push(workloadRef(item, file, { name: 'volume/hwlab-metrics-sidecar' }));",
|
" if (Array.isArray(podSpec.volumes) && podSpec.volumes.some((volume) => volume && volume.name === 'hwlab-metrics-sidecar')) metricsRefs.push(workloadRef(item, file, { name: 'volume/hwlab-metrics-sidecar' }));",
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ export function nodeRuntimeRenderOverlay(spec: HwlabRuntimeLaneSpec): Record<str
|
|||||||
providerIdFrom: spec.codeAgentRuntime.providerIdFrom,
|
providerIdFrom: spec.codeAgentRuntime.providerIdFrom,
|
||||||
providerId: spec.nodeId,
|
providerId: spec.nodeId,
|
||||||
defaultProviderProfile: spec.codeAgentRuntime.defaultProviderProfile,
|
defaultProviderProfile: spec.codeAgentRuntime.defaultProviderProfile,
|
||||||
|
codexStdioSupervisor: spec.codeAgentRuntime.codexStdioSupervisor,
|
||||||
valuesPrinted: false,
|
valuesPrinted: false,
|
||||||
},
|
},
|
||||||
runtimeImageRewrites: spec.runtimeImageRewrites,
|
runtimeImageRewrites: spec.runtimeImageRewrites,
|
||||||
@@ -1439,6 +1440,7 @@ function nodeRuntimeCodeAgentCloudApiEnvStatus(spec: HwlabRuntimeLaneSpec, runti
|
|||||||
expectValue("HWLAB_CODE_AGENT_AGENTRUN_REPO_URL", spec.gitReadUrl);
|
expectValue("HWLAB_CODE_AGENT_AGENTRUN_REPO_URL", spec.gitReadUrl);
|
||||||
expectValue("HWLAB_CODE_AGENT_AGENTRUN_PROVIDER_ID", spec.nodeId);
|
expectValue("HWLAB_CODE_AGENT_AGENTRUN_PROVIDER_ID", spec.nodeId);
|
||||||
expectValue("HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE", runtime.defaultProviderProfile);
|
expectValue("HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE", runtime.defaultProviderProfile);
|
||||||
|
expectValue("HWLAB_CODE_AGENT_CODEX_STDIO_SUPERVISOR", runtime.codexStdioSupervisor);
|
||||||
return {
|
return {
|
||||||
ready: mismatches.length === 0,
|
ready: mismatches.length === 0,
|
||||||
deploymentExists: true,
|
deploymentExists: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user