@runuai/host 0.9.136 → 0.9.138
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/lib/agents/codex.ts +6 -2
- package/lib/shared-files-s3.ts +30 -0
- package/package.json +1 -1
package/lib/agents/codex.ts
CHANGED
|
@@ -699,6 +699,10 @@ register({
|
|
|
699
699
|
existsSync(
|
|
700
700
|
join(process.env.UAI_OWNER_HOME?.trim() || homedir(), ".codex", "auth.json"),
|
|
701
701
|
),
|
|
702
|
-
|
|
703
|
-
|
|
702
|
+
// Forward `cliConfigOverrides` too: the Uai Managed Engine's gateway
|
|
703
|
+
// provider block rides it, and this destructuring silently dropped it on
|
|
704
|
+
// the first live gpt-5-mini smoke (2026-09-12, host 0.9.136 — codex still
|
|
705
|
+
// dialed api.openai.com).
|
|
706
|
+
create: async ({ taskId, agent, environment, systemPreamble, agentEnv, cliConfigOverrides }) =>
|
|
707
|
+
new CodexSession({ taskId, agent, environment, systemPreamble, agentEnv, cliConfigOverrides }),
|
|
704
708
|
});
|
package/lib/shared-files-s3.ts
CHANGED
|
@@ -125,10 +125,40 @@ export function sharedFilesMountPlans(
|
|
|
125
125
|
* could not be mounted (the task still starts, like the machine copy path),
|
|
126
126
|
* null when clean or when there is nothing to mount.
|
|
127
127
|
*/
|
|
128
|
+
/** One mount pass per workspace at a time. Task-up (the cloud's wake) and
|
|
129
|
+
* the sidecar's own resume pass both mount on a runner restart, and the
|
|
130
|
+
* shell's `mountpoint -q` guard is not atomic across two racers: live
|
|
131
|
+
* 2026-09-12 both ran in the same second — /files/org got two stacked
|
|
132
|
+
* mounts and the loser on /files/me failed with "fuse: mountpoint is not
|
|
133
|
+
* empty", surfaced to the human as a warning although the files were
|
|
134
|
+
* mounted. The second pass now waits and finds the healthy mount. */
|
|
135
|
+
const mountPasses = new Map<string, Promise<unknown>>();
|
|
136
|
+
|
|
137
|
+
async function serializedByWorkspace<T>(workspacePath: string, run: () => Promise<T>): Promise<T> {
|
|
138
|
+
const previous = mountPasses.get(workspacePath) ?? Promise.resolve();
|
|
139
|
+
const next = previous.catch(() => undefined).then(run);
|
|
140
|
+
mountPasses.set(workspacePath, next);
|
|
141
|
+
try {
|
|
142
|
+
return await next;
|
|
143
|
+
} finally {
|
|
144
|
+
if (mountPasses.get(workspacePath) === next) mountPasses.delete(workspacePath);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
128
148
|
export async function mountSharedFilesFromLease(
|
|
129
149
|
handle: TaskEnvironmentHandle<unknown>,
|
|
130
150
|
workspacePath: string,
|
|
131
151
|
task: { sharedFiles?: string },
|
|
152
|
+
): Promise<string | null> {
|
|
153
|
+
return serializedByWorkspace(workspacePath, () =>
|
|
154
|
+
mountSharedFilesFromLeaseNow(handle, workspacePath, task),
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
async function mountSharedFilesFromLeaseNow(
|
|
159
|
+
handle: TaskEnvironmentHandle<unknown>,
|
|
160
|
+
workspacePath: string,
|
|
161
|
+
task: { sharedFiles?: string },
|
|
132
162
|
): Promise<string | null> {
|
|
133
163
|
const mode: SharedFilesMode =
|
|
134
164
|
task.sharedFiles === "rw" ? "rw" : task.sharedFiles === "off" ? "off" : "ro";
|