leerness 1.9.260 → 1.9.262

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,54 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.262 — 2026-05-31 — CLAUDE/AGENTS 문서 누적 갱신 (1.9.253~261 drift 차단)
4
+
5
+ **📚 메타 지침서가 1.9.252 에 멈춰 있어 9 라운드(1.9.253~261) 미반영 → 누적 갱신.**
6
+
7
+ ### 배경
8
+ CLAUDE.md / AGENTS.md (AI 핸드오프 핵심 지침)가 마지막으로 1.9.252까지만 반영. UR-0019(PATH 자동 등록)·UR-0020(shell-guard)·selftest·require.main 가드·테스트 인프라가 문서에 없어, 새 세션 AI 가 최신 기능을 인지 못 할 drift 위험. (기존 1.9.171/214/238/253 doc-sync 라운드 계승)
9
+
10
+ ### 구현 (문서 전용 — 코드 변경 없음, VERSION bump만)
11
+ 1. **CLAUDE.md**: "UR-0019~0020 + 테스트 인프라 (1.9.253~261)" 섹션 추가
12
+ - UR-0019 path-setup + require.main 가드 · 단위 테스트 인프라 · selftest(CLI/MCP/npm test) · UR-0020 shell-guard(6 규칙)
13
+ - 마일스톤 1.9.252 → 1.9.261 (R217 · 123 main-push · 84 npm · MCP 72 · CLI 59 · UR-0013~0020 소진)
14
+ 2. **AGENTS.md**: UR-0019~0020 테이블 + shell-guard 6 규칙 + require.main 가드 설명 + 마일스톤 1.9.261
15
+
16
+ ### stress-v207 — **20/20 PASS · 100%**
17
+ - 1.9.262 (9): CLAUDE/AGENTS 섹션·path-setup·shell-guard·selftest·마일스톤·UR-0013~0020 소진·stale 해소
18
+ - 성능 (1): cold start avg 410ms
19
+ - 누적 회귀 (10): 1.9.207~261
20
+
21
+ ### 자동 release (124 main-push streak · 85 npm publish streak · R218)
22
+
23
+ 📚 **AI 핸드오프 지침 최신화** — 새 세션 에이전트가 UR-0019~0020·selftest·shell-guard 를 즉시 인지, drift 0.
24
+
25
+ ---
26
+
27
+ ## 1.9.261 — 2026-05-31 — UR-0020 2단계: MCP leerness_shell_guard (72 도구) + selftest 케이스
28
+
29
+ **🐚🔌 1.9.260 shell-guard 를 외부 AI(MCP) + 무결성 검증(selftest)에 통합.**
30
+
31
+ ### 구현
32
+ 1. **MCP 72번째 도구 `leerness_shell_guard`** (71 → 72):
33
+ - 외부 AI(Claude Code 등)가 명령 실행 **전에** `tools/call` 로 셸 호환성 점검
34
+ - 예: `npm run build && npm test` on PowerShell 5.1 → ps5-chain error + `;` 제안
35
+ - 응답: `{ shell, psVersion, issues[], pastSame, pastSimilar, ok }` · 인자 `{ command (required), path? }`
36
+ - 실 stdio JSON-RPC 검증: tools/list 72 + tools/call shell_guard 응답 OK
37
+ 2. **selftest 케이스 +2** (13 → 15):
38
+ - `_shellGuardAnalyze`: PS5.1 `&&` → ps5-chain error · bash `&&` → 문제 없음
39
+ - 코어 무결성 검증에 셸 린터 포함 (CLI + MCP + npm test 게이트 모두 자동 검증)
40
+
41
+ ### stress-v206 — **18/18 PASS · 100%**
42
+ - 1.9.261 (7): VERSION + MCP 72 정의/핸들러 + 실 서버 list/call + selftest 15 케이스
43
+ - 성능 (1): cold start avg 440ms
44
+ - 누적 회귀 (10): 1.9.207~260 + MCP initialize 프로토콜
45
+
46
+ ### 자동 release (123 main-push streak · 84 npm publish streak · R217)
47
+
48
+ 🐚🔌 **shell-guard 3중 노출** — CLI(1.9.260) + MCP 도구(1.9.261) + selftest 케이스. 외부 AI 가 명령 실행 전 셸 실패를 사전 차단.
49
+
50
+ ---
51
+
3
52
  ## 1.9.260 — 2026-05-31 — 🎉 1.9.260 / UR-0020 shell-guard (터미널 셸 호환성 린터 + 실패 메모리)
4
53
 
5
54
  **🐚 사용자 명시 (UR-0020): 터미널 명령 실패를 파악·기록하고 다음 실행 시 셸 호환성(PowerShell 5.1 && 미지원 등)을 참조.**
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.260-green)]() [![tests](https://img.shields.io/badge/e2e-217%2F217-success)]() [![stress](https://img.shields.io/badge/stress--v205-27%2F27-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-71-brightgreen)]() [![cli](https://img.shields.io/badge/CLI_commands-59-brightgreen)]() [![json-fields](https://img.shields.io/badge/JSON_통합-11_필드-blueviolet)]() [![rounds](https://img.shields.io/badge/autonomous_R-216-blueviolet)]() [![main-push](https://img.shields.io/badge/🎉_main--push_streak-122_rounds-success)]() [![npm-streak](https://img.shields.io/badge/🎉_npm--publish-83_streak-success)]() [![encoding](https://img.shields.io/badge/🌐_인코딩보호-Windows%2BPOSIX-blueviolet)]() [![perf](https://img.shields.io/badge/cold_start-368ms-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.262-green)]() [![tests](https://img.shields.io/badge/e2e-217%2F217-success)]() [![stress](https://img.shields.io/badge/stress--v207-20%2F20-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-72-brightgreen)]() [![cli](https://img.shields.io/badge/CLI_commands-59-brightgreen)]() [![json-fields](https://img.shields.io/badge/JSON_통합-11_필드-blueviolet)]() [![rounds](https://img.shields.io/badge/autonomous_R-218-blueviolet)]() [![main-push](https://img.shields.io/badge/🎉_main--push_streak-124_rounds-success)]() [![npm-streak](https://img.shields.io/badge/🎉_npm--publish-85_streak-success)]() [![encoding](https://img.shields.io/badge/🌐_인코딩보호-Windows%2BPOSIX-blueviolet)]() [![perf](https://img.shields.io/badge/cold_start-368ms-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.260 AI Agent Reliability Harness + Sandbox ║
15
+ ║ v1.9.262 AI Agent Reliability Harness + Sandbox ║
16
16
  ║ verify · remember · orchestrate · audit · sandbox · drift ║
17
- 🐚 shell-guard PowerShell 5.1 && 등 셸 실패 예방 (UR-0020)
17
+ 📚 AI 핸드오프 지침 최신화 (1.9.253~261 · R218)
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.260';
10
+ const VERSION = '1.9.262';
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 처리).
@@ -2903,6 +2903,8 @@ function _selfTestCases() {
2903
2903
  { name: '_dirInPath: 정규화 (trailing slash)', run: () => { const sep = process.platform === 'win32' ? ';' : ':'; const old = process.env.PATH; process.env.PATH = '/usr/bin' + sep + '/opt/x/bin'; const r = _dirInPath('/opt/x/bin/') === true && _dirInPath('/no/such') === false; process.env.PATH = old; return r; } },
2904
2904
  { name: '_winPathPsScript: User scope + setx 미사용', run: () => { const ps = _winPathPsScript('C:\\npm'); return /SetEnvironmentVariable\('PATH', \$nu, 'User'\)/.test(ps) && !/setx/i.test(ps); } },
2905
2905
  { name: '_unixPathBlock: 멱등 마커 + export', run: () => { const b = _unixPathBlock('/x/bin'); return b.includes('managed') && /export PATH="\$PATH:\/x\/bin"/.test(b); } },
2906
+ { name: '_shellGuardAnalyze: PS5.1 && → ps5-chain error', run: () => { const r = _shellGuardAnalyze('a && b', { shell: 'powershell', psVersion: '5' }); return r.issues.some(i => i.rule === 'ps5-chain' && i.severity === 'error'); } },
2907
+ { name: '_shellGuardAnalyze: bash && → 문제 없음', run: () => _shellGuardAnalyze('a && b', { shell: 'bash' }).issues.length === 0 },
2906
2908
  { name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
2907
2909
  ];
2908
2910
  }
@@ -16038,7 +16040,8 @@ function mcpServeCmd(root) {
16038
16040
  { name: 'leerness_agent_mode', description: '1.9.239 (사용자 명시 UR-0013) — 자율 모드 전용 통합 명령. start: handoff + drift --auto-fix + session-resume --auto-fix (진입). tick: pulse 한 줄 (매 라운드). stop: session close --auto-apply-delivered --auto-cleanup-branches (마감). 외부 AI 가 자율 라운드 진입/매 라운드/마감을 단일 호출로 수행. 인자: { path?, sub (required: "start"|"tick"|"stop"|"help") }', inputSchema: { type: 'object', properties: { path: { type: 'string' }, sub: { type: 'string', enum: ['start', 'tick', 'stop', 'help'] } }, required: ['sub'] } },
16039
16041
  { name: 'leerness_env_info', description: '1.9.241 (사용자 명시 UR-0014) — 환경 종합 정보 회수. OS / 언어 (LANG, 코드페이지) / 한국어 Windows / 하드웨어 / 터미널 (TTY, PowerShell 버전) / 도구 버전 (git, npm, python). 외부 AI 가 환경 호환성을 미리 인지 → 인코딩 오류 예방. 응답: { os, node, locale, hardware, terminal, tools }. 인자: { path?, encodingCheck? }. encodingCheck: true 시 셸 스크립트 (.ps1/.bat/.cmd/.sh) BOM 없는 비-ASCII 위험 감지', inputSchema: { type: 'object', properties: { path: { type: 'string' }, encodingCheck: { type: 'boolean' } } } },
16040
16042
  { name: 'leerness_api_skill', description: '1.9.245 (사용자 명시 UR-0015) — API 문서·관련링크 자동 캐시. 공식 API 문서 URL을 fetch 하고 1단계 same-domain 관련 링크까지 정리 → .harness/api-skills/<id>.md 저장. 후속 같은 API 관련 작업 시 자동 참조. 응답: list (skills 배열) / show (전체 본문) / match (task 매칭 결과). 인자: { path?, sub ("list"|"show"|"match"|"add"|"drop"), url? (add), id? (show/drop), query? (match), direction? (add: 구현 방향 텍스트) }. 외부 AI가 "이 프로젝트 어떤 API 문서가 정리되어 있나?" / "내 작업과 매칭되는 API skill 있나?" 회수.', inputSchema: { type: 'object', properties: { path: { type: 'string' }, sub: { type: 'string', enum: ['list', 'show', 'match', 'add', 'drop'] }, url: { type: 'string' }, id: { type: 'string' }, query: { type: 'string' }, direction: { type: 'string' } }, required: ['sub'] } },
16041
- { name: 'leerness_selftest', description: '1.9.258/259 — 설치된 leerness 바이너리의 코어 함수(보안 _isSecretKey / 버전 compareVer / 인코딩 _classifyCJK 등) 무결성 자가 검증. 응답: { version, total, pass, fail, ok, results[] }. 외부 AI/CI 가 "이 leerness 설치가 정상인가?(npx 캐시 손상·부분 설치 감지)" 를 1초 내 확인. 인자: 없음.', inputSchema: { type: 'object', properties: {} } }
16043
+ { name: 'leerness_selftest', description: '1.9.258/259 — 설치된 leerness 바이너리의 코어 함수(보안 _isSecretKey / 버전 compareVer / 인코딩 _classifyCJK 등) 무결성 자가 검증. 응답: { version, total, pass, fail, ok, results[] }. 외부 AI/CI 가 "이 leerness 설치가 정상인가?(npx 캐시 손상·부분 설치 감지)" 를 1초 내 확인. 인자: 없음.', inputSchema: { type: 'object', properties: {} } },
16044
+ { name: 'leerness_shell_guard', description: '1.9.260/261 (사용자 명시 UR-0020) — 터미널 명령 셸 호환성 린터. 외부 AI 가 명령을 실행하기 전에 셸 호환성 문제를 사전 점검. 예: Windows PowerShell 5.1 은 && / || 미지원 → A; if ($?) { B } 제안. 6 규칙(ps5-chain/ps-devnull/ps-inline-env/ps-rm-rf/cmd-semicolon/ps-version-unknown) + 과거 실패 회수(.harness/shell-failures.json). 응답: { shell, psVersion, issues[{rule,severity,detail,suggestion}], pastSame, pastSimilar, ok }. 인자: { command (required), path? }. 현재 셸/PS 버전 자동 감지.', inputSchema: { type: 'object', properties: { command: { type: 'string' }, path: { type: 'string' } }, required: ['command'] } }
16042
16045
  ];
16043
16046
 
16044
16047
  function send(obj) {
@@ -16245,6 +16248,10 @@ function mcpServeCmd(root) {
16245
16248
  // 1.9.259 (1.9.258): 코어 함수 무결성 자가 검증
16246
16249
  cliArgs = ['selftest', '--json'];
16247
16250
  break;
16251
+ case 'leerness_shell_guard':
16252
+ // 1.9.261 (1.9.260, UR-0020): 터미널 명령 셸 호환성 린터
16253
+ cliArgs = ['shell-guard', String(args.command || ''), '--path', targetPath, '--json'];
16254
+ break;
16248
16255
  default:
16249
16256
  return send({ jsonrpc: '2.0', id, error: { code: -32601, message: `Unknown tool: ${name}` } });
16250
16257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leerness",
3
- "version": "1.9.260",
3
+ "version": "1.9.262",
4
4
  "description": "Leerness: 비파괴 마이그레이션, 자동 버전 감지·업데이트, 계획/진행/핸드오프 자동화, 게으름·시크릿·인코딩 자동 가드, Claude Code 슬래시 통합을 갖춘 한국어 우선 AI 개발 하네스.",
5
5
  "keywords": [
6
6
  "leerness",