uncompact 0.46.6 → 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.
- package/npm/install.js +7 -33
- 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 {
|
|
6
|
+
const { execFileSync } = require("child_process");
|
|
7
7
|
const os = require("os");
|
|
8
8
|
|
|
9
9
|
const REPO_OWNER = "supermodeltools";
|
|
@@ -189,51 +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
|
-
//
|
|
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
|
-
log(`\n[uncompact] Login process exited: ${err.message}\n`);
|
|
221
|
-
log("[uncompact] You can run it manually later: uncompact auth login\n");
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
} catch (e) {}
|
|
225
|
-
} else {
|
|
226
|
-
log("\n[uncompact] Authentication required. Run 'uncompact auth login' to connect your account.\n");
|
|
227
|
-
}
|
|
228
203
|
} catch (err) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
execFileSync(destPath, [], { stdio: "inherit" });
|
|
233
|
-
} catch (e) {}
|
|
234
|
-
}
|
|
204
|
+
try {
|
|
205
|
+
execFileSync(destPath, [], { stdio: "inherit" });
|
|
206
|
+
} catch (e) {}
|
|
235
207
|
}
|
|
208
|
+
|
|
236
209
|
log("\n");
|
|
210
|
+
log("[uncompact] To authenticate: run 'uncompact auth login'\n");
|
|
237
211
|
}
|
|
238
212
|
|
|
239
213
|
main().catch((err) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uncompact",
|
|
3
|
-
"version": "0.
|
|
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",
|