cozempic 1.2.2

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.
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawnSync } = require("child_process");
5
+
6
+ const args = process.argv.slice(2);
7
+
8
+ // Try direct cozempic command first, then python -m cozempic fallbacks
9
+ const candidates = [
10
+ ["cozempic", args],
11
+ ["python", ["-m", "cozempic", ...args]],
12
+ ["python3", ["-m", "cozempic", ...args]],
13
+ ];
14
+
15
+ for (const [cmd, cmdArgs] of candidates) {
16
+ const r = spawnSync(cmd, cmdArgs, { stdio: "inherit" });
17
+ if (!r.error) process.exit(r.status ?? 0);
18
+ }
19
+
20
+ console.error("cozempic not found. Install with: pip install cozempic");
21
+ process.exit(1);
package/install.js ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawnSync } = require("child_process");
5
+
6
+ // Skip if already installed
7
+ const check = spawnSync("cozempic", ["--version"], { stdio: "pipe" });
8
+ if (check.status === 0) process.exit(0);
9
+
10
+ console.log("Installing cozempic Python package...");
11
+
12
+ const attempts = [
13
+ ["pip", ["install", "cozempic", "--quiet", "--disable-pip-version-check"]],
14
+ ["pip3", ["install", "cozempic", "--quiet", "--disable-pip-version-check"]],
15
+ ["python", ["-m", "pip", "install", "cozempic", "--quiet"]],
16
+ ["python3", ["-m", "pip", "install", "cozempic", "--quiet"]],
17
+ ];
18
+
19
+ for (const [cmd, args] of attempts) {
20
+ const r = spawnSync(cmd, args, { stdio: "inherit" });
21
+ if (r.status === 0) {
22
+ console.log("cozempic ready.");
23
+ process.exit(0);
24
+ }
25
+ }
26
+
27
+ console.log("\ncozempic could not be auto-installed. Run manually:\n pip install cozempic\n");
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "cozempic",
3
+ "version": "1.2.2",
4
+ "description": "Context weight-loss for Claude Code — prune bloated sessions, protect Agent Teams from compaction",
5
+ "keywords": ["claude", "claude-code", "context", "pruning", "jsonl", "agent-teams", "compaction", "mcp"],
6
+ "homepage": "https://github.com/Ruya-AI/cozempic",
7
+ "repository": { "type": "git", "url": "https://github.com/Ruya-AI/cozempic.git" },
8
+ "bugs": { "url": "https://github.com/Ruya-AI/cozempic/issues" },
9
+ "license": "MIT",
10
+ "author": "Ruya AI",
11
+ "bin": { "cozempic": "./bin/cozempic.js" },
12
+ "scripts": { "postinstall": "node install.js" },
13
+ "files": ["bin/", "install.js"],
14
+ "engines": { "node": ">=16" }
15
+ }