mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 04:39:31 +08:00
Ship the breaking front- and back-end runtime and route refactor, learner and guardian flows, grounded reading, knowledge and parser updates, and recoverable long-running streams. Release notes: assets/releases/ver1-6-3.md
43 lines
1005 B
TypeScript
43 lines
1005 B
TypeScript
import assert from "node:assert/strict";
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import test from "node:test";
|
|
|
|
const generatedRoot = path.resolve(process.cwd(), "contracts", "generated");
|
|
|
|
test("generated turn protocol covers the complete v2 lifecycle", () => {
|
|
const source = fs.readFileSync(
|
|
path.join(generatedRoot, "turn-protocol.ts"),
|
|
"utf8",
|
|
);
|
|
|
|
for (const value of [
|
|
"queued",
|
|
"running",
|
|
"waiting_input",
|
|
"recovering",
|
|
"completed",
|
|
"failed",
|
|
"cancelled",
|
|
"wait_for_input",
|
|
"worker_lost",
|
|
"protocol_version",
|
|
"minimum_web_protocol_version",
|
|
]) {
|
|
assert.match(source, new RegExp(value));
|
|
}
|
|
});
|
|
|
|
test("generated OpenAPI types expose backend-owned browser models", () => {
|
|
const source = fs.readFileSync(path.join(generatedRoot, "api.ts"), "utf8");
|
|
|
|
for (const value of [
|
|
"TurnRequest",
|
|
"RuntimeStatus",
|
|
"SessionSummary",
|
|
"ErrorEnvelope",
|
|
]) {
|
|
assert.match(source, new RegExp(value));
|
|
}
|
|
});
|