relmio 0.4.1 → 0.6.0
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/CHANGELOG.md +51 -0
- package/README.md +40 -16
- package/docs/architecture.md +21 -9
- package/docs/local-endpoints-spec.md +101 -13
- package/docs/local-endpoints.md +101 -30
- package/docs/security.md +40 -15
- package/package.json +1 -1
- package/src/domain/local-endpoints.js +187 -14
- package/src/gateway/codex-chat.js +754 -0
- package/src/services/codex-login.js +11 -3
- package/src/services/local-installer.js +859 -20
- package/src/ui/local.css +140 -2
- package/src/ui/local.html +89 -9
- package/src/ui/local.js +157 -37
- package/src/web/server.js +247 -18
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
const COMPOSE_FILE_NAME = "docker-compose.yml";
|
|
11
11
|
const PROJECT_NAME_PATTERN =
|
|
12
|
-
/^relmio-codex-chatgpt-[a-f0-9]{32}$/u;
|
|
12
|
+
/^relmio-codex-(chatgpt|chat)-[a-f0-9]{32}$/u;
|
|
13
13
|
const DEFAULT_RESPONSE_TIMEOUT_MS = 15_000;
|
|
14
14
|
const DEFAULT_COMPLETION_TIMEOUT_MS = 300_000;
|
|
15
15
|
const DEFAULT_TERMINATION_GRACE_MS = 2_000;
|
|
@@ -88,7 +88,12 @@ function validateOptions({
|
|
|
88
88
|
if (maxLineBytes > maxStdoutBytes) {
|
|
89
89
|
throw new TypeError("maxLineBytes cannot exceed maxStdoutBytes.");
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
const projectKind = PROJECT_NAME_PATTERN.exec(projectName)?.[1];
|
|
92
|
+
return {
|
|
93
|
+
dockerHost: validatedDockerHost,
|
|
94
|
+
projectName,
|
|
95
|
+
serviceName: projectKind === "chat" ? "codex-chat" : "codex",
|
|
96
|
+
};
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
function validateVerificationUrl(value) {
|
|
@@ -205,7 +210,10 @@ export async function startCodexDeviceLogin({
|
|
|
205
210
|
"run",
|
|
206
211
|
"--rm",
|
|
207
212
|
"--no-deps",
|
|
208
|
-
"codex"
|
|
213
|
+
...(validated.serviceName === "codex-chat"
|
|
214
|
+
? ["--entrypoint", "codex"]
|
|
215
|
+
: []),
|
|
216
|
+
validated.serviceName,
|
|
209
217
|
"app-server",
|
|
210
218
|
"--strict-config",
|
|
211
219
|
"--stdio",
|