cdsa-harness 0.22.5 → 0.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/builtins.js +1 -1
- package/src/cli.js +17 -4
- package/src/ui.js +1 -0
package/package.json
CHANGED
package/src/builtins.js
CHANGED
package/src/cli.js
CHANGED
|
@@ -81,14 +81,27 @@ function printTeach(ev, stream) {
|
|
|
81
81
|
return;
|
|
82
82
|
|
|
83
83
|
case Step.MODEL_CALL: {
|
|
84
|
+
// 실제 값은 흰색, 초보자용 설명(←)은 노란색으로 구분해 가독성을 높인다.
|
|
85
|
+
const why = (t) => c.yellow(`← ${t}`);
|
|
86
|
+
const ROLE_DESC = {
|
|
87
|
+
system: "하네스가 자동으로 넣는 규칙·정체성·작업폴더 안내문",
|
|
88
|
+
user: "내가 입력한 메시지",
|
|
89
|
+
assistant: "모델(AI)이 이전에 한 답변",
|
|
90
|
+
tool: "도구 실행 결과 — 모델에게 되돌려주는 값",
|
|
91
|
+
};
|
|
84
92
|
const lines = [];
|
|
85
|
-
lines.push(`${c.grey("provider/model")} ${c.bold(`${d.provider} · ${d.model}`)}`);
|
|
86
|
-
lines.push(c.
|
|
93
|
+
lines.push(`${c.grey("provider/model")} ${c.white(c.bold(`${d.provider} · ${d.model}`))} ${why("어느 회사의 어떤 모델을 호출하는지")}`);
|
|
94
|
+
lines.push(`${c.white(`모델에 보내는 메시지 ${d.messages?.length || 0}개 · 추정 ${d.estTokens} 토큰 · ${d.totalChars}자`)}`);
|
|
95
|
+
lines.push(` ${why("모델은 기억이 없어서, 지금까지의 대화 전체를 매번 처음부터 다시 보냅니다")}`);
|
|
87
96
|
for (const m of d.messages || []) {
|
|
88
97
|
const roleColor = m.role === "system" ? c.magenta : m.role === "user" ? c.cyan : m.role === "assistant" ? c.green : c.yellow;
|
|
89
|
-
|
|
98
|
+
const desc = ROLE_DESC[m.role]
|
|
99
|
+
? ` ${why(ROLE_DESC[m.role] + (m.extra && m.role === "assistant" ? " (도구를 써달라는 요청 포함)" : ""))}`
|
|
100
|
+
: "";
|
|
101
|
+
lines.push(` ${roleColor(m.role.padEnd(9))} ${c.white(`${m.chars}자${m.extra || ""}`)}${desc}`);
|
|
90
102
|
}
|
|
91
|
-
lines.push(c.
|
|
103
|
+
lines.push(`${c.white(`제공 도구(${d.tools?.length || 0})`)}${c.grey(`: ${(d.tools || []).join(", ")}`)}`);
|
|
104
|
+
lines.push(` ${why("모델이 쓸 수 있는 '손'(함수) 목록 — 모델이 이름과 인자로 요청하면 하네스가 대신 실행")}`);
|
|
92
105
|
console.log(panel(lines, { title: `${d.sub ? "┆ " : ""}🧠 ② LLM 호출 — 반복 ${d.iteration}`, color: "magenta" }));
|
|
93
106
|
if (d.systemPrompt && !d.sub) {
|
|
94
107
|
console.log(panel(clip(d.systemPrompt, 600).split("\n"), {
|