feat(m02-df): 다른 로직 입력 — 변환 흐름이 비면 옛 줄 입력 · 자동값으로 받는 알약 · 진짜 서버 길로 값 확인

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ACSGaHdLgnkEkoA4LDtMU
This commit is contained in:
2026-10-01 23:46:31 +09:00
co-authored by Claude Sonnet 5.5
parent e8662131e0
commit 27c5eba521
3 changed files with 50 additions and 4 deletions
@@ -334,6 +334,28 @@ export function masterRef(
: ref;
}
/** 옛 로직 줄(입력 · 자동값)에서 바로 읽은 다른 로직 입력 값 — 흐름 변환이 아직 비어 있을 때 · 받는 알약 = 입력마다 · 예시값 = 자동값 */
export function rowRef(
key: string,
name: string,
resultUnit: string,
inputs: { 이름: string; 단위?: string }[],
auto: Record<string, unknown>,
): CfLogicRef {
const examples: Record<string, number | string> = {};
for (const i of inputs) {
const v = auto[i.이름];
if (typeof v === "number" || (typeof v === "string" && v !== "")) examples[i.이름] = v;
}
return {
key,
name,
outputs: COST_OUTPUTS.map((n) => ({ name: n, unit: resultUnit || "-" })),
designs: inputs.map((i) => ({ name: i.이름, unit: i.단위 || "-" })),
...(Object.keys(examples).length ? { examples } : {}),
};
}
/** 이 로직이 자기 자신을 부르거나 돌고 도나 — `load` 가 로직을 주면 입력 상자의 「다른 로직」 을 따라가 봄(깊이 8) */
export async function wouldCycle(
selfKey: string | null,