@gamaze/hicortex 0.3.1 → 0.3.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.
- package/dist/init.js +19 -7
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/init.js
CHANGED
|
@@ -156,17 +156,29 @@ Tell them: "Get a license key at https://hicortex.gamaze.com/ — after purchase
|
|
|
156
156
|
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(CC_COMMANDS_DIR, "hicortex-activate.md"), activateContent);
|
|
157
157
|
console.log(` ✓ Installed /learn and /hicortex-activate commands in ${CC_COMMANDS_DIR}`);
|
|
158
158
|
}
|
|
159
|
+
function getPackageVersion() {
|
|
160
|
+
try {
|
|
161
|
+
const pkgPath = (0, node_path_1.join)(__dirname, "..", "package.json");
|
|
162
|
+
const pkg = JSON.parse((0, node_fs_1.readFileSync)(pkgPath, "utf-8"));
|
|
163
|
+
return pkg.version ?? "latest";
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return "latest";
|
|
167
|
+
}
|
|
168
|
+
}
|
|
159
169
|
function installDaemon() {
|
|
160
170
|
const os = (0, node_os_1.platform)();
|
|
161
171
|
const npxPath = findNpxPath();
|
|
172
|
+
const version = getPackageVersion();
|
|
173
|
+
const packageSpec = `@gamaze/hicortex@${version}`;
|
|
162
174
|
if (os === "darwin") {
|
|
163
|
-
return installLaunchd(npxPath);
|
|
175
|
+
return installLaunchd(npxPath, packageSpec);
|
|
164
176
|
}
|
|
165
177
|
else if (os === "linux") {
|
|
166
|
-
return installSystemd(npxPath);
|
|
178
|
+
return installSystemd(npxPath, packageSpec);
|
|
167
179
|
}
|
|
168
180
|
else {
|
|
169
|
-
console.log(` ⚠ Unsupported platform: ${os}. Start the server manually: npx
|
|
181
|
+
console.log(` ⚠ Unsupported platform: ${os}. Start the server manually: npx ${packageSpec} server`);
|
|
170
182
|
return false;
|
|
171
183
|
}
|
|
172
184
|
}
|
|
@@ -178,7 +190,7 @@ function findNpxPath() {
|
|
|
178
190
|
return "/usr/local/bin/npx";
|
|
179
191
|
}
|
|
180
192
|
}
|
|
181
|
-
function installLaunchd(npxPath) {
|
|
193
|
+
function installLaunchd(npxPath, packageSpec) {
|
|
182
194
|
const plistDir = (0, node_path_1.join)((0, node_os_1.homedir)(), "Library", "LaunchAgents");
|
|
183
195
|
const plistPath = (0, node_path_1.join)(plistDir, "com.gamaze.hicortex.plist");
|
|
184
196
|
const logPath = (0, node_path_1.join)(HICORTEX_HOME, "server.log");
|
|
@@ -193,7 +205,7 @@ function installLaunchd(npxPath) {
|
|
|
193
205
|
<array>
|
|
194
206
|
<string>${npxPath}</string>
|
|
195
207
|
<string>-y</string>
|
|
196
|
-
<string
|
|
208
|
+
<string>${packageSpec}</string>
|
|
197
209
|
<string>server</string>
|
|
198
210
|
</array>
|
|
199
211
|
<key>KeepAlive</key>
|
|
@@ -229,7 +241,7 @@ function installLaunchd(npxPath) {
|
|
|
229
241
|
return false;
|
|
230
242
|
}
|
|
231
243
|
}
|
|
232
|
-
function installSystemd(npxPath) {
|
|
244
|
+
function installSystemd(npxPath, packageSpec) {
|
|
233
245
|
const unitDir = (0, node_path_1.join)((0, node_os_1.homedir)(), ".config", "systemd", "user");
|
|
234
246
|
const servicePath = (0, node_path_1.join)(unitDir, "hicortex.service");
|
|
235
247
|
const service = `[Unit]
|
|
@@ -237,7 +249,7 @@ Description=Hicortex MCP server — long-term memory for AI agents
|
|
|
237
249
|
|
|
238
250
|
[Service]
|
|
239
251
|
Type=simple
|
|
240
|
-
ExecStart=${npxPath} -y
|
|
252
|
+
ExecStart=${npxPath} -y ${packageSpec} server
|
|
241
253
|
Restart=on-failure
|
|
242
254
|
RestartSec=10
|
|
243
255
|
StandardOutput=journal
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "hicortex",
|
|
3
3
|
"name": "Hicortex — Long-term Memory That Learns",
|
|
4
4
|
"description": "Your agents remember past decisions, avoid repeated mistakes, and get smarter every day. Nightly reflection generates actionable lessons that automatically update agent behavior.",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.2",
|
|
6
6
|
"kind": "lifecycle",
|
|
7
7
|
"skills": ["./skills/hicortex-memory", "./skills/hicortex-learn", "./skills/hicortex-activate"],
|
|
8
8
|
"configSchema": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamaze/hicortex",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Human-like memory for self-improving AI agents. Automatic capturing, nightly reflection, and cross-agent learning. Works with Claude Code and OpenClaw.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|