@memfork/cli 0.1.43 → 0.1.44
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/commands/install.js +41 -8
- package/package.json +1 -1
- package/plugins/codex/.agents/plugins/marketplace.json +12 -0
- /package/plugins/codex/{.codex-plugin → plugins/memforks/.codex-plugin}/plugin.json +0 -0
- /package/plugins/codex/{README.md → plugins/memforks/README.md} +0 -0
- /package/plugins/codex/{skills → plugins/memforks/skills}/memforks-status/SKILL.md +0 -0
- /package/plugins/codex/{skills → plugins/memforks/skills}/memory-commit/SKILL.md +0 -0
- /package/plugins/codex/{skills → plugins/memforks/skills}/memory-fork/SKILL.md +0 -0
- /package/plugins/codex/{skills → plugins/memforks/skills}/memory-recall/SKILL.md +0 -0
package/dist/commands/install.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* codex — ~/.codex/config.toml + installs plugin into this project
|
|
16
16
|
*/
|
|
17
17
|
import chalk from "chalk";
|
|
18
|
+
import { execSync } from "node:child_process";
|
|
18
19
|
import fs from "node:fs";
|
|
19
20
|
import os from "node:os";
|
|
20
21
|
import path from "node:path";
|
|
@@ -122,17 +123,49 @@ function installCodex(cwd) {
|
|
|
122
123
|
else {
|
|
123
124
|
console.log(warn("MemWal MCP skipped — run `memfork init` first to provision credentials."));
|
|
124
125
|
}
|
|
125
|
-
// ── 2. Codex plugin
|
|
126
|
+
// ── 2. Codex plugin — build marketplace layout + register + install ───────
|
|
127
|
+
//
|
|
128
|
+
// Codex uses a marketplace model. We copy the plugin source into
|
|
129
|
+
// ~/.memfork/codex-plugin/ (a global location so it works from any project),
|
|
130
|
+
// register it as a local marketplace, then install memforks@memforks.
|
|
131
|
+
// The user runs nothing extra.
|
|
132
|
+
const marketplaceDst = path.join(os.homedir(), ".memfork", "codex-plugin");
|
|
126
133
|
const pluginSrc = path.join(PLUGIN_ROOT, "codex");
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
134
|
+
copyDir(pluginSrc, marketplaceDst);
|
|
135
|
+
console.log(ok(`Plugin files: ${dim(marketplaceDst)}`));
|
|
136
|
+
// Register marketplace (idempotent — Codex no-ops if already added).
|
|
137
|
+
try {
|
|
138
|
+
execSync(`codex plugin marketplace add ${JSON.stringify(marketplaceDst)} --json`, {
|
|
139
|
+
stdio: "pipe",
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
catch (e) {
|
|
143
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
144
|
+
// Codex exits non-zero when the marketplace is already registered.
|
|
145
|
+
if (!msg.includes("already")) {
|
|
146
|
+
console.log(warn(`Marketplace registration failed: ${msg}`));
|
|
147
|
+
console.log(dim(` Run manually: codex plugin marketplace add ~/.memfork/codex-plugin`));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// Install / upgrade the plugin (idempotent).
|
|
151
|
+
try {
|
|
152
|
+
execSync(`codex plugin add memforks@memforks --json`, { stdio: "pipe" });
|
|
153
|
+
console.log(ok("Plugin: memforks@memforks (installed)"));
|
|
154
|
+
}
|
|
155
|
+
catch (e) {
|
|
156
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
157
|
+
// Already installed at the same version is not a real error.
|
|
158
|
+
if (msg.includes("already")) {
|
|
159
|
+
console.log(ok("Plugin: memforks@memforks (up to date)"));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
console.log(warn(`Plugin install failed: ${msg}`));
|
|
163
|
+
console.log(dim(` Run manually: codex plugin add memforks@memforks`));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
130
166
|
// ── Summary ────────────────────────────────────────────────────────────────
|
|
131
167
|
console.log("");
|
|
132
|
-
console.log(chalk.bold("Done."));
|
|
133
|
-
console.log("");
|
|
134
|
-
console.log(tip("Register the plugin in Codex:"));
|
|
135
|
-
console.log(dim(" codex plugin add .codex-plugin"));
|
|
168
|
+
console.log(chalk.bold("Done.") + " Restart Codex to pick up the plugin and MCP server.");
|
|
136
169
|
console.log("");
|
|
137
170
|
console.log(tip("The agent now has:"));
|
|
138
171
|
console.log(dim(" memwal_recall / memwal_remember — memory storage via MemWal MCP"));
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "memforks",
|
|
3
|
+
"interface": { "displayName": "MemForks" },
|
|
4
|
+
"plugins": [
|
|
5
|
+
{
|
|
6
|
+
"name": "memforks",
|
|
7
|
+
"source": { "source": "local", "path": "./plugins/memforks" },
|
|
8
|
+
"policy": { "installation": "AVAILABLE", "authentication": "ON_USE" },
|
|
9
|
+
"category": "Productivity"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|