attention-matters 0.1.5 → 0.1.8

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/package.json +3 -3
  2. package/scripts/install.js +24 -16
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "attention-matters",
3
- "version": "0.1.5",
4
- "description": "Geometric memory for AI coding agents. No embeddings, no vectors, no cloud just math.",
3
+ "version": "0.1.8",
4
+ "description": "Geometric memory for AI coding agents. No embeddings, no vectors, no cloud - just math.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -28,4 +28,4 @@
28
28
  "bin/am",
29
29
  "scripts/install.js"
30
30
  ]
31
- }
31
+ }
@@ -30,7 +30,7 @@ function getTarget() {
30
30
  if (!target) {
31
31
  console.error(
32
32
  `Unsupported platform: ${key}\n` +
33
- `Supported: ${Object.keys(PLATFORM_MAP).join(", ")}`
33
+ `Supported: ${Object.keys(PLATFORM_MAP).join(", ")}`,
34
34
  );
35
35
  process.exit(1);
36
36
  }
@@ -39,7 +39,7 @@ function getTarget() {
39
39
 
40
40
  function getVersion() {
41
41
  const pkg = JSON.parse(
42
- fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8")
42
+ fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"),
43
43
  );
44
44
  return pkg.version;
45
45
  }
@@ -48,18 +48,26 @@ function fetch(url) {
48
48
  return new Promise((resolve, reject) => {
49
49
  const mod = url.startsWith("https") ? https : http;
50
50
  mod
51
- .get(url, { headers: { "User-Agent": "attention-matters-installer" } }, (res) => {
52
- if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
53
- return fetch(res.headers.location).then(resolve, reject);
54
- }
55
- if (res.statusCode !== 200) {
56
- return reject(new Error(`HTTP ${res.statusCode} for ${url}`));
57
- }
58
- const chunks = [];
59
- res.on("data", (chunk) => chunks.push(chunk));
60
- res.on("end", () => resolve(Buffer.concat(chunks)));
61
- res.on("error", reject);
62
- })
51
+ .get(
52
+ url,
53
+ { headers: { "User-Agent": "attention-matters-installer" } },
54
+ (res) => {
55
+ if (
56
+ res.statusCode >= 300 &&
57
+ res.statusCode < 400 &&
58
+ res.headers.location
59
+ ) {
60
+ return fetch(res.headers.location).then(resolve, reject);
61
+ }
62
+ if (res.statusCode !== 200) {
63
+ return reject(new Error(`HTTP ${res.statusCode} for ${url}`));
64
+ }
65
+ const chunks = [];
66
+ res.on("data", (chunk) => chunks.push(chunk));
67
+ res.on("end", () => resolve(Buffer.concat(chunks)));
68
+ res.on("error", reject);
69
+ },
70
+ )
63
71
  .on("error", reject);
64
72
  });
65
73
  }
@@ -99,9 +107,9 @@ async function install() {
99
107
  ` ${err.message}\n\n` +
100
108
  `You can install manually:\n` +
101
109
  ` cargo install am-cli\n` +
102
- ` brew install srobinson/tap/am`
110
+ ` brew install srobinson/tap/am`,
103
111
  );
104
- // Don't fail the install the bin wrapper will show a helpful error
112
+ // Don't fail the install - the bin wrapper will show a helpful error
105
113
  }
106
114
  }
107
115