leerness 1.9.242 β†’ 1.9.243

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/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.243 β€” 2026-05-26
4
+
5
+ **🌏 UR-0014 3단계: CJK λ‹€κ΅­μ–΄ λΆ„λ₯˜ (ν•œκ΅­μ–΄/일본어/쀑ꡭ어) + session close --auto-fix-encoding + handoff body --apply μ§„μž…μ .**
6
+
7
+ ### μ‚¬μš©μž λͺ…μ‹œ (UR-0014) β€” 3단계 λ‹€κ΅­μ–΄ 보강 + 마감 μžλ™ν™”
8
+
9
+ 1.9.241 (감지) β†’ 1.9.242 (μžλ™ μˆ˜μ •) β†’ 1.9.243 (λ‹€κ΅­μ–΄ + 마감 μžλ™ 톡합):
10
+
11
+ ### 1. CJK λΆ„λ₯˜ β€” Korean/Japanese/Chinese μžλ™ 식별
12
+ - `_scanShellScriptsEncoding()` 에 `riskType` ν•„λ“œ μΆ”κ°€
13
+ - UTF-8 byte range λΆ„λ₯˜:
14
+ - Korean (Hangul U+AC00-D7AF) β†’ 0xEA-0xED μ‹œμž‘ β†’ CP949 μœ„ν—˜
15
+ - Japanese (Hiragana/Katakana U+3040-30FF) β†’ 0xE3 μ‹œμž‘ β†’ CP932 (Shift-JIS) μœ„ν—˜
16
+ - Chinese (CJK Unified U+4E00-9FFF) β†’ 0xE4-0xE9 μ‹œμž‘ β†’ CP936 (GBK) μœ„ν—˜
17
+ - `atRisk[].cjk`: { korean, japanese, chinese, other } μ„ΈλΆ€ 카운트
18
+ - `result.riskTypeCounts`: λΆ„λ₯˜λ³„ μš”μ•½ 톡계
19
+ - Locale 별 μ •ν™•ν•œ μœ„ν—˜ λ©”μ‹œμ§€ ("Windows ν•œκ΅­μ–΄/일본어/쀑ꡭ어 PowerShell μ—μ„œ CPxxx 둜 μ˜€μΈμ‹ κ°€λŠ₯")
20
+
21
+ ### 2. session close --auto-fix-encoding 마감 μžλ™ 회볡
22
+ - 1.9.224 (--auto-apply-delivered) + 1.9.237 (--auto-cleanup-branches) νŒ¨ν„΄ ν™•μž₯
23
+ - 마감 μ‹œ μ…Έ 슀크립트 인코딩 μœ„ν—˜ μžλ™ BOM μΆ”κ°€
24
+ - κΈ°λ³Έ: μ•ˆλ‚΄λ§Œ (`μžλ™ 회볡 κ°€λŠ₯` hint) Β· `--auto-fix-encoding` λͺ…μ‹œ μ‹œμ—λ§Œ λ³€κ²½
25
+ - agent-mode stop 흐름에 μžλ™ chain (`session close --auto-apply-delivered --auto-cleanup-branches --auto-fix-encoding`)
26
+
27
+ ### 3. handoff body --apply μ§„μž…μ  ν‘œμ‹œ
28
+ - 인코딩 μœ„ν—˜ 발견 μ‹œ 본문에 μžλ™ μ•ˆλ‚΄ 2쀄 μΆ”κ°€:
29
+ - `β†’ μžλ™ 회볡: leerness env encoding --apply (UTF-8 BOM μžλ™ μΆ”κ°€, 1.9.242)`
30
+ - `β†’ 마감 μ‹œ μžλ™: session close --auto-fix-encoding (1.9.243)`
31
+ - CJK λΆ„λ₯˜ μš”μ•½ ν‘œμ‹œ: `λΆ„λ₯˜: korean=N, japanese=M, chinese=K (1.9.243 CJK)`
32
+
33
+ ### 4. λˆ„μ  νšŒκ·€ (1.9.207~242) β€” λͺ¨λ‘ μœ μ§€
34
+ - MCP 69 도ꡬ μœ μ§€
35
+ - JSON 톡합 10 ν•„λ“œ (envInfo) μœ μ§€
36
+ - drift check --auto-fix env encoding 톡합 μœ μ§€
37
+
38
+ ### 5. stress-v188 β€” **24/24 PASS Β· 100%**
39
+ - 1.9.243 (8): VERSION + CJK 3μ’… λΆ„λ₯˜ 정확도 + riskTypeCounts + atRisk[].cjk + session close μžλ™/κΈ°λ³Έ λͺ¨λ“œ + handoff body μ§„μž…μ  + agent-mode stop chain
40
+ - μ„±λŠ₯ (2): cold_start avg 333ms Β· session close --auto-fix 438ms
41
+ - λˆ„μ  νšŒκ·€ (14): 1.9.207~242 + λ³΄μ•ˆ + npm publish
42
+
43
+ ### 6. μžλ™ release (105 λΌμš΄λ“œ main-push streak Β· 66 λΌμš΄λ“œ npm publish streak)
44
+
45
+ 🌏 **λ‹€κ΅­μ–΄ CJK μ™„μ „ μžλ™ν™”** β€” Korean/Japanese/Chinese PowerShell 인코딩 μ˜€μΈμ‹ 사전 차단
46
+
47
+ ---
48
+
3
49
  ## 1.9.242 β€” 2026-05-26
4
50
 
5
51
  **🌐 UR-0014 2단계: env encoding --apply (BOM μžλ™ μΆ”κ°€) + JSON 10 ν•„λ“œ envInfo + drift --auto-fix 톡합.**
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **AI μ½”λ”© μ—μ΄μ „νŠΈμ˜ κ±°μ§“ μ™„λ£ŒΒ·μ€‘λ³΅Β·λ§κ°Β·μΆ©λŒμ„ λ§‰μ•„μ£ΌλŠ” κ²€μˆ˜Β·κΈ°μ–΅Β·ν˜‘μ—… CLI ν•˜λ„€μŠ€.**
4
4
 
5
- [![npm](https://img.shields.io/badge/npm-leerness-blue)](https://www.npmjs.com/package/leerness) [![version](https://img.shields.io/badge/version-1.9.242-green)]() [![tests](https://img.shields.io/badge/e2e-217%2F217-success)]() [![stress](https://img.shields.io/badge/stress--v187-22%2F22-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-69-brightgreen)]() [![cli](https://img.shields.io/badge/CLI_commands-56-brightgreen)]() [![json-fields](https://img.shields.io/badge/JSON_톡합-10_ν•„λ“œ-blueviolet)]() [![rounds](https://img.shields.io/badge/autonomous--rounds-198-blueviolet)]() [![main-push](https://img.shields.io/badge/πŸŽ‰_main--push_streak-104_rounds-success)]() [![npm-streak](https://img.shields.io/badge/πŸŽ‰_npm--publish-65_streak-success)]() [![encoding](https://img.shields.io/badge/🌐_env_encoding-BOM_μžλ™μΆ”κ°€-blueviolet)]() [![perf](https://img.shields.io/badge/cold_start-371ms-success)]() [![license](https://img.shields.io/badge/license-MIT-lightgrey)]()
5
+ [![npm](https://img.shields.io/badge/npm-leerness-blue)](https://www.npmjs.com/package/leerness) [![version](https://img.shields.io/badge/version-1.9.243-green)]() [![tests](https://img.shields.io/badge/e2e-217%2F217-success)]() [![stress](https://img.shields.io/badge/stress--v188-24%2F24-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-69-brightgreen)]() [![cli](https://img.shields.io/badge/CLI_commands-56-brightgreen)]() [![json-fields](https://img.shields.io/badge/JSON_톡합-10_ν•„λ“œ-blueviolet)]() [![rounds](https://img.shields.io/badge/autonomous--rounds-199-blueviolet)]() [![main-push](https://img.shields.io/badge/πŸŽ‰_main--push_streak-105_rounds-success)]() [![npm-streak](https://img.shields.io/badge/πŸŽ‰_npm--publish-66_streak-success)]() [![cjk](https://img.shields.io/badge/🌏_CJK_λΆ„λ₯˜-Ko_Ja_Zh-blueviolet)]() [![perf](https://img.shields.io/badge/cold_start-333ms-success)]() [![license](https://img.shields.io/badge/license-MIT-lightgrey)]()
6
6
 
7
7
  ```
8
8
  ╔══════════════════════════════════════════════════════════════╗
@@ -12,9 +12,9 @@
12
12
  β•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ•β•β•β•β–ˆβ–ˆβ•‘ β•‘
13
13
  β•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β•‘
14
14
  β•‘ β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β• β•‘
15
- β•‘ v1.9.242 AI Agent Reliability Harness + Sandbox β•‘
15
+ β•‘ v1.9.243 AI Agent Reliability Harness + Sandbox β•‘
16
16
  β•‘ verify Β· remember Β· orchestrate Β· audit Β· sandbox Β· drift β•‘
17
- β•‘ 🌐 env encoding --apply BOM μžλ™ μΆ”κ°€ (UR-0014 2단계) β•‘
17
+ β•‘ 🌏 CJK λΆ„λ₯˜ + session close --auto-fix-encoding (UR-0014 3) β•‘
18
18
  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
19
19
  ```
20
20
 
package/bin/harness.js CHANGED
@@ -7,7 +7,7 @@ const cp = require('child_process');
7
7
  const os = require('os'); // 1.9.178: _publishToNpm μ—μ„œ os.tmpdir() μ‚¬μš© (μ „μ—­ import)
8
8
  const readline = require('readline');
9
9
 
10
- const VERSION = '1.9.242';
10
+ const VERSION = '1.9.243';
11
11
 
12
12
  // 1.9.184: DEP0190 (child_process shell: true) deprecation warning μ–΅μ œ (μ‚¬μš©μž λͺ…μ‹œ).
13
13
  // leerness λŠ” cross-platform PATH resolution 을 μœ„ν•΄ shell: true λ₯Ό μ˜λ„μ μœΌλ‘œ μ‚¬μš© (claude.cmd / ollama.cmd λ“± Windows .cmd 처리).
@@ -2308,7 +2308,7 @@ function agentModeCmd(root, sub) {
2308
2308
  log('');
2309
2309
  log(` start μ§„μž… (handoff + drift --auto-fix + session-resume --auto-fix)`);
2310
2310
  log(` tick λ§€ λΌμš΄λ“œ (pulse + 핡심 μ‹ ν˜Έ)`);
2311
- log(` stop 마감 (session close --auto-apply-delivered --auto-cleanup-branches)`);
2311
+ log(` stop 마감 (session close --auto-apply-delivered --auto-cleanup-branches --auto-fix-encoding)`);
2312
2312
  log('');
2313
2313
  log(dm(` μ‚¬μš©μž λͺ…μ‹œ UR-0013 (Python + agent-mode νš¨μœ¨ν™”)`));
2314
2314
  return;
@@ -2337,8 +2337,8 @@ function agentModeCmd(root, sub) {
2337
2337
  }
2338
2338
  if (sub === 'stop') {
2339
2339
  log(cy(`# leerness agent-mode stop (1.9.239) β€” 톡합 마감`));
2340
- log(dm(` β†’ session close --auto-apply-delivered --auto-cleanup-branches`));
2341
- const r = spawnChild(['session', 'close', root, '--auto-apply-delivered', '--auto-cleanup-branches']);
2340
+ log(dm(` β†’ session close --auto-apply-delivered --auto-cleanup-branches --auto-fix-encoding`));
2341
+ const r = spawnChild(['session', 'close', root, '--auto-apply-delivered', '--auto-cleanup-branches', '--auto-fix-encoding']);
2342
2342
  process.stdout.write(r.stdout || '');
2343
2343
  return;
2344
2344
  }
@@ -2442,6 +2442,35 @@ function _collectRuntimeEnv() {
2442
2442
  // μœ„ν—˜ μ‹œκ·Έλ„: ν•œκ΅­μ–΄ (λ˜λŠ” λΉ„-ASCII) 문자 + BOM μ—†μŒ + Windows ν™˜κ²½
2443
2443
  function _scanShellScriptsEncoding(root) {
2444
2444
  const result = { scanned: 0, atRisk: [], notes: [] };
2445
+ // 1.9.243: CJK λΆ„λ₯˜ β€” Korean/Japanese/Chinese λΉ„-ASCII νŒ¨ν„΄ 톡계 (UR-0014 3단계)
2446
+ function _classifyCJK(buf, len) {
2447
+ let korean = 0, japanese = 0, chinese = 0, other = 0;
2448
+ for (let i = 0; i < Math.min(buf.length, len); i++) {
2449
+ const b = buf[i];
2450
+ if (b < 0x80) continue;
2451
+ // UTF-8 3-byte μ‹œν€€μŠ€ μ‹œμž‘ λ°”μ΄νŠΈ λΆ„λ₯˜
2452
+ // Korean Hangul Syllables U+AC00-D7AF β†’ 3-byte: EA B0 80 ~ ED 9F BF
2453
+ if (b >= 0xEA && b <= 0xED) korean++;
2454
+ // Japanese Hiragana/Katakana U+3040-30FF β†’ 3-byte: E3 81 80 ~ E3 83 BF
2455
+ else if (b === 0xE3) japanese++;
2456
+ // CJK Unified Ideographs U+4E00-9FFF β†’ 3-byte: E4 B8 80 ~ E9 BF BF
2457
+ else if (b >= 0xE4 && b <= 0xE9) chinese++;
2458
+ else other++;
2459
+ }
2460
+ return { korean, japanese, chinese, other };
2461
+ }
2462
+ function _riskLabel(cjk) {
2463
+ if (cjk.korean >= cjk.japanese && cjk.korean >= cjk.chinese && cjk.korean > 0) {
2464
+ return { type: 'korean', risk: 'Windows ν•œκ΅­μ–΄ PowerShell μ—μ„œ CP949 둜 μ˜€μΈμ‹ κ°€λŠ₯ (BOM μΆ”κ°€ ꢌμž₯)' };
2465
+ }
2466
+ if (cjk.japanese > cjk.korean && cjk.japanese >= cjk.chinese) {
2467
+ return { type: 'japanese', risk: 'Windows 일본어 PowerShell μ—μ„œ CP932 (Shift-JIS) 둜 μ˜€μΈμ‹ κ°€λŠ₯ (BOM μΆ”κ°€ ꢌμž₯)' };
2468
+ }
2469
+ if (cjk.chinese > 0) {
2470
+ return { type: 'chinese', risk: 'Windows 쀑ꡭ어 PowerShell μ—μ„œ CP936 (GBK) 둜 μ˜€μΈμ‹ κ°€λŠ₯ (BOM μΆ”κ°€ ꢌμž₯)' };
2471
+ }
2472
+ return { type: 'non-ascii', risk: 'Windows λΉ„-ASCII μ…Έ 슀크립트 β€” BOM μ—†λŠ” UTF-8 인코딩 μ˜€μΈμ‹ κ°€λŠ₯ (BOM μΆ”κ°€ ꢌμž₯)' };
2473
+ }
2445
2474
  function walk(dir, depth = 0) {
2446
2475
  if (depth > 3) return; // λ„ˆλ¬΄ 깊이 λ“€μ–΄κ°€μ§€ μ•ŠμŒ
2447
2476
  let entries;
@@ -2462,12 +2491,17 @@ function _scanShellScriptsEncoding(root) {
2462
2491
  if (buf[i] >= 0x80) { nonAscii = true; break; }
2463
2492
  }
2464
2493
  if (nonAscii && !hasBOM) {
2494
+ // 1.9.243: CJK λΆ„λ₯˜ μΆ”κ°€
2495
+ const cjk = _classifyCJK(buf, 4096);
2496
+ const label = _riskLabel(cjk);
2465
2497
  result.atRisk.push({
2466
2498
  file: path.relative(root, fp),
2467
2499
  ext: path.extname(fp),
2468
2500
  hasBOM: false,
2469
2501
  nonAscii: true,
2470
- risk: 'Windows ν•œκ΅­μ–΄ PowerShell μ—μ„œ CP949 둜 μ˜€μΈμ‹ κ°€λŠ₯ (BOM μΆ”κ°€ ꢌμž₯)'
2502
+ riskType: label.type,
2503
+ cjk,
2504
+ risk: label.risk
2471
2505
  });
2472
2506
  }
2473
2507
  } catch {}
@@ -2478,6 +2512,9 @@ function _scanShellScriptsEncoding(root) {
2478
2512
  if (result.atRisk.length > 0) {
2479
2513
  result.notes.push('ν•΄κ²°: 파일 μ‹œμž‘μ— UTF-8 BOM μΆ”κ°€ (EF BB BF) λ˜λŠ” .ps1 첫 쀄에 $OutputEncoding/[Console]::OutputEncoding μ„€μ •');
2480
2514
  }
2515
+ // 1.9.243: λΆ„λ₯˜λ³„ 톡계 μš”μ•½
2516
+ const types = result.atRisk.reduce((m, r) => { m[r.riskType] = (m[r.riskType] || 0) + 1; return m; }, {});
2517
+ result.riskTypeCounts = types;
2481
2518
  return result;
2482
2519
  }
2483
2520
 
@@ -6948,8 +6985,13 @@ function handoff(root) {
6948
6985
  log(dm5(` ${r.risk}`));
6949
6986
  });
6950
6987
  if (scan.atRisk.length > 3) log(dm5(` ... +${scan.atRisk.length - 3}건 더`));
6988
+ // 1.9.243: CJK λΆ„λ₯˜ μš”μ•½ (UR-0014 3단계)
6989
+ const types = scan.riskTypeCounts || {};
6990
+ const tList = Object.entries(types).filter(([_, c]) => c > 0).map(([t, c]) => `${t}=${c}`);
6991
+ if (tList.length > 0) log(dm5(` λΆ„λ₯˜: ${tList.join(', ')} (1.9.243 CJK)`));
6951
6992
  log(dm5(` β†’ 상세: leerness env encoding`));
6952
- log(dm5(` β†’ ν•΄κ²°: 파일 μ‹œμž‘μ— UTF-8 BOM (EF BB BF) μΆ”κ°€`));
6993
+ log(dm5(` β†’ μžλ™ 회볡: leerness env encoding --apply (UTF-8 BOM μžλ™ μΆ”κ°€, 1.9.242)`));
6994
+ log(dm5(` β†’ 마감 μ‹œ μžλ™: session close --auto-fix-encoding (1.9.243)`));
6953
6995
  }
6954
6996
  } catch {}
6955
6997
 
@@ -10967,6 +11009,31 @@ function sessionClose(root, opts = {}) {
10967
11009
  }
10968
11010
  }
10969
11011
  } catch {}
11012
+ // 1.9.243: session close --auto-fix-encoding β€” μ…Έ 슀크립트 인코딩 μœ„ν—˜ μžλ™ 회볡 (UR-0014 3단계)
11013
+ // 1.9.224 (--auto-apply-delivered) / 1.9.237 (--auto-cleanup-branches) νŒ¨ν„΄ ν™•μž₯
11014
+ // 마감 μ‹œ ν•œκ΅­μ–΄/일본어/쀑ꡭ어 PowerShell 인코딩 μœ„ν—˜ μžλ™ BOM μΆ”κ°€
11015
+ try {
11016
+ const encScan = _scanShellScriptsEncoding(root);
11017
+ if (encScan.atRisk && encScan.atRisk.length > 0) {
11018
+ if (has('--auto-fix-encoding')) {
11019
+ let ok = 0;
11020
+ for (const r of encScan.atRisk) {
11021
+ try {
11022
+ const fullPath = path.join(root, r.file);
11023
+ const orig = fs.readFileSync(fullPath);
11024
+ const bom = Buffer.from([0xEF, 0xBB, 0xBF]);
11025
+ const fixed = Buffer.concat([bom, orig]);
11026
+ fs.writeFileSync(fullPath, fixed);
11027
+ ok++;
11028
+ } catch {}
11029
+ }
11030
+ log(grn(` βœ“ 인코딩 μœ„ν—˜ ${ok}/${encScan.atRisk.length}건 UTF-8 BOM μžλ™ μΆ”κ°€ (--auto-fix-encoding 1.9.243)`));
11031
+ } else {
11032
+ log(yel(` ⚠ μ…Έ 슀크립트 인코딩 μœ„ν—˜ ${encScan.atRisk.length}건 (1.9.241) β€” μžλ™ 회볡 κ°€λŠ₯`));
11033
+ log(dim(` β†’ leerness env encoding --apply (μˆ˜λ™) λ˜λŠ” session close --auto-fix-encoding (1.9.243 μžλ™)`));
11034
+ }
11035
+ }
11036
+ } catch {}
10970
11037
  // 1.9.232: 마감 μ‹œ pulse ν•œ 쀄 μžλ™ λ…ΈμΆœ β€” λ‹€μŒ λΌμš΄λ“œ μ§„μž… μ‹œ μ¦‰μ‹œ μƒνƒœ 인지
10971
11038
  try {
10972
11039
  const rh = _computeRoundHistory(root);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leerness",
3
- "version": "1.9.242",
3
+ "version": "1.9.243",
4
4
  "description": "Leerness: λΉ„νŒŒκ΄΄ λ§ˆμ΄κ·Έλ ˆμ΄μ…˜, μžλ™ 버전 κ°μ§€Β·μ—…λ°μ΄νŠΈ, κ³„νš/μ§„ν–‰/ν•Έλ“œμ˜€ν”„ μžλ™ν™”, κ²ŒμœΌλ¦„Β·μ‹œν¬λ¦ΏΒ·μΈμ½”λ”© μžλ™ κ°€λ“œ, Claude Code μŠ¬λž˜μ‹œ 톡합을 κ°–μΆ˜ ν•œκ΅­μ–΄ μš°μ„  AI 개발 ν•˜λ„€μŠ€.",
5
5
  "keywords": [
6
6
  "leerness",