remote-codex 0.11.3 → 0.11.4
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/README.md +4 -0
- package/apps/relay-server/dist/index.js +35 -2
- package/apps/supervisor-api/dist/chunk-ZWZQVPDT.js +27893 -0
- package/apps/supervisor-api/dist/index.js +4 -25727
- package/apps/supervisor-api/dist/worker-index.d.ts +2 -0
- package/apps/supervisor-api/dist/worker-index.js +197 -0
- package/apps/supervisor-web/dist/assets/index-CbdWtyx0.js +5 -0
- package/apps/supervisor-web/dist/assets/index-Di1JBevU.css +1 -0
- package/apps/supervisor-web/dist/assets/thread-ui-ICfwCbte.js +3604 -0
- package/apps/supervisor-web/dist/assets/ui-vendor-D1uxdi-d.js +430 -0
- package/apps/supervisor-web/dist/index.html +6 -7
- package/bin/remote-codex.mjs +534 -19
- package/package.json +41 -2
- package/packages/agent-runtime/src/types.ts +2 -1
- package/packages/codex/src/appServerManager.ts +1 -0
- package/packages/codex/src/historyItems.test.ts +45 -0
- package/packages/codex/src/historyItems.ts +22 -0
- package/packages/codex/src/runtimeAdapter.ts +6 -0
- package/packages/codex/src/types.ts +2 -1
- package/packages/db/migrations/0018_control_plane.sql +129 -0
- package/packages/db/migrations/0019_control_plane_projects.sql +19 -0
- package/packages/db/migrations/0020_control_workspace_status.sql +1 -0
- package/packages/db/migrations/0021_control_sandbox_lifecycle_fields.sql +3 -0
- package/packages/db/migrations/0022_control_sandbox_resource_profile.sql +1 -0
- package/packages/db/migrations/0023_control_usage_import_state.sql +18 -0
- package/packages/db/migrations/0024_control_auth.sql +23 -0
- package/packages/db/migrations/0025_control_harness_credentials.sql +29 -0
- package/packages/db/migrations/0026_control_harness_usage_events.sql +27 -0
- package/packages/db/src/schema.ts +305 -1
- package/packages/shared/src/index.ts +32 -0
- package/packages/shared/src/tokens.ts +137 -0
- package/apps/supervisor-web/dist/assets/index-CBIze1VS.css +0 -1
- package/apps/supervisor-web/dist/assets/index-YpGAPjED.js +0 -4
- package/apps/supervisor-web/dist/assets/thread-ui-BEieA99i.css +0 -1
- package/apps/supervisor-web/dist/assets/thread-ui-CF80LEEN.js +0 -3613
- package/apps/supervisor-web/dist/assets/ui-vendor-CW6egZBG.js +0 -430
package/README.md
CHANGED
|
@@ -1074,7 +1074,8 @@ function relayRequestBody(body) {
|
|
|
1074
1074
|
function relayRequestHeaders(headers) {
|
|
1075
1075
|
const output = {};
|
|
1076
1076
|
for (const [name, value] of Object.entries(headers)) {
|
|
1077
|
-
|
|
1077
|
+
const lower = name.toLowerCase();
|
|
1078
|
+
if (lower === "authorization" || lower === "content-length" || lower === "transfer-encoding") {
|
|
1078
1079
|
continue;
|
|
1079
1080
|
}
|
|
1080
1081
|
if (Array.isArray(value)) {
|
|
@@ -1159,8 +1160,36 @@ var envSchema = z2.object({
|
|
|
1159
1160
|
REMOTE_CODEX_RELAY_REGISTRATION_ENABLED: z2.string().optional(),
|
|
1160
1161
|
REMOTE_CODEX_RELAY_WEB_DIST_DIR: z2.string().min(1).optional()
|
|
1161
1162
|
});
|
|
1163
|
+
function optionalNonEmpty(value) {
|
|
1164
|
+
const normalized = value?.trim();
|
|
1165
|
+
return normalized ? normalized : void 0;
|
|
1166
|
+
}
|
|
1167
|
+
function normalizeOptionalEnv(env) {
|
|
1168
|
+
return {
|
|
1169
|
+
...env,
|
|
1170
|
+
HOST: optionalNonEmpty(env.HOST),
|
|
1171
|
+
PORT: optionalNonEmpty(env.PORT),
|
|
1172
|
+
REMOTE_CODEX_RELAY_SUPERVISOR_TOKEN: optionalNonEmpty(
|
|
1173
|
+
env.REMOTE_CODEX_RELAY_SUPERVISOR_TOKEN
|
|
1174
|
+
),
|
|
1175
|
+
REMOTE_CODEX_RELAY_CLIENT_TOKEN: optionalNonEmpty(
|
|
1176
|
+
env.REMOTE_CODEX_RELAY_CLIENT_TOKEN
|
|
1177
|
+
),
|
|
1178
|
+
REMOTE_CODEX_ADMIN_EMAIL: optionalNonEmpty(env.REMOTE_CODEX_ADMIN_EMAIL),
|
|
1179
|
+
REMOTE_CODEX_RELAY_DATA_DIR: optionalNonEmpty(env.REMOTE_CODEX_RELAY_DATA_DIR),
|
|
1180
|
+
REMOTE_CODEX_RELAY_SESSION_SECRET: optionalNonEmpty(
|
|
1181
|
+
env.REMOTE_CODEX_RELAY_SESSION_SECRET
|
|
1182
|
+
),
|
|
1183
|
+
REMOTE_CODEX_RELAY_REGISTRATION_ENABLED: optionalNonEmpty(
|
|
1184
|
+
env.REMOTE_CODEX_RELAY_REGISTRATION_ENABLED
|
|
1185
|
+
),
|
|
1186
|
+
REMOTE_CODEX_RELAY_WEB_DIST_DIR: optionalNonEmpty(
|
|
1187
|
+
env.REMOTE_CODEX_RELAY_WEB_DIST_DIR
|
|
1188
|
+
)
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1162
1191
|
function loadRelayServerConfig(env = process.env) {
|
|
1163
|
-
const parsed = envSchema.parse(env);
|
|
1192
|
+
const parsed = envSchema.parse(normalizeOptionalEnv(env));
|
|
1164
1193
|
return {
|
|
1165
1194
|
host: parsed.HOST ?? "0.0.0.0",
|
|
1166
1195
|
port: parsed.PORT ?? 8788,
|
|
@@ -1216,6 +1245,10 @@ var app = buildRelayServer(config);
|
|
|
1216
1245
|
app.listen({ host: config.host, port: config.port }).then(() => {
|
|
1217
1246
|
app.log.info(`Remote Codex relay listening on http://${config.host}:${config.port}`);
|
|
1218
1247
|
}).catch((error) => {
|
|
1248
|
+
console.error(
|
|
1249
|
+
`Failed to start Remote Codex relay on http://${config.host}:${config.port}.`
|
|
1250
|
+
);
|
|
1251
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
1219
1252
|
app.log.error(error);
|
|
1220
1253
|
process.exit(1);
|
|
1221
1254
|
});
|