opencode-mem 2.9.0 → 2.9.1

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.
@@ -9,7 +9,7 @@
9
9
  * Issue: https://github.com/tickernelz/opencode-mem/issues/37
10
10
  *
11
11
  * Loading priority:
12
- * 1. Bundled dylib (native/darwin-{arch}/libsqlite3.dylib) - downloaded via postinstall
12
+ * 1. Bundled dylib (native/darwin-{arch}/libsqlite3.dylib)
13
13
  * 2. Homebrew SQLite (auto-detected common paths)
14
14
  */
15
15
  export declare function configureSqlite(): void;
@@ -9,7 +9,7 @@
9
9
  * Issue: https://github.com/tickernelz/opencode-mem/issues/37
10
10
  *
11
11
  * Loading priority:
12
- * 1. Bundled dylib (native/darwin-{arch}/libsqlite3.dylib) - downloaded via postinstall
12
+ * 1. Bundled dylib (native/darwin-{arch}/libsqlite3.dylib)
13
13
  * 2. Homebrew SQLite (auto-detected common paths)
14
14
  */
15
15
  import { existsSync } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-mem",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "description": "OpenCode plugin that gives coding agents persistent memory using local vector database",
5
5
  "type": "module",
6
6
  "main": "dist/plugin.js",
@@ -11,8 +11,7 @@
11
11
  "typecheck": "tsc --noEmit",
12
12
  "format": "prettier --write \"src/**/*.{ts,js,css,html}\"",
13
13
  "format:check": "prettier --check \"src/**/*.{ts,js,css,html}\"",
14
- "prepare": "husky",
15
- "postinstall": "bun run scripts/download-sqlite.ts"
14
+ "prepare": "husky"
16
15
  },
17
16
  "keywords": [
18
17
  "opencode",
@@ -57,7 +56,6 @@
57
56
  "files": [
58
57
  "dist",
59
58
  "native",
60
- "scripts",
61
59
  "package.json"
62
60
  ],
63
61
  "lint-staged": {
File without changes
File without changes
@@ -1,62 +0,0 @@
1
- import { execSync } from "node:child_process";
2
- import { existsSync, mkdirSync } from "node:fs";
3
- import { dirname, join } from "node:path";
4
- import { fileURLToPath } from "node:url";
5
-
6
- const GITHUB_REPO = "tickernelz/opencode-mem";
7
-
8
- function getNativeDir(): string {
9
- const currentDir = dirname(fileURLToPath(import.meta.url));
10
- return join(currentDir, "..", "native");
11
- }
12
-
13
- function downloadDylib(arch: string): boolean {
14
- const nativeDir = getNativeDir();
15
- const targetDir = join(nativeDir, `darwin-${arch}`);
16
- const targetFile = join(targetDir, "libsqlite3.dylib");
17
-
18
- if (existsSync(targetFile)) {
19
- console.log(`[opencode-mem] SQLite dylib already exists: ${targetFile}`);
20
- return true;
21
- }
22
-
23
- mkdirSync(targetDir, { recursive: true });
24
-
25
- const downloadUrl = `https://github.com/${GITHUB_REPO}/releases/latest/download/libsqlite3-darwin-${arch}.dylib`;
26
-
27
- console.log(`[opencode-mem] Downloading SQLite dylib for darwin-${arch}...`);
28
-
29
- try {
30
- execSync(`curl -fsSL "${downloadUrl}" -o "${targetFile}"`, {
31
- timeout: 60000,
32
- stdio: "pipe",
33
- });
34
-
35
- if (existsSync(targetFile)) {
36
- console.log(`[opencode-mem] Downloaded SQLite dylib: ${targetFile}`);
37
- return true;
38
- }
39
- } catch (error) {
40
- console.log(`[opencode-mem] Failed to download SQLite dylib: ${error}`);
41
- }
42
-
43
- console.log(`[opencode-mem] Will fallback to Homebrew SQLite if available.`);
44
- return false;
45
- }
46
-
47
- function main(): void {
48
- if (process.platform !== "darwin") {
49
- console.log("[opencode-mem] Skipping SQLite dylib download (not macOS)");
50
- return;
51
- }
52
-
53
- const arch = process.arch;
54
- if (arch !== "arm64" && arch !== "x64") {
55
- console.log(`[opencode-mem] Unsupported architecture: ${arch}`);
56
- return;
57
- }
58
-
59
- downloadDylib(arch);
60
- }
61
-
62
- main();