Merge origin/main into t3code/codex-turn-mapping

Co-authored-by: codex <[email protected]>
This commit is contained in:
Julius Marmingeandcodex committed 2026-06-17 00:29:48 -07:00
commit b7ff82862e
596 files changed
+51630 -18527

No files matched your search

+5
View File
@@ -22,6 +22,7 @@ const emitXAiAskUserQuestion = process.env.T3_ACP_EMIT_XAI_ASK_USER_QUESTION ===
const failSetConfigOption = process.env.T3_ACP_FAIL_SET_CONFIG_OPTION === "1";
const exitOnSetConfigOption = process.env.T3_ACP_EXIT_ON_SET_CONFIG_OPTION === "1";
const promptResponseText = process.env.T3_ACP_PROMPT_RESPONSE_TEXT;
const promptDelayMs = Number(process.env.T3_ACP_PROMPT_DELAY_MS ?? "0");
const permissionOptionIds = {
allowOnce: process.env.T3_ACP_ALLOW_ONCE_OPTION_ID ?? "allow-once",
allowAlways: process.env.T3_ACP_ALLOW_ALWAYS_OPTION_ID ?? "allow-always",
@@ -364,6 +365,10 @@ const program = Effect.gen(function* () {
Effect.gen(function* () {
const requestedSessionId = String(request.sessionId ?? sessionId);
if (Number.isFinite(promptDelayMs) && promptDelayMs > 0) {
yield* Effect.sleep(`${promptDelayMs} millis`);
}
if (emitInterleavedAssistantToolCalls) {
const toolCallId = "tool-call-1";
+5 -3
View File
@@ -18,6 +18,7 @@ import {
import { resolveCatalogDependencies } from "../../../scripts/lib/resolve-catalog.ts";
import { fromJsonStringPretty } from "@t3tools/shared/schemaJson";
import { fromYaml } from "@t3tools/shared/schemaYaml";
import { resolveSpawnCommand } from "@t3tools/shared/shell";
import serverPackageJson from "../package.json" with { type: "json" };
interface PackageJson {
@@ -175,6 +176,7 @@ const buildCmd = Command.make(
cwd: serverDir,
stdout: config.verbose ? "inherit" : "ignore",
stderr: "inherit",
shell: false,
}),
);
@@ -290,15 +292,15 @@ const publishCmd = Command.make(
() =>
Effect.gen(function* () {
const args = createVpPmPublishArgs(config);
const spawnCommand = yield* resolveSpawnCommand("vp", ["pm", ...args]);
yield* Effect.log(`[cli] Running: vp pm ${args.join(" ")}`);
yield* runCommand(
ChildProcess.make("vp", ["pm", ...args], {
ChildProcess.make(spawnCommand.command, spawnCommand.args, {
cwd: repoRoot,
stdout: config.verbose ? "inherit" : "ignore",
stderr: "inherit",
// Windows needs shell mode to resolve .cmd shims.
shell: process.platform === "win32",
shell: spawnCommand.shell,
}),
);
}),
@@ -3,6 +3,8 @@ import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
import process from "node:process";
import readline from "node:readline";
import * as NodeTimers from "node:timers";
import { resolveSpawnCommand } from "@t3tools/shared/shell";
import * as Effect from "effect/Effect";
type JsonPrimitive = null | boolean | number | string;
type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue };
@@ -128,9 +130,10 @@ class JsonRpcChild {
closed = false;
constructor(bin: string, args: string[], cwd: string) {
this.child = spawn(bin, args, {
const spawnCommand = Effect.runSync(resolveSpawnCommand(bin, args));
this.child = spawn(spawnCommand.command, spawnCommand.args, {
cwd,
shell: process.platform === "win32",
shell: spawnCommand.shell,
stdio: ["pipe", "pipe", "pipe"],
env: process.env,
});