uncompact 0.46.7 → 0.47.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.
Files changed (2) hide show
  1. package/npm/install.js +7 -34
  2. package/package.json +1 -1
package/npm/install.js CHANGED
@@ -3,7 +3,7 @@
3
3
  const https = require("https");
4
4
  const fs = require("fs");
5
5
  const path = require("path");
6
- const { execSync, execFileSync } = require("child_process");
6
+ const { execFileSync } = require("child_process");
7
7
  const os = require("os");
8
8
 
9
9
  const REPO_OWNER = "supermodeltools";
@@ -189,52 +189,25 @@ async function main() {
189
189
 
190
190
  // Automatically install Claude Code hooks
191
191
  log("[uncompact] Configuring Claude Code hooks...\n");
192
- let installSuccessful = false;
193
192
  try {
194
- // The 'install' command now automatically shows the help menu upon completion
195
193
  execFileSync(destPath, ["install", "--yes"], { stdio: "inherit" });
196
- installSuccessful = true;
197
194
  } catch (err) {
198
195
  log("[uncompact] Note: Automatic hook configuration skipped or failed. Run manually if needed:\n");
199
196
  log(" uncompact install\n");
200
197
  }
201
198
 
202
- // Always show status to verify API key detection, regardless of install success
199
+ // Show status to verify setup
203
200
  try {
204
201
  console.log();
205
202
  execFileSync(destPath, ["status"], { stdio: "inherit" });
206
-
207
- // If not authenticated, take them to the next step automatically
208
- // Only attempt interactive login if we are in a terminal (TTY)
209
- if (process.stdin.isTTY) {
210
- const checkAuthCmd = `"${destPath}" auth status`;
211
- try {
212
- const authStatus = execSync(checkAuthCmd).toString();
213
- if (authStatus.includes("Status: not authenticated") || authStatus.includes("✗")) {
214
- log("\n[uncompact] Authentication required. Starting login flow...\n");
215
- try {
216
- // Use 'auth login' which opens browser AND prompts for key
217
- execFileSync(destPath, ["auth", "login"], { stdio: "inherit" });
218
- log("\n[uncompact] Login successful.\n");
219
- } catch (err) {
220
- // Command failed (e.g. invalid key, 402, or user cancelled)
221
- // We don't print the error message here because 'inherit' already showed it
222
- log("\n[uncompact] Login incomplete or failed. You can run it manually later: uncompact auth login\n");
223
- }
224
- }
225
- } catch (e) {}
226
- } else {
227
- log("\n[uncompact] Authentication required. Run 'uncompact auth login' to connect your account.\n");
228
- }
229
203
  } catch (err) {
230
- // If status fails, show help as a fallback if we haven't shown anything yet
231
- if (!installSuccessful) {
232
- try {
233
- execFileSync(destPath, [], { stdio: "inherit" });
234
- } catch (e) {}
235
- }
204
+ try {
205
+ execFileSync(destPath, [], { stdio: "inherit" });
206
+ } catch (e) {}
236
207
  }
208
+
237
209
  log("\n");
210
+ log("[uncompact] To authenticate: run 'uncompact auth login'\n");
238
211
  }
239
212
 
240
213
  main().catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uncompact",
3
- "version": "0.46.7",
3
+ "version": "0.47.0",
4
4
  "description": "Stop Claude Code compaction from making your AI stupid. Re-inject project context after compaction via the Supermodel API.",
5
5
  "author": "Supermodel <abe@supermodel.software>",
6
6
  "license": "MIT",