ccs-cloner 0.3.4 → 0.3.5

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.
Files changed (3) hide show
  1. package/README.md +3 -7
  2. package/dist/cli.js +24 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -62,6 +62,8 @@ Tool removal uses presets that define how many "turns with tools" to keep and ho
62
62
  | `aggressive` | 10 turns | 50% | 5 truncated, 5 full fidelity |
63
63
  | `extreme` | 0 | - | All tools removed |
64
64
 
65
+ Using `--strip-tools` or `--strip-tools=default` applies your configured default preset (initially `default`, configurable via `defaultPreset` in config).
66
+
65
67
  ### How Presets Work
66
68
 
67
69
  Tool removal targets **turns that have tool calls**, not all turns. This ensures consistent behavior across multiple clones of the same session.
@@ -114,12 +116,6 @@ ccs-cloner clone <sessionId> [options]
114
116
  | `--json` | Output result as JSON |
115
117
  | `--verbose, -v` | Verbose output with statistics |
116
118
 
117
- **Known Issue:** `--strip-tools` consumes the next flag as its value. Put other flags BEFORE it:
118
- ```bash
119
- ccs-cloner clone <id> --dsp --strip-tools # works
120
- ccs-cloner clone <id> --strip-tools --dsp # fails
121
- ```
122
-
123
119
  **Examples:**
124
120
 
125
121
  ```bash
@@ -133,7 +129,7 @@ ccs-cloner clone abc-123-def --strip-tools=aggressive
133
129
  ccs-cloner clone abc-123-def --strip-tools=extreme
134
130
 
135
131
  # Include --dangerously-skip-permissions in resume command
136
- ccs-cloner clone abc-123-def --dsp --strip-tools
132
+ ccs-cloner clone abc-123-def --strip-tools --dsp
137
133
 
138
134
  # Custom output location
139
135
  ccs-cloner clone abc-123-def --strip-tools -o ./backup.jsonl
package/dist/cli.js CHANGED
@@ -12083,6 +12083,25 @@ async function runMain(cmd, opts = {}) {
12083
12083
  }
12084
12084
  }
12085
12085
 
12086
+ // src/cli/normalize-args.ts
12087
+ function normalizeStripToolsArg(args) {
12088
+ const idx = args.indexOf("--strip-tools");
12089
+ if (idx === -1) {
12090
+ return args;
12091
+ }
12092
+ if (args[idx].includes("=")) {
12093
+ return args;
12094
+ }
12095
+ const nextArg = args[idx + 1];
12096
+ const nextIsFlag = !nextArg || nextArg.startsWith("-");
12097
+ if (nextIsFlag) {
12098
+ const normalized = [...args];
12099
+ normalized[idx] = "--strip-tools=default";
12100
+ return normalized;
12101
+ }
12102
+ return args;
12103
+ }
12104
+
12086
12105
  // node_modules/citty/dist/index.mjs
12087
12106
  function defineCommand(def) {
12088
12107
  return def;
@@ -19939,7 +19958,7 @@ var cloneCommand = defineCommand({
19939
19958
  const stripToolsArg = args["strip-tools"];
19940
19959
  if (stripToolsArg !== undefined) {
19941
19960
  let presetName;
19942
- const isDefaultPreset = stripToolsArg === "" || stripToolsArg === "true" || stripToolsArg === true;
19961
+ const isDefaultPreset = stripToolsArg === "" || stripToolsArg === "true" || stripToolsArg === "default" || stripToolsArg === true;
19943
19962
  if (isDefaultPreset) {
19944
19963
  presetName = config.defaultPreset;
19945
19964
  } else if (isValidPresetName(stripToolsArg, config.customPresets)) {
@@ -20172,7 +20191,7 @@ async function getSessionInfo(sessionPath, projectPath) {
20172
20191
  }
20173
20192
 
20174
20193
  // src/commands/main-command.ts
20175
- var VERSION = "0.3.4";
20194
+ var VERSION = "0.3.5";
20176
20195
  function showHelp() {
20177
20196
  console.log(`ccs-cloner v${VERSION} - Clone Claude Code sessions with reduced context
20178
20197
 
@@ -20206,11 +20225,6 @@ OUTPUT OPTIONS
20206
20225
  --json JSON output (for agents)
20207
20226
  --dsp Include --dangerously-skip-permissions in resume command
20208
20227
 
20209
- KNOWN ISSUE
20210
- --strip-tools consumes next flag as value. Put other flags BEFORE it:
20211
- ccs-cloner clone <id> --dsp --strip-tools (works)
20212
- ccs-cloner clone <id> --strip-tools --dsp (fails)
20213
-
20214
20228
  GLOBAL OPTIONS
20215
20229
  --help, -h Show help
20216
20230
  --quickstart Show minimal quickstart guide
@@ -20276,7 +20290,7 @@ COMMANDS
20276
20290
  ccs-cloner list # Find session IDs
20277
20291
  ccs-cloner info <id> # Check size before cloning
20278
20292
  ccs-cloner clone <id> --strip-tools # Clone with default preset
20279
- ccs-cloner clone <id> --dsp --strip-tools # Include --dangerously-skip-permissions in resume
20293
+ ccs-cloner clone <id> --strip-tools --dsp # Include --dangerously-skip-permissions in resume
20280
20294
 
20281
20295
  WHAT HAPPENS
20282
20296
  - Removes/truncates tool calls based on preset
@@ -20299,4 +20313,6 @@ if (isHelpOnly || isNoArgs) {
20299
20313
  showHelp();
20300
20314
  process.exit(0);
20301
20315
  }
20316
+ var normalizedArgs = normalizeStripToolsArg(args);
20317
+ process.argv = ["node", "ccs-cloner", ...normalizedArgs];
20302
20318
  runMain(mainCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccs-cloner",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "CLI tool to clone and modify Claude Code sessions",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",