claude-token-saver 3.42.1 → 3.42.3

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/README.ko.md CHANGED
@@ -25,6 +25,8 @@
25
25
 
26
26
  ```bash
27
27
  npm i -g sprag-cli # or: npm i -g claude-token-saver (same package, old name)
28
+ # already have claude-token-saver? switching names needs a swap (same bins):
29
+ # npm uninstall -g claude-token-saver && npm i -g sprag-cli
28
30
  ```
29
31
 
30
32
  숫자 네 개가 이 도구의 전부입니다.
package/README.md CHANGED
@@ -25,6 +25,8 @@
25
25
 
26
26
  ```bash
27
27
  npm i -g sprag-cli # or: npm i -g claude-token-saver (same package, old name)
28
+ # already have claude-token-saver? switching names needs a swap (same bins):
29
+ # npm uninstall -g claude-token-saver && npm i -g sprag-cli
28
30
  ```
29
31
 
30
32
  Four numbers are the whole pitch.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-token-saver",
3
- "version": "3.42.1",
3
+ "version": "3.42.3",
4
4
  "description": "Legacy name of sprag-cli (Sprag) - same tool, kept publishing so existing installs stay current. Prefer: npm i -g sprag-cli",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cohesion.js CHANGED
@@ -63,7 +63,7 @@ export async function cohesionInjection({ cfg = loadConfig() } = {}) {
63
63
  if (!text) return null;
64
64
  return [
65
65
  '[sprag cohesion] Follow this guidance for English prose in this session.',
66
- 'The user enabled it in claude-token-saver.',
66
+ 'The user enabled it in sprag.',
67
67
  '',
68
68
  text,
69
69
  ].join('\n');
@@ -4,8 +4,8 @@
4
4
  * session can pick up where this one stopped. Pairs with the cap-warn chip:
5
5
  * when statusline shows 🚨 5H 90%+, run this to back up state before the cap
6
6
  * hits.
7
- * claude-token-saver handoff # write to cwd
8
- * claude-token-saver handoff --cwd PATH # custom directory
7
+ * sprag handoff # write to cwd
8
+ * sprag handoff --cwd PATH # custom directory
9
9
  */
10
10
 
11
11
  import { readStdinJson, extractCaps } from '../stdin-payload.js';
@@ -2,9 +2,9 @@
2
2
  * Subcommand: history — print recent warning transitions captured by the
3
3
  * statusline. One markdown file per day, persisted under the platform-
4
4
  * specific user-data dir.
5
- * claude-token-saver history # last 7 days
6
- * claude-token-saver history --days 30 # custom window
7
- * claude-token-saver history --list # just list available dates
5
+ * sprag history # last 7 days
6
+ * sprag history --days 30 # custom window
7
+ * sprag history --list # just list available dates
8
8
  */
9
9
 
10
10
 
@@ -57,8 +57,8 @@ export async function run({ hasFlag, version }) {
57
57
  ? `새 버전이 있습니다: v${version} → ${s.latest}`
58
58
  : `Update available: v${version} → ${s.latest}`);
59
59
  console.log(lang === 'ko'
60
- ? `업그레이드: ${upgradeCommand()} (또는 claude-token-saver upgrade)`
61
- : `Upgrade with: ${upgradeCommand()} (or: claude-token-saver upgrade)`);
60
+ ? `업그레이드: ${upgradeCommand()} (또는 sprag upgrade)`
61
+ : `Upgrade with: ${upgradeCommand()} (or: sprag upgrade)`);
62
62
  if (s.dismissed) {
63
63
  console.log(lang === 'ko'
64
64
  ? '이 버전은 사용자가 한 번 넘긴 상태라, 세션 시작 시에는 다시 묻지 않습니다.'
@@ -2,8 +2,8 @@
2
2
  * Subcommand: upgrade — install the latest release with the package manager
3
3
  * that put this copy on disk.
4
4
  *
5
- * claude-token-saver upgrade # refresh the check, then install
6
- * claude-token-saver upgrade --print # show the command, run nothing
5
+ * sprag upgrade # refresh the check, then install
6
+ * sprag upgrade --print # show the command, run nothing
7
7
  *
8
8
  * This is the command the model runs after the user says yes to the
9
9
  * session-start offer, so it prints the exact command it is about to execute
@@ -63,6 +63,6 @@ export async function run({ hasFlag, version }) {
63
63
  // the statusline chip clears on the next render instead of lingering.
64
64
  await refreshUpdateState(s.latest);
65
65
  console.log(lang === 'ko'
66
- ? `설치가 끝났습니다. 새 셸에서 claude-token-saver --version 으로 ${s.latest} 인지 확인하십시오.`
67
- : `Done. In a fresh shell, run claude-token-saver --version to confirm ${s.latest}.`);
66
+ ? `설치가 끝났습니다. 새 셸에서 sprag --version 으로 ${s.latest} 인지 확인하십시오.`
67
+ : `Done. In a fresh shell, run sprag --version to confirm ${s.latest}.`);
68
68
  }
@@ -49,7 +49,7 @@ export const MODEL_RATCHET_IMPORT_RE = /^@(?:~\/\.claude|\.claude)\/ratchet-mode
49
49
  export function harnessClaudeMdBlock(scope = 'project') {
50
50
  const sections = HARNESS_SECTIONS.map((s) => s.heading).join('\n\n... (see full block below)');
51
51
  return `${HARNESS_BLOCK_BEGIN}
52
- ## 🅷 Harness Rules (claude-token-saver)
52
+ ## 🅷 Harness Rules (sprag)
53
53
 
54
54
  이 섹션은 \`sprag harness init\`이 생성합니다. 5가지 원칙 모두를
55
55
  지키면 statusline에 \`🅷 5/5\`로 표시되고, 빠진 게 있으면 \`🅷 3/5\` 식으로
@@ -59,7 +59,7 @@ export function harnessClaudeMdBlock(scope = 'project') {
59
59
  ${HARNESS_SECTIONS[0].heading}
60
60
  - 같은 에러·오해·반복 작업이 한 번 더 발생하면 즉시 \`.claude/ratchet.md\`에
61
61
  "조건 → 행동" 한 줄로 룰 추가.
62
- - claude-token-saver가 후보를 감지하면 statusline에 \`🅷⚠ ratchet?\`로 알림.
62
+ - sprag가 후보를 감지하면 statusline에 \`🅷⚠ ratchet?\`로 알림.
63
63
  \`sprag harness promote "<rule>" --project|--global\`로 승인.
64
64
  - **scope는 항상 사용자에게 먼저 물어볼 것** — 프로젝트 한정이면 \`--project\`,
65
65
  도구·환경 일반 룰이면 \`--global\`(\`~/.claude/ratchet.md\`). Bash 환경은
@@ -69,7 +69,7 @@ ${HARNESS_SECTIONS[0].heading}
69
69
  지우면 ratchet.md는 컨텍스트에 들어오지 않으니 지우지 말 것.
70
70
  - **모델 피팅 랫쳇**: \`.claude/ratchet-model.md\`(프로젝트)와
71
71
  \`~/.claude/ratchet-model.md\`(글로벌)에 있는 티어 위임 룰도 ratchet.md와
72
- 동일하게 따를 것. 이 파일은 claude-token-saver가 로그 기반으로 자동
72
+ 동일하게 따를 것. 이 파일은 sprag가 로그 기반으로 자동
73
73
  생성·갱신하므로 직접 수정하지 말 것 (관리: \`route-scan rules\`).
74
74
 
75
75
  ${HARNESS_SECTIONS[1].heading}
@@ -123,7 +123,7 @@ ${HARNESS_BLOCK_END}
123
123
  }
124
124
 
125
125
  export function harnessRatchetMdInitial() {
126
- return `# Ratchet Rules (auto-grown by claude-token-saver)
126
+ return `# Ratchet Rules (auto-grown by sprag)
127
127
 
128
128
  같은 실수가 두 번 발생하면 여기에 한 줄 추가됩니다. 형식: "YYYY-MM-DD: <조건> → <행동>".
129
129
 
@@ -181,7 +181,7 @@ export function koreanStyleInjection({ cfg = loadConfig() } = {}) {
181
181
  if (!text) return null;
182
182
  return [
183
183
  '[sprag korean-style] 이 세션에서 한국어를 출력할 때는 아래 지침을 따르십시오.',
184
- '이 지침은 사용자가 claude-token-saver에 설정한 것입니다.',
184
+ '이 지침은 사용자가 sprag에 설정한 것입니다.',
185
185
  ...koreanScopeLines(cfg),
186
186
  '표기 규칙(예외 없이 적용): 도구 호출 인자에 한국어를 비롯한 비ASCII 문자열을 담을 때에는 반드시 리터럴 UTF-8로 작성하고, \\uXXXX 유니코드 이스케이프로는 절대 작성하지 마십시오. 이스케이프로 작성하면 글자가 깨진 채 파일에 기록되는 사례가 자주 발생합니다.',
187
187
  `(출처: ${KOREAN_STYLE_SOURCE})`,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * update-check — "is there a newer claude-token-saver?", answered without ever
2
+ * update-check — "is there a newer sprag?", answered without ever
3
3
  * blocking a render.
4
4
  *
5
5
  * The statusline command runs every ~300ms, so a network call on that path is