leerness 1.9.265 → 1.9.266
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 +19 -0
- package/README.md +3 -3
- package/bin/harness.js +51 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.266 — 2026-06-01 — UR-0021 2단계: dispatch 슬래시 명령 자동 주입 + handoff 노출 + MCP 73
|
|
4
|
+
|
|
5
|
+
**🤖 서브에이전트 dispatch/handoff 에 각 에이전트 슬래시 명령을 자동 노출 — "알맞은 슬래시 명령으로 작업" (사용자 명시 UR-0021 2단계).**
|
|
6
|
+
|
|
7
|
+
### 배경
|
|
8
|
+
1단계(1.9.265)에서 레지스트리·CLI·`_agentSlashHint` 헬퍼를 구축. 2단계는 사용자 요구 핵심 — "서브에이전트 호출 시 각 에이전트에 알맞는 슬래시 명령이 적절히 사용" — 을 실제 dispatch 경로 + 세션 시작(handoff)에 연결.
|
|
9
|
+
|
|
10
|
+
### 구현
|
|
11
|
+
1. **`agents dispatch <task> --to <id>` 슬래시 힌트 주입** — 실행 명령 아래에 대상 에이전트 슬래시 명령 노출 (subcommand 타입은 "하위명령" 라벨).
|
|
12
|
+
2. **`agents multi` 슬래시 힌트** — 각 에이전트 명령마다 `🤖 슬래시: ...` 한 줄 + `--json` 에 `slashCommands` 필드 (`{ <id>: { invoke, commands[] } }`).
|
|
13
|
+
3. **handoff 본문 활성 에이전트 슬래시 섹션** — env flag(`LEERNESS_ENABLE_*`) 활성 에이전트별 슬래시 명령 요약. **spawn 없이 env 점검만** (handoff 속도 보존, 오버헤드 측정값 ~0). 활성 0이면 미노출.
|
|
14
|
+
4. **MCP 73번째 도구 `leerness_slash_commands`** — 외부 AI(메인)가 sub-agent 호출 전 각 에이전트 슬래시 명령 회수. 인자 `{ path?, agent? }`.
|
|
15
|
+
5. **grok 범위 메모**: grok 은 슬래시 레지스트리에 포함(CLI/MCP/hint 조회 가능)되나, 아직 `EXTERNAL_AGENTS` 정식 provider 는 아님 → dispatch/handoff 활성 목록은 claude/codex/agy/copilot/ollama 기준. grok 정식 provider 승격(install 흐름 1~5 선택지 확장 포함)은 별도 후속 task.
|
|
16
|
+
|
|
17
|
+
### stress-v211 — **21/21 PASS · 100%**
|
|
18
|
+
- 1.9.266 (8): MCP 73·handoff 노출/비노출·MCP round-trip(grok/전체)·dispatch·multi·json 주입 경로·hint
|
|
19
|
+
- 성능 (2): cold start + handoff 활성 섹션 오버헤드 측정(WITH−WITHOUT delta, ~0)
|
|
20
|
+
- 누적 회귀 (11): 1.9.207~265 (slash-commands CLI·레지스트리·record·shellGuard JSON·handoff 12필드·selftest 17·require.main·agy/gemini·ps5-chain·_isSecretKey·CJK)
|
|
21
|
+
|
|
3
22
|
## 1.9.265 — 2026-06-01 — UR-0021 1단계: CLI 에이전트 슬래시 명령어 레지스트리 (claude/codex/agy/grok/copilot)
|
|
4
23
|
|
|
5
24
|
**🤖 각 CLI AI 에이전트의 슬래시 명령어를 큐레이션·기록하고, 서브에이전트 호출 시 알맞게 참조 (사용자 명시 UR-0021 1단계).**
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **AI 코딩 에이전트의 거짓 완료·중복·망각·충돌을 막아주는 검수·기억·협업 CLI 하네스.**
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/leerness) [](https://www.npmjs.com/package/leerness) []() []() []() []() []() []() []() []() []() []() []() []()
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
╔══════════════════════════════════════════════════════════════╗
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
║ ██║ ██╔══╝ ██╔══╝ ██╔══██╗██║╚██╗██║██╔══╝ ╚════██║ ║
|
|
13
13
|
║ ███████╗███████╗███████╗██║ ██║██║ ╚████║███████╗███████║ ║
|
|
14
14
|
║ ╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝ ║
|
|
15
|
-
║ v1.9.
|
|
15
|
+
║ v1.9.266 AI Agent Reliability Harness + Sandbox ║
|
|
16
16
|
║ verify · remember · orchestrate · audit · sandbox · drift ║
|
|
17
|
-
║ 🤖
|
|
17
|
+
║ 🤖 dispatch 슬래시 주입 + MCP 73 (UR-0021 2단계 · R222) ║
|
|
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.
|
|
10
|
+
const VERSION = '1.9.266';
|
|
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 처리).
|
|
@@ -7956,6 +7956,31 @@ function handoff(root) {
|
|
|
7956
7956
|
}
|
|
7957
7957
|
} catch {}
|
|
7958
7958
|
|
|
7959
|
+
// 1.9.266 (UR-0021 2단계): 활성(env 활성화) CLI 에이전트별 슬래시 명령 요약 — sub-agent dispatch 시 알맞은 슬래시 참조
|
|
7960
|
+
// spawn 없이 env flag 만 점검 (handoff 속도 보존). 활성 에이전트 0 이면 미노출.
|
|
7961
|
+
try {
|
|
7962
|
+
const enabledAgents = EXTERNAL_AGENTS.filter(a => {
|
|
7963
|
+
const v = process.env[a.envFlag];
|
|
7964
|
+
return v && v !== '0' && String(v).toLowerCase() !== 'false';
|
|
7965
|
+
});
|
|
7966
|
+
if (enabledAgents.length > 0) {
|
|
7967
|
+
const isTtyS = process.stdout && process.stdout.isTTY;
|
|
7968
|
+
const cyS = s => isTtyS ? `\x1b[36m${s}\x1b[0m` : s;
|
|
7969
|
+
const dmS = s => isTtyS ? `\x1b[2m${s}\x1b[0m` : s;
|
|
7970
|
+
log('');
|
|
7971
|
+
log(cyS(`## 🤖 CLI 에이전트 슬래시 명령 (1.9.265~266, UR-0021)`));
|
|
7972
|
+
log(dmS(` 활성 에이전트 ${enabledAgents.length}개 — sub-agent 호출 시 각자 슬래시 명령 사용:`));
|
|
7973
|
+
for (const a of enabledAgents) {
|
|
7974
|
+
const hint = _agentSlashHint(root, a.id);
|
|
7975
|
+
if (hint && hint.commands.length) {
|
|
7976
|
+
const top = hint.commands.slice(0, 8).map(c => c.cmd).join(' ');
|
|
7977
|
+
log(dmS(` ${a.id.padEnd(8)} ${top}${hint.invoke === 'subcommand' ? ' (하위명령)' : ''}`));
|
|
7978
|
+
}
|
|
7979
|
+
}
|
|
7980
|
+
log(dmS(` → 전체/기록/최신화: leerness slash-commands [agent] [--record]`));
|
|
7981
|
+
}
|
|
7982
|
+
} catch {}
|
|
7983
|
+
|
|
7959
7984
|
// 1.9.245: API skill cache 자동 참조 (사용자 명시 UR-0015)
|
|
7960
7985
|
// 현재 task 키워드 기반으로 .harness/api-skills/ 매칭 → 사용자가 정리해둔 API 문서 자동 노출
|
|
7961
7986
|
try {
|
|
@@ -11312,7 +11337,9 @@ function agentsCmd(root, sub, ...args) {
|
|
|
11312
11337
|
log(JSON.stringify({
|
|
11313
11338
|
task, count: ready.length,
|
|
11314
11339
|
agents: ready.map(x => ({ id: x.def.id, version: x.status.version })),
|
|
11315
|
-
commands: ready.map(x => _dispatchCommand(x.def.id, task, writeMode))
|
|
11340
|
+
commands: ready.map(x => _dispatchCommand(x.def.id, task, writeMode)),
|
|
11341
|
+
// 1.9.266 (UR-0021 2단계): 각 에이전트 슬래시 명령 힌트 — sub-agent 가 알맞은 슬래시 사용
|
|
11342
|
+
slashCommands: ready.reduce((acc, x) => { const h = _agentSlashHint(root, x.def.id); if (h) acc[x.def.id] = { invoke: h.invoke, commands: h.commands.map(c => c.cmd) }; return acc; }, {})
|
|
11316
11343
|
}, null, 2));
|
|
11317
11344
|
return;
|
|
11318
11345
|
}
|
|
@@ -11328,6 +11355,11 @@ function agentsCmd(root, sub, ...args) {
|
|
|
11328
11355
|
log('```sh');
|
|
11329
11356
|
log(_dispatchCommand(def.id, task, writeMode));
|
|
11330
11357
|
log('```');
|
|
11358
|
+
// 1.9.266 (UR-0021 2단계): 에이전트별 슬래시 명령 힌트
|
|
11359
|
+
try {
|
|
11360
|
+
const hint = _agentSlashHint(root, def.id);
|
|
11361
|
+
if (hint && hint.commands.length) log(` 🤖 슬래시: ${hint.commands.slice(0, 8).map(c => c.cmd).join(' ')}${hint.invoke === 'subcommand' ? ' (하위명령)' : ''}`);
|
|
11362
|
+
} catch {}
|
|
11331
11363
|
log('');
|
|
11332
11364
|
}
|
|
11333
11365
|
log('## 정책 (1.9.152 / 1.9.156)');
|
|
@@ -11388,6 +11420,17 @@ function agentsCmd(root, sub, ...args) {
|
|
|
11388
11420
|
} else if (target === 'copilot') {
|
|
11389
11421
|
log(`gh copilot suggest "${q}"`);
|
|
11390
11422
|
}
|
|
11423
|
+
// 1.9.266 (UR-0021 2단계): 대상 에이전트의 슬래시 명령 힌트 — sub-agent 작업 시 알맞은 슬래시 명령 참조
|
|
11424
|
+
try {
|
|
11425
|
+
const hint = _agentSlashHint(root, target);
|
|
11426
|
+
if (hint && hint.commands.length) {
|
|
11427
|
+
log('');
|
|
11428
|
+
log(`## 🤖 ${target} 슬래시 명령 (1.9.265, UR-0021)`);
|
|
11429
|
+
if (hint.invoke === 'subcommand') log(` ※ 슬래시가 아닌 하위명령: ${hint.commands.map(c => c.cmd).join(' / ')}`);
|
|
11430
|
+
else log(` 세션 내 사용 가능: ${hint.commands.slice(0, 10).map(c => c.cmd).join(' ')}`);
|
|
11431
|
+
log(` → 전체/기록: leerness slash-commands ${target} [--record]`);
|
|
11432
|
+
}
|
|
11433
|
+
} catch {}
|
|
11391
11434
|
log('');
|
|
11392
11435
|
log(`## 정책 (1.9.36)`);
|
|
11393
11436
|
log(` - leerness는 외부 CLI를 자동 호출하지 않음 (사용자 명시적 실행)`);
|
|
@@ -16308,7 +16351,8 @@ function mcpServeCmd(root) {
|
|
|
16308
16351
|
{ 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' } } } },
|
|
16309
16352
|
{ 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'] } },
|
|
16310
16353
|
{ 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: {} } },
|
|
16311
|
-
{ 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'] } }
|
|
16354
|
+
{ 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'] } },
|
|
16355
|
+
{ name: 'leerness_slash_commands', description: '1.9.265/266 (사용자 명시 UR-0021) — CLI AI 에이전트별 슬래시 명령어 레지스트리. 외부 AI(메인)가 sub-agent(codex/agy/claude/grok/copilot)를 호출할 때 각 에이전트에 알맞는 슬래시 명령을 참조. 빌트인 + 사용자 .harness/agent-slash-commands.json override 병합. 응답: { agents: { <id>: { label, asOf, invoke(slash|subcommand), note, source, count, commands[{cmd,desc}] } } }. 인자: { path?, agent? (생략 시 전체) }. agent 지정 시 단일.', inputSchema: { type: 'object', properties: { path: { type: 'string' }, agent: { type: 'string' } } } }
|
|
16312
16356
|
];
|
|
16313
16357
|
|
|
16314
16358
|
function send(obj) {
|
|
@@ -16519,6 +16563,10 @@ function mcpServeCmd(root) {
|
|
|
16519
16563
|
// 1.9.261 (1.9.260, UR-0020): 터미널 명령 셸 호환성 린터
|
|
16520
16564
|
cliArgs = ['shell-guard', String(args.command || ''), '--path', targetPath, '--json'];
|
|
16521
16565
|
break;
|
|
16566
|
+
case 'leerness_slash_commands':
|
|
16567
|
+
// 1.9.266 (1.9.265, UR-0021): CLI 에이전트 슬래시 명령 레지스트리
|
|
16568
|
+
cliArgs = ['slash-commands', ...(args.agent ? [String(args.agent)] : []), '--path', targetPath, '--json'];
|
|
16569
|
+
break;
|
|
16522
16570
|
default:
|
|
16523
16571
|
return send({ jsonrpc: '2.0', id, error: { code: -32601, message: `Unknown tool: ${name}` } });
|
|
16524
16572
|
}
|