toon-memory 1.0.3 → 1.0.4
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/bin/toon-memory.js +16 -0
- package/package.json +2 -3
- package/bin/mcp.js +0 -14
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "module"
|
|
3
|
+
import { dirname, join } from "path"
|
|
4
|
+
import { fileURLToPath } from "url"
|
|
5
|
+
import { spawn } from "child_process"
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
|
+
const args = process.argv.slice(2)
|
|
9
|
+
|
|
10
|
+
const target = args[0] === "mcp"
|
|
11
|
+
? join(__dirname, "..", "mcp", "server.js")
|
|
12
|
+
: join(__dirname, "setup.js")
|
|
13
|
+
|
|
14
|
+
const extraArgs = args[0] === "mcp" ? [] : args
|
|
15
|
+
const child = spawn("node", [target, ...extraArgs], { stdio: "inherit" })
|
|
16
|
+
child.on("exit", (code) => process.exit(code ?? 0))
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toon-memory",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Persistent memory system for OpenCode AI agent using TOON format (40% fewer tokens than JSON)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"toon-memory": "./bin/
|
|
8
|
-
"toon-memory-mcp": "./mcp/server.js"
|
|
7
|
+
"toon-memory": "./bin/toon-memory.js"
|
|
9
8
|
},
|
|
10
9
|
"files": [
|
|
11
10
|
"src/",
|
package/bin/mcp.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// MCP server wrapper - runs the TypeScript server via tsx
|
|
4
|
-
import { execSync } from "child_process"
|
|
5
|
-
import { dirname, join } from "path"
|
|
6
|
-
import { fileURLToPath } from "url"
|
|
7
|
-
|
|
8
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
|
-
const serverPath = join(__dirname, "..", "src", "mcp", "server.ts")
|
|
10
|
-
|
|
11
|
-
execSync(`npx tsx "${serverPath}"`, {
|
|
12
|
-
stdio: "inherit",
|
|
13
|
-
cwd: process.cwd(),
|
|
14
|
-
})
|