Foreground still skips the heavy overview stack, but overlaps a timed gateway so official evidence can merge when it finishes in budget. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
1.9 KiB
TypeScript
36 lines
1.9 KiB
TypeScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import test from "node:test";
|
|
|
|
const root = resolve(fileURLToPath(new URL("../..", import.meta.url)));
|
|
|
|
test("web consult compute and projection keep the live skill's locally computed spectrum", () => {
|
|
const skill = readFileSync(resolve(root, "SKILL.md"), "utf8");
|
|
const attach = readFileSync(resolve(root, "scripts/jyotish_api_server.py"), "utf8");
|
|
const workflow = readFileSync(resolve(root, "frontend/src/mastra/consultation-workflow.ts"), "utf8");
|
|
const instructions = readFileSync(resolve(root, "frontend/src/mastra/index.ts"), "utf8");
|
|
|
|
assert.match(skill, /共同基础:D1、功能性吉凶星、相关 Yoga、Vimshottari 与 Narayana Dasha、行运、Shadbala、Ashtakavarga/);
|
|
assert.match(skill, /事业至少 `D10 \+ A10`/);
|
|
assert.match(skill, /婚恋至少 `D9 \+ UL`/);
|
|
|
|
for (const layer of ["yogas", "chara_dasha", "transits", "arudha_padas", "narayana_dasha"]) {
|
|
assert.match(attach, new RegExp(`modules\\['${layer}'\\]`), layer);
|
|
}
|
|
assert.match(attach, /_compact_yoga_entry/);
|
|
assert.match(attach, /_compact_chara_dasha/);
|
|
assert.match(attach, /_join_foreground_vedastro/);
|
|
assert.match(attach, /skip_vedastro_main_entry_overview': defer_optional_external_evidence/);
|
|
assert.doesNotMatch(attach, /defer_optional_external_evidence = False/);
|
|
|
|
assert.match(workflow, /yogas: context\.local_layers\.yogas/);
|
|
assert.match(workflow, /arudha_padas: context\.local_layers\.arudha_padas/);
|
|
assert.match(workflow, /chara_dasha: context\.local_layers\.chara_dasha/);
|
|
assert.match(workflow, /transits: context\.local_layers\.transits/);
|
|
assert.match(workflow, /must_use_layers/);
|
|
assert.match(instructions, /must_use_layers is the executed shortlist/);
|
|
assert.doesNotMatch(instructions, /AGENTS\.md/);
|
|
});
|