@uzysjung/agent-harness 26.161.0 → 26.162.1

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.
@@ -17,7 +17,7 @@ import {
17
17
  init_esm_shims,
18
18
  residentCost,
19
19
  resolveBundleRoot
20
- } from "./chunk-MBRLCU5O.js";
20
+ } from "./chunk-3G34MEGZ.js";
21
21
 
22
22
  // src/trust-tier-drift.ts
23
23
  init_esm_shims();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uzysjung/agent-harness",
3
- "version": "26.161.0",
3
+ "version": "26.162.1",
4
4
  "description": "Curate vetted AI-coding skills & plugins by your tech stack — install only what you need, across Claude Code, Codex, OpenCode & Antigravity",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -40,7 +40,8 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@clack/prompts": "^1.3.0",
43
- "cac": "^7.0.0"
43
+ "cac": "^7.0.0",
44
+ "smol-toml": "^1.9.0"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@biomejs/biome": "^2.4.13",
@@ -50,26 +50,6 @@ type = "command"
50
50
  timeout = 10
51
51
  async = false
52
52
 
53
- # ============================================================
54
- # MCP Servers — .mcp.json에서 포맷 변환
55
- # 조건부 포함: Track 따라 setup-harness가 추가
56
- # ============================================================
57
-
58
- [mcp_servers.context7]
59
- command = "npx"
60
- args = ["-y", "@upstash/context7-mcp"]
61
-
62
- # github MCP (필요 시 활성화)
63
- # [mcp_servers.github]
64
- # command = "npx"
65
- # args = ["-y", "@modelcontextprotocol/server-github"]
66
- # env = { GITHUB_PERSONAL_ACCESS_TOKEN = "{GITHUB_TOKEN}" }
67
-
68
- # Railway MCP (csr-fastify/csr-fastapi/ssr-*/full 에서만)
69
- # [mcp_servers.railway]
70
- # command = "npx"
71
- # args = ["-y", "railway-mcp-server"]
72
-
73
53
  # ============================================================
74
54
  # Features (본 설치가 사용하는 stable feature 명시)
75
55
  # ============================================================
@@ -80,3 +60,11 @@ plugins = true # stable — plugin 번들 호환
80
60
  tool_search = true # stable
81
61
  skill_mcp_dependency_install = true # skill이 MCP 자동 설치
82
62
  child_agents_md = false # under dev — 본 SPEC 범위 밖
63
+
64
+ # ============================================================
65
+ # MCP Servers — 설치기가 이 아래에 이 프로젝트 트랙의 서버를 붙인다
66
+ # 원천 = templates/mcp.json + templates/track-mcp-map.tsv (Claude .mcp.json 과 같다, #568)
67
+ # ============================================================
68
+ # github MCP 에 토큰을 줄 때 (필요 시 활성화):
69
+ # [mcp_servers.github]
70
+ # env = { GITHUB_PERSONAL_ACCESS_TOKEN = "{GITHUB_TOKEN}" }
@@ -3,7 +3,17 @@
3
3
  # 세션 컨텍스트 출력 + 고아 프로세스 감지
4
4
  set -e
5
5
 
6
- BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
6
+ # git 이 아니면 그렇다고 말한다. 첫 커밋 전에도 `symbolic-ref` 는 브랜치 이름을 낸다
7
+ # (`rev-parse --abbrev-ref HEAD` 는 이때 리터럴 "HEAD" 를 낸다 — #580). 진짜 detached HEAD
8
+ # (커밋이 있고 브랜치가 아닌 커밋을 체크아웃한 상태)만 `symbolic-ref` 가 실패하고, 그때만
9
+ # "detached" 라고 말한다 — git 의 detached HEAD 를 정확히 가리키는 값이라 모델이 체크아웃
10
+ # 복구를 시도할 근거가 실제로 있을 때만 쓴다.
11
+ if ! git rev-parse --git-dir > /dev/null 2>&1; then
12
+ BRANCH="not a git repo"
13
+ else
14
+ BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || echo "")
15
+ BRANCH="${BRANCH:-detached}"
16
+ fi
7
17
 
8
18
  # 1. SPEC 존재 여부 확인
9
19
  SPEC_EXISTS="false"
@@ -94,9 +104,9 @@ fi
94
104
  # `hookSpecificOutput.{additionalContext|initialUserMessage}` 다.
95
105
  # 조용히 버려지는 출력은 컨텍스트 비용이 0 인 대신 기능도 0 이다.
96
106
  if [ "$SPEC_EXISTS" = "true" ]; then
97
- MSG="Session started. Branch: ${BRANCH:-detached}. SPEC exists — read docs/SPEC.md first (Persistent Anchor). Check Change Log and current Phase before starting work.${ORPHAN_NOTE}"
107
+ MSG="Session started. Branch: $BRANCH. SPEC exists — read docs/SPEC.md first (Persistent Anchor). Check Change Log and current Phase before starting work.${ORPHAN_NOTE}"
98
108
  else
99
- MSG="Session started. Branch: ${BRANCH:-detached}. No SPEC found.${ORPHAN_NOTE}"
109
+ MSG="Session started. Branch: $BRANCH. No SPEC found.${ORPHAN_NOTE}"
100
110
  fi
101
111
 
102
112
  # JSON 문자열 이스케이프 — 백슬래시 먼저, 그 다음 따옴표(순서를 바꾸면 이중 이스케이프된다).
@@ -17,7 +17,8 @@
17
17
  # ┌ pattern 모드 — "이 패턴이 없다"
18
18
  # │ 대조군 = 합성한 알려진 양성(canary). 패턴이 그것을 물어야 부재 결과를 신뢰한다.
19
19
  # │
20
- # │ check-absence.sh --canary '<알려진 양성>' [-i] '<ERE 패턴>' <경로>...
20
+ # │ check-absence.sh --canary '<알려진 양성>' [-i] [--] '<ERE 패턴>' <경로>...
21
+ # │ ('-' 로 시작하는 패턴은 앞에 -- 를 둔다: ... --canary 'use --old' -- '--old' src)
21
22
  # │ 예: ... --canary 'OldName' 'oldname|legacy_prefix' dist src templates
22
23
  # │
23
24
  # └ command 모드 — "이 명령이 안 된다 / 이 기능이 없다"
@@ -46,7 +47,7 @@ set -u
46
47
  usage() {
47
48
  cat >&2 <<'USAGE'
48
49
  usage:
49
- pattern 모드: check-absence.sh --canary <알려진-양성> [-i] <ERE-패턴> <경로>...
50
+ pattern 모드: check-absence.sh --canary <알려진-양성> [-i] [--] <ERE-패턴> <경로>... ('-' 로 시작하는 패턴은 앞에 --)
50
51
  command 모드: check-absence.sh --control <대조-명령> --subject <대상-명령> [--control-exit N]
51
52
 
52
53
  두 모드 모두 대조군이 필수다. 탐지기(또는 절차)가 실제로 무는지 보이지 않으면
@@ -161,7 +162,7 @@ PATTERN="$1"; shift
161
162
  # 1) 탐지기 자기검증
162
163
  printf '%s\n' "$CANARY" > "$WORK_DIR/canary.txt"
163
164
 
164
- if ! grep -rIqE ${IGNORE_CASE:+"$IGNORE_CASE"} "$PATTERN" "$WORK_DIR/canary.txt" 2>"$WORK_DIR/probe.err"; then
165
+ if ! grep -rIqE ${IGNORE_CASE:+"$IGNORE_CASE"} -e "$PATTERN" "$WORK_DIR/canary.txt" 2>"$WORK_DIR/probe.err"; then
165
166
  echo "FAIL(2): 탐지기 자기검증 실패 — canary '$CANARY' 가 패턴 '$PATTERN' 에 안 잡힌다." >&2
166
167
  echo " 이 상태의 '매치 없음'은 부재의 증거가 아니다. 패턴이나 canary 를 고쳐라." >&2
167
168
  [ -s "$WORK_DIR/probe.err" ] && sed 's/^/ grep: /' "$WORK_DIR/probe.err" >&2
@@ -182,7 +183,7 @@ if [ "${#PATHS[@]}" -eq 0 ]; then
182
183
  exit 2
183
184
  fi
184
185
 
185
- grep -rInIE ${IGNORE_CASE:+"$IGNORE_CASE"} "$PATTERN" "${PATHS[@]}" >"$OUT" 2>"$ERR"
186
+ grep -rInIE ${IGNORE_CASE:+"$IGNORE_CASE"} -e "$PATTERN" "${PATHS[@]}" >"$OUT" 2>"$ERR"
186
187
  GREP_RC=$?
187
188
 
188
189
  if [ "$GREP_RC" -ge 2 ]; then