clawtamer 0.4.0 → 0.7.0

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.md CHANGED
@@ -46,21 +46,6 @@ Per request:
46
46
  3. Route target is selected
47
47
  4. Savings metadata is returned with the response
48
48
 
49
- ## Response Headers
50
-
51
- Clawtamer adds:
52
-
53
- - `x-clawtamer-baseline-model`
54
- - `x-clawtamer-routed-model`
55
- - `x-clawtamer-original-input-tokens`
56
- - `x-clawtamer-compressed-input-tokens`
57
- - `x-clawtamer-compression-ratio`
58
- - `x-clawtamer-baseline-cost-usd`
59
- - `x-clawtamer-actual-cost-usd`
60
- - `x-clawtamer-saved-usd`
61
- - `x-clawtamer-route-reason`
62
- - `x-clawtamer-request-id`
63
-
64
49
  ## CLI
65
50
 
66
51
  ```bash
@@ -76,15 +61,29 @@ npx clawtamer restore # Remove patch and restore prior defaults
76
61
  npx clawtamer remove # Alias for restore
77
62
  ```
78
63
 
79
- ## Init Safety Behavior
64
+ ## Remove
65
+
66
+ To undo Clawtamer setup and restore previous defaults:
67
+
68
+ ```bash
69
+ npx clawtamer remove
70
+ ```
71
+
72
+ Alias:
73
+
74
+ ```bash
75
+ npx clawtamer restore
76
+ ```
77
+
78
+ ## Safety
80
79
 
81
80
  `init` is intentionally defensive:
82
81
 
83
82
  - Runs proxy preflight before switching default model.
84
83
  - If preflight fails, leaves install in staged mode (provider added, primary unchanged).
85
84
  - Runs post-install verification and auto-reverts activation if health fails.
86
- - Supports dry run with `--dry-run`.
87
- - Supports force activation with `--activate` (manual override).
85
+
86
+ Your Openclaw configs stay safe!
88
87
 
89
88
  ## Common Flags
90
89
 
package/bin/clawtamer.js CHANGED
@@ -606,7 +606,7 @@ async function cmdInit(flags) {
606
606
  const accountMode = modeFromFlags || (canPromptInteractively() ? await promptAccountMode() : "new");
607
607
  const emailPrompt =
608
608
  accountMode === "existing"
609
- ? "Please enter your account email (please use the same email you used to signup): "
609
+ ? "Please enter your account email (use same email you used to signup): "
610
610
  : "Please enter your account email (you will use this to access your dashboard): ";
611
611
  const emailInput = flags["--email"] || (await promptValidated(emailPrompt, (value) => {
612
612
  try {
@@ -626,7 +626,7 @@ async function cmdInit(flags) {
626
626
  let resolvedProxyKey = explicitProxyKey;
627
627
  if (!resolvedProxyKey && accountMode === "existing" && canPromptInteractively()) {
628
628
  resolvedProxyKey = await promptProxyKey(
629
- "Please enter your existing Clawtamer API key (sk-cltm-...). Don't know it? Log in at https://www.clawtamer.ai/login then open Dashboard and click 'Reveal API Key': "
629
+ "Please enter your existing Clawtamer API key (sk-cltm-...) (grab it from https://www.clawtamer.ai/dashboard): "
630
630
  );
631
631
  }
632
632
  if (!resolvedUpstreamKey && canPromptInteractively()) {
@@ -661,7 +661,7 @@ async function cmdInit(flags) {
661
661
  if (canPromptInteractively()) {
662
662
  console.warn(warn("This email already exists. Switching to existing-user flow."));
663
663
  proxyKey = await promptProxyKey(
664
- "Please enter your existing Clawtamer API key (sk-cltm-...). Don't know it? Log in at https://www.clawtamer.ai/login then open Dashboard and click 'Reveal API Key': "
664
+ "Please enter your existing Clawtamer API key (sk-cltm-...) (grab it from https://www.clawtamer.ai/dashboard): "
665
665
  );
666
666
  logStep(flags, "Existing account key captured.");
667
667
  } else {
@@ -686,6 +686,7 @@ async function cmdInit(flags) {
686
686
  }
687
687
 
688
688
  const dryRun = Boolean(flags["--dry-run"]);
689
+ let showTrackSavingsTips = false;
689
690
 
690
691
  if (resolvedUpstreamKey && !dryRun) {
691
692
  const store = await storeUpstreamKey(apiBase, proxyKey, resolvedUpstreamKey);
@@ -818,10 +819,7 @@ async function cmdInit(flags) {
818
819
  console.log("");
819
820
  console.log("Clawtamer is installed and now routing your requests.");
820
821
  console.log("Clawtamer will automatically route requests and reduce API cost.");
821
- console.log("");
822
- console.log("Track savings anytime:");
823
- console.log("- npx clawtamer savings");
824
- console.log("- Dashboard: https://www.clawtamer.ai/dashboard");
822
+ showTrackSavingsTips = true;
825
823
  }
826
824
  }
827
825
 
@@ -854,7 +852,13 @@ async function cmdInit(flags) {
854
852
  console.warn("Update those agent configs to clawtamer/auto (or remove agent-level primary) to enforce proxy routing.");
855
853
  }
856
854
  console.log("");
857
- console.log(success("Enjoy your savings with Clawtamer!"));
855
+ console.log(bold(success("Enjoy your savings with Clawtamer!")));
856
+ if (showTrackSavingsTips) {
857
+ console.log("");
858
+ console.log("Track savings anytime:");
859
+ console.log("- npx clawtamer savings");
860
+ console.log("- Dashboard: https://www.clawtamer.ai/dashboard");
861
+ }
858
862
  }
859
863
 
860
864
  async function resolveProxyKey(flags, configDir, config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawtamer",
3
- "version": "0.4.0",
3
+ "version": "0.7.0",
4
4
  "description": "Clawtamer CLI and OpenClaw plugin",
5
5
  "keywords": [
6
6
  "openclaw",