feat: add sessions_yield tool for cooperative turn-ending (#36537)

Merged via squash.

Prepared head SHA: 75d9204c863792226389a4d33eeb40c4e842528d
Co-authored-by: jriff <50276+jriff@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
Jacob Riff
2026-03-12 16:46:47 +01:00
committed by GitHub
parent e6897c800b
commit 3fa91cd69d
17 changed files with 848 additions and 39 deletions

View File

@@ -32,13 +32,13 @@ INPUT_PATHS=(
)
compute_hash() {
ROOT_DIR="$ROOT_DIR" node --input-type=module - "${INPUT_PATHS[@]}" <<'NODE'
ROOT_DIR="$ROOT_DIR" node --input-type=module --eval '
import { createHash } from "node:crypto";
import { promises as fs } from "node:fs";
import path from "node:path";
const rootDir = process.env.ROOT_DIR ?? process.cwd();
const inputs = process.argv.slice(2);
const inputs = process.argv.slice(1);
const files = [];
async function walk(entryPath) {
@@ -73,7 +73,7 @@ for (const filePath of files) {
}
process.stdout.write(hash.digest("hex"));
NODE
' "${INPUT_PATHS[@]}"
}
current_hash="$(compute_hash)"