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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdsa-harness",
3
- "version": "0.22.5",
3
+ "version": "0.22.6",
4
4
  "description": "AI 에이전트의 내부 동작을 단계별로 드러내는 교육용 터미널 하네스. 실시간 스트리밍 + OpenAI/Claude/OpenRouter + MCP + npm 플러그인·크로스포맷 스킬.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/builtins.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // 스킬/플러그인/버전을 바꾼 뒤 `node scripts/gen-builtins.mjs` 로 재생성하세요.
3
3
  import p0 from "../plugins/hwpx_read.mjs";
4
4
 
5
- export const VERSION = "0.22.5";
5
+ export const VERSION = "0.22.6";
6
6
 
7
7
  export const BUILTIN_PLUGINS = [p0];
8
8
 
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.grey(`모델에 보내는 메시지 ${d.messages?.length || 0}개 · 추정 ${d.estTokens} 토큰 · ${d.totalChars}자`));
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
- lines.push(` ${roleColor(m.role.padEnd(9))} ${c.grey(`${m.chars}자${m.extra || ""}`)}`);
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.grey(`제공 도구(${d.tools?.length || 0}): ${(d.tools || []).join(", ")}`));
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"), {
package/src/ui.js CHANGED
@@ -25,6 +25,7 @@ export const c = {
25
25
  magenta: wrap(35, 39),
26
26
  cyan: wrap(36, 39),
27
27
  grey: wrap(90, 39),
28
+ white: wrap(97, 39), // 밝은 흰색 — 교육모드에서 '실제 값'을 또렷하게
28
29
  };
29
30
 
30
31
  // 24bit truecolor (그라데이션 배너용). hex "#rrggbb"