claude-code-kr 0.3.13 โ†’ 0.3.15

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/bin/cc-kr.js CHANGED
@@ -59,6 +59,44 @@ switch (cmd) {
59
59
  console.log(`๐Ÿ‡ฐ๐Ÿ‡ท ํŒจ์น˜: ${s.patched ? '์ ์šฉ๋จ โœ…' : '๋ฏธ์ ์šฉ โŒ'}`);
60
60
  console.log(`๐Ÿ“ฆ cckr ๋ฒ„์ „: ${pkg.version}`);
61
61
  console.log(`๐Ÿ”ท CC ๋ฒ„์ „: ${s.ccVersion || '์•Œ ์ˆ˜ ์—†์Œ'}`);
62
+
63
+ // ํ˜„์žฌ ์„ธ์…˜์˜ in-memory ๋ฒ„์ „
64
+ // !cckr status: claude (C) โ†’ bash (PPID=C) โ†’ node (PPID=bash)
65
+ // ์„ธ์…˜ ํŒŒ์ผ์€ claude PID๋กœ ์ €์žฅ๋˜๋ฏ€๋กœ grandparent๋ฅผ ์ฐพ์•„์•ผ ํ•จ
66
+ function getGrandparentPid(pid) {
67
+ try {
68
+ if (process.platform === 'linux') {
69
+ const stat = fs.readFileSync(`/proc/${pid}/status`, 'utf8');
70
+ const m = stat.match(/^PPid:\s*(\d+)/m);
71
+ return m ? m[1] : null;
72
+ } else if (process.platform === 'darwin') {
73
+ return execSync(`ps -o ppid= -p ${pid}`, { encoding: 'utf8' }).trim();
74
+ }
75
+ } catch {}
76
+ return null;
77
+ }
78
+ try {
79
+ // process.ppid (bash) ์™€ grandparent (claude) ๋‘˜ ๋‹ค ์‹œ๋„
80
+ const candidates = [process.ppid.toString()];
81
+ const grand = getGrandparentPid(process.ppid);
82
+ if (grand) candidates.push(grand);
83
+
84
+ for (const pid of candidates) {
85
+ const sessionFile = `/tmp/cckr-session-${pid}.json`;
86
+ if (fs.existsSync(sessionFile)) {
87
+ const session = JSON.parse(fs.readFileSync(sessionFile, 'utf8'));
88
+ const inSession = session.sessionCckrVersion;
89
+ const installed = pkg.version;
90
+ if (inSession === installed) {
91
+ console.log(`๐ŸŽฏ ์ด ์„ธ์…˜: cckr ${inSession} (๋””์Šคํฌ์™€ ๋™์ผ)`);
92
+ } else {
93
+ console.log(`๐ŸŽฏ ์ด ์„ธ์…˜: cckr ${inSession} โš ๏ธ (๋””์Šคํฌ: ${installed} โ€” ์ƒˆ ์„ธ์…˜ ์‹œ์ž‘ ์‹œ ๋ณ€๊ฒฝ ์ ์šฉ)`);
94
+ }
95
+ break;
96
+ }
97
+ }
98
+ } catch {}
99
+
62
100
  if (!s.patched) {
63
101
  const sudo = needsSudo() ? 'sudo ' : '';
64
102
  console.log('\n๐Ÿ‘‰ ํŒจ์น˜ ์ ์šฉ:');
@@ -3,10 +3,4 @@ description: cckr ํ•œ๊ธ€ ํŒจ์น˜ ๋ฒ„์ „ ํ™•์ธ
3
3
  ---
4
4
  <!-- managed-by: claude-code-kr -->
5
5
 
6
- ์ด ์„ธ์…˜์— ์ ์šฉ๋œ cckr ๋ฒ„์ „๊ณผ ๋””์Šคํฌ ์ƒํƒœ๋ฅผ ํ•จ๊ป˜ ๋ณด์—ฌ์ค˜. ๋‹ค์Œ bash ํ•œ ๋ฒˆ๋งŒ ์‹คํ–‰ํ•˜๊ณ  ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ์ถœ๋ ฅ:
7
-
8
- ```bash
9
- echo "=== ์ด ์„ธ์…˜ ==="; cat /tmp/cckr-session-$PPID.json 2>/dev/null || echo "(์„ธ์…˜ ์ •๋ณด ์—†์Œ โ€” ์ƒˆ ์„ธ์…˜์„ ์‹œ์ž‘ํ•˜์„ธ์š”)"; echo ""; echo "=== ๋””์Šคํฌ (ํ˜„์žฌ cli.js) ==="; cckr status
10
- ```
11
-
12
- ์ถ”๊ฐ€ ํ•ด์„/์š”์•ฝ ์—†์ด ์ถœ๋ ฅ๋งŒ ๊ทธ๋Œ€๋กœ.
6
+ `cckr status` ๋ช…๋ น์„ ์‹คํ–‰ํ•ด์„œ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋ณด์—ฌ์ค˜. ์ถ”๊ฐ€ ํ•ด์„์ด๋‚˜ ์š”์•ฝ ์—†์ด ์ถœ๋ ฅ๋งŒ.
package/lib/patcher.js CHANGED
@@ -120,17 +120,8 @@ function apply(cliJs, { force = false } = {}) {
120
120
  const markerPath = cliJs + '.cckr';
121
121
  const ccVersion = getCliVersion(cliJs);
122
122
 
123
- // ๋งˆ์ปค ์ฒดํฌ โ€” CC ๋ฒ„์ „ + cckr ๋ฒ„์ „์ด ๊ฐ™์œผ๋ฉด ์Šคํ‚ต
124
- if (!force && fs.existsSync(markerPath)) {
125
- try {
126
- const marker = JSON.parse(fs.readFileSync(markerPath, 'utf8'));
127
- if (marker.ccVersion === ccVersion && marker.cckrVersion === pkg.version) {
128
- return { ok: true, skipped: true, ccVersion, testedCcVersion: TESTED_CC_VERSION };
129
- }
130
- } catch {}
131
- }
132
-
133
- // ์„ธ์…˜ ์‹œ์ž‘ ์‹œ์  ์บก์ฒ˜ โ€” SessionStart hook์ด CCKR_SESSION_PPID env๋กœ ํ˜ธ์ถœ
123
+ // ์„ธ์…˜ ์‹œ์ž‘ ์‹œ์  ์บก์ฒ˜ โ€” ๋งˆ์ปค ์Šคํ‚ต๋ณด๋‹ค ๋จผ์ € (์Šคํ‚ต๋ผ๋„ ์„ธ์…˜ ์ •๋ณด๋Š” ํ•ญ์ƒ ๊ธฐ๋ก)
124
+ // SessionStart hook์ด CCKR_SESSION_PPID env๋กœ ํ˜ธ์ถœ
134
125
  // ํŒจ์น˜ ์ง์ „์˜ marker = ์ด ์„ธ์…˜์ด ๋ฉ”๋ชจ๋ฆฌ์— ๋กœ๋“œํ•œ cli.js ๋ฒ„์ „
135
126
  const sessionPpid = process.env.CCKR_SESSION_PPID;
136
127
  if (sessionPpid && /^\d+$/.test(sessionPpid)) {
@@ -161,6 +152,16 @@ function apply(cliJs, { force = false } = {}) {
161
152
  } catch {}
162
153
  }
163
154
 
155
+ // ๋งˆ์ปค ์ฒดํฌ โ€” CC ๋ฒ„์ „ + cckr ๋ฒ„์ „์ด ๊ฐ™์œผ๋ฉด ์Šคํ‚ต
156
+ if (!force && fs.existsSync(markerPath)) {
157
+ try {
158
+ const marker = JSON.parse(fs.readFileSync(markerPath, 'utf8'));
159
+ if (marker.ccVersion === ccVersion && marker.cckrVersion === pkg.version) {
160
+ return { ok: true, skipped: true, ccVersion, testedCcVersion: TESTED_CC_VERSION };
161
+ }
162
+ } catch {}
163
+ }
164
+
164
165
  const bakPath = cliJs + '.bak';
165
166
 
166
167
  // ๋ฐฑ์—… ์ƒ์„ฑ ๋˜๋Š” ๋ฐฑ์—…์—์„œ ๋ณต์› (์ค‘๋ณต ํŒจ์น˜ ๋ฐฉ์ง€)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-kr",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "Claude Code ํ•œ๊ธ€ ํŒจ์น˜ CLI โ€” /btw โ†’ /๊ทผ๋ฐ, /help โ†’ /๋„์›€, /compact โ†’ /์••์ถ•",
5
5
  "main": "./index.js",
6
6
  "bin": {