@companyhelm/runner 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/commands/root.js
CHANGED
|
@@ -2006,18 +2006,18 @@ async function deleteThreadWithCleanup(cfg, request) {
|
|
|
2006
2006
|
}
|
|
2007
2007
|
return { kind: "deleted" };
|
|
2008
2008
|
}
|
|
2009
|
-
async function handleDeleteThreadRequest(cfg, commandChannel, request, logger) {
|
|
2009
|
+
async function handleDeleteThreadRequest(cfg, commandChannel, request, requestId, logger) {
|
|
2010
2010
|
const deleteResult = await deleteThreadWithCleanup(cfg, request);
|
|
2011
2011
|
if (deleteResult.kind === "not_found") {
|
|
2012
2012
|
logger.warn(`Delete requested for missing thread '${request.threadId}'. Treating as deleted.`);
|
|
2013
|
-
await sendThreadUpdate(commandChannel, request.threadId, protos_1.ThreadStatus.DELETED);
|
|
2013
|
+
await sendThreadUpdate(commandChannel, request.threadId, protos_1.ThreadStatus.DELETED, requestId);
|
|
2014
2014
|
return;
|
|
2015
2015
|
}
|
|
2016
2016
|
if (deleteResult.kind === "error") {
|
|
2017
|
-
await sendRequestError(commandChannel, deleteResult.message);
|
|
2017
|
+
await sendRequestError(commandChannel, deleteResult.message, requestId);
|
|
2018
2018
|
return;
|
|
2019
2019
|
}
|
|
2020
|
-
await sendThreadUpdate(commandChannel, request.threadId, protos_1.ThreadStatus.DELETED);
|
|
2020
|
+
await sendThreadUpdate(commandChannel, request.threadId, protos_1.ThreadStatus.DELETED, requestId);
|
|
2021
2021
|
}
|
|
2022
2022
|
async function reportNoRunningInterruptAsReady(cfg, commandChannel, request, threadState, logger, logMessage) {
|
|
2023
2023
|
try {
|
|
@@ -2421,7 +2421,7 @@ async function runCommandLoop(cfg, commandChannel, commandMessageSink, apiClient
|
|
|
2421
2421
|
await handleCreateThreadRequest(cfg, commandMessageSink, serverMessage.request.value, requestId, apiClient, apiCallOptions, logger);
|
|
2422
2422
|
break;
|
|
2423
2423
|
case "deleteThreadRequest":
|
|
2424
|
-
await handleDeleteThreadRequest(cfg, commandMessageSink, serverMessage.request.value, logger);
|
|
2424
|
+
await handleDeleteThreadRequest(cfg, commandMessageSink, serverMessage.request.value, requestId, logger);
|
|
2425
2425
|
break;
|
|
2426
2426
|
case "createUserMessageRequest":
|
|
2427
2427
|
void handleCreateUserMessageRequest(cfg, commandMessageSink, serverMessage.request.value, requestId, logger).catch((error) => {
|
|
@@ -216,6 +216,7 @@ class AppServerContainerService {
|
|
|
216
216
|
const hostInfo = (0, host_js_1.getHostInfo)(cfg.codex.codex_auth_path);
|
|
217
217
|
const containerHome = cfg.agent_home_directory;
|
|
218
218
|
const containerAuthPath = resolveContainerPath(cfg.codex.codex_auth_path, containerHome);
|
|
219
|
+
const hostAuthPath = (0, path_js_1.expandHome)(cfg.codex.codex_auth_path);
|
|
219
220
|
const hostDedicatedAuthPath = `${(0, path_js_1.expandHome)(cfg.config_directory)}/${cfg.codex.codex_auth_file_path}`;
|
|
220
221
|
const mountArgs = [];
|
|
221
222
|
if (codexAuthMode === "dedicated") {
|
|
@@ -224,6 +225,12 @@ class AppServerContainerService {
|
|
|
224
225
|
}
|
|
225
226
|
mountArgs.push("--mount", `type=bind,src=${hostDedicatedAuthPath},dst=${containerAuthPath}`);
|
|
226
227
|
}
|
|
228
|
+
else if (codexAuthMode === "host") {
|
|
229
|
+
if (!hostInfo.codexAuthExists) {
|
|
230
|
+
throw new Error(`Codex host auth file was not found at ${hostAuthPath}`);
|
|
231
|
+
}
|
|
232
|
+
mountArgs.push("--mount", `type=bind,src=${hostAuthPath},dst=${containerAuthPath}`);
|
|
233
|
+
}
|
|
227
234
|
this.containerName = `companyhelm-codex-app-server-${Date.now()}`;
|
|
228
235
|
const bootstrapTemplate = (0, node_fs_1.readFileSync)(resolveTemplatePath(), "utf8");
|
|
229
236
|
const bootstrapScript = renderJinjaTemplate(bootstrapTemplate, {
|
|
@@ -108,7 +108,7 @@ function buildSharedThreadMounts(options) {
|
|
|
108
108
|
mounts.push({
|
|
109
109
|
Type: "bind",
|
|
110
110
|
Source: hostAuthPath,
|
|
111
|
-
Target:
|
|
111
|
+
Target: resolveContainerPath(options.codexAuthPath, options.containerHomeDirectory),
|
|
112
112
|
});
|
|
113
113
|
return mounts;
|
|
114
114
|
}
|