@memfork/cli 0.1.0
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/cli.d.ts +21 -0
- package/dist/cli.js +154 -0
- package/dist/commands/doctor.d.ts +12 -0
- package/dist/commands/doctor.js +170 -0
- package/dist/commands/init.d.ts +12 -0
- package/dist/commands/init.js +286 -0
- package/dist/commands/install.d.ts +17 -0
- package/dist/commands/install.js +196 -0
- package/dist/commands/join.d.ts +17 -0
- package/dist/commands/join.js +125 -0
- package/dist/commands/ops.d.ts +56 -0
- package/dist/commands/ops.js +444 -0
- package/dist/commands/provision.d.ts +32 -0
- package/dist/commands/provision.js +173 -0
- package/dist/commands/ui-server.d.ts +15 -0
- package/dist/commands/ui-server.js +217 -0
- package/dist/config.d.ts +110 -0
- package/dist/config.js +200 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/package.json +39 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `memfork install <target>`
|
|
3
|
+
*
|
|
4
|
+
* Installs MemForks into an IDE client. Two responsibilities:
|
|
5
|
+
*
|
|
6
|
+
* 1. Configure the MemWal MCP server (Streamable HTTP) using the credentials
|
|
7
|
+
* that `memfork init` already provisioned — no browser login needed.
|
|
8
|
+
*
|
|
9
|
+
* 2. Install the MemForks rule/skill that tells the agent:
|
|
10
|
+
* - use memwal_recall / memwal_remember for memory (via MCP)
|
|
11
|
+
* - use memfork commit / merge for the on-chain DAG
|
|
12
|
+
*
|
|
13
|
+
* Targets:
|
|
14
|
+
* cursor — ~/.cursor/mcp.json + .cursor/rules/memforks.mdc
|
|
15
|
+
* codex — ~/.codex/config.toml + installs plugin into this project
|
|
16
|
+
*/
|
|
17
|
+
export declare function cmdInstall(target: string): void;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `memfork install <target>`
|
|
3
|
+
*
|
|
4
|
+
* Installs MemForks into an IDE client. Two responsibilities:
|
|
5
|
+
*
|
|
6
|
+
* 1. Configure the MemWal MCP server (Streamable HTTP) using the credentials
|
|
7
|
+
* that `memfork init` already provisioned — no browser login needed.
|
|
8
|
+
*
|
|
9
|
+
* 2. Install the MemForks rule/skill that tells the agent:
|
|
10
|
+
* - use memwal_recall / memwal_remember for memory (via MCP)
|
|
11
|
+
* - use memfork commit / merge for the on-chain DAG
|
|
12
|
+
*
|
|
13
|
+
* Targets:
|
|
14
|
+
* cursor — ~/.cursor/mcp.json + .cursor/rules/memforks.mdc
|
|
15
|
+
* codex — ~/.codex/config.toml + installs plugin into this project
|
|
16
|
+
*/
|
|
17
|
+
import chalk from "chalk";
|
|
18
|
+
import fs from "node:fs";
|
|
19
|
+
import os from "node:os";
|
|
20
|
+
import path from "node:path";
|
|
21
|
+
import { fileURLToPath } from "node:url";
|
|
22
|
+
import { readCredentials, readProjectConfig, MEMWAL_CONSTANTS } from "../config.js";
|
|
23
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
const PLUGIN_ROOT = path.resolve(__dirname, "..", "..", "..", "plugins");
|
|
25
|
+
function ok(s) { return chalk.green("✓") + " " + s; }
|
|
26
|
+
function warn(s) { return chalk.yellow("⚠") + " " + s; }
|
|
27
|
+
function tip(s) { return chalk.cyan("→") + " " + s; }
|
|
28
|
+
function dim(s) { return chalk.dim(s); }
|
|
29
|
+
function resolveMcpCreds() {
|
|
30
|
+
const project = readProjectConfig();
|
|
31
|
+
if (!project)
|
|
32
|
+
return null;
|
|
33
|
+
if (!project.treeId)
|
|
34
|
+
return null;
|
|
35
|
+
const creds = readCredentials();
|
|
36
|
+
const tree = creds.trees[project.treeId];
|
|
37
|
+
if (!tree?.memwalAccountId || !tree?.memwalKey)
|
|
38
|
+
return null;
|
|
39
|
+
const rawNetwork = project.network ?? "testnet";
|
|
40
|
+
const network = (rawNetwork === "mainnet" ? "mainnet" : "testnet");
|
|
41
|
+
const relayer = MEMWAL_CONSTANTS[network].relayer;
|
|
42
|
+
return {
|
|
43
|
+
relayerUrl: relayer + "/api/mcp",
|
|
44
|
+
accountId: tree.memwalAccountId,
|
|
45
|
+
delegateKey: tree.memwalKey,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// ─── Cursor ───────────────────────────────────────────────────────────────────
|
|
49
|
+
function installCursor(cwd) {
|
|
50
|
+
console.log("");
|
|
51
|
+
console.log(chalk.bold("Installing MemForks — Cursor") + dim(" → " + cwd));
|
|
52
|
+
console.log("");
|
|
53
|
+
// ── 1. MemWal MCP → ~/.cursor/mcp.json ────────────────────────────────────
|
|
54
|
+
const mcpJsonPath = path.join(os.homedir(), ".cursor", "mcp.json");
|
|
55
|
+
const mcpCreds = resolveMcpCreds();
|
|
56
|
+
if (mcpCreds) {
|
|
57
|
+
upsertCursorMcp(mcpJsonPath, mcpCreds);
|
|
58
|
+
console.log(ok(`MemWal MCP: ${dim(mcpJsonPath)}`));
|
|
59
|
+
console.log(dim(` endpoint: ${mcpCreds.relayerUrl}`));
|
|
60
|
+
console.log(dim(` account: ${mcpCreds.accountId.slice(0, 18)}…`));
|
|
61
|
+
console.log(dim(` auth: Bearer (delegate key)`));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
console.log(warn("MemWal MCP skipped — run `memfork init` first to provision credentials."));
|
|
65
|
+
console.log(dim(" You can manually run `memfork install cursor` again after init."));
|
|
66
|
+
}
|
|
67
|
+
// ── 2. Cursor rule → .cursor/rules/memforks.mdc ───────────────────────────
|
|
68
|
+
const rulesDir = path.join(cwd, ".cursor", "rules");
|
|
69
|
+
fs.mkdirSync(rulesDir, { recursive: true });
|
|
70
|
+
const ruleSrc = path.join(PLUGIN_ROOT, "cursor", "rules", "memforks.mdc");
|
|
71
|
+
const ruleDst = path.join(rulesDir, "memforks.mdc");
|
|
72
|
+
fs.copyFileSync(ruleSrc, ruleDst);
|
|
73
|
+
console.log(ok(`Rule: .cursor/rules/memforks.mdc`));
|
|
74
|
+
// ── Summary ────────────────────────────────────────────────────────────────
|
|
75
|
+
console.log("");
|
|
76
|
+
console.log(chalk.bold("Done.") + " Restart Cursor to pick up the MCP server.");
|
|
77
|
+
console.log("");
|
|
78
|
+
console.log(tip("The agent now has:"));
|
|
79
|
+
console.log(dim(" memwal_recall / memwal_remember — memory storage via MemWal MCP"));
|
|
80
|
+
console.log(dim(" memwal_analyze — extract facts from conversation"));
|
|
81
|
+
console.log(dim(" memfork commit / merge — on-chain DAG anchoring"));
|
|
82
|
+
console.log("");
|
|
83
|
+
console.log(tip("memfork doctor — verify the full setup"));
|
|
84
|
+
console.log(tip("memfork status — show current memory tree"));
|
|
85
|
+
console.log("");
|
|
86
|
+
}
|
|
87
|
+
function upsertCursorMcp(mcpJsonPath, creds) {
|
|
88
|
+
fs.mkdirSync(path.dirname(mcpJsonPath), { recursive: true });
|
|
89
|
+
let config = {};
|
|
90
|
+
if (fs.existsSync(mcpJsonPath)) {
|
|
91
|
+
try {
|
|
92
|
+
config = JSON.parse(fs.readFileSync(mcpJsonPath, "utf8"));
|
|
93
|
+
}
|
|
94
|
+
catch { /* start fresh if corrupt */ }
|
|
95
|
+
}
|
|
96
|
+
const mcpServers = (config.mcpServers ?? {});
|
|
97
|
+
mcpServers["memwal"] = {
|
|
98
|
+
url: creds.relayerUrl,
|
|
99
|
+
headers: {
|
|
100
|
+
"Authorization": `Bearer ${creds.delegateKey}`,
|
|
101
|
+
"x-memwal-account-id": creds.accountId,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
config.mcpServers = mcpServers;
|
|
105
|
+
fs.writeFileSync(mcpJsonPath, JSON.stringify(config, null, 2) + "\n", "utf8");
|
|
106
|
+
}
|
|
107
|
+
// ─── Codex ────────────────────────────────────────────────────────────────────
|
|
108
|
+
function installCodex(cwd) {
|
|
109
|
+
console.log("");
|
|
110
|
+
console.log(chalk.bold("Installing MemForks — Codex") + dim(" → " + cwd));
|
|
111
|
+
console.log("");
|
|
112
|
+
// ── 1. MemWal MCP → ~/.codex/config.toml ─────────────────────────────────
|
|
113
|
+
const configTomlPath = path.join(os.homedir(), ".codex", "config.toml");
|
|
114
|
+
const mcpCreds = resolveMcpCreds();
|
|
115
|
+
if (mcpCreds) {
|
|
116
|
+
upsertCodexMcp(configTomlPath, mcpCreds);
|
|
117
|
+
console.log(ok(`MemWal MCP: ${dim(configTomlPath)}`));
|
|
118
|
+
console.log(dim(` endpoint: ${mcpCreds.relayerUrl}`));
|
|
119
|
+
console.log(dim(` account: ${mcpCreds.accountId.slice(0, 18)}…`));
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
console.log(warn("MemWal MCP skipped — run `memfork init` first to provision credentials."));
|
|
123
|
+
}
|
|
124
|
+
// ── 2. Codex plugin (skills + metadata) ──────────────────────────────────
|
|
125
|
+
const pluginSrc = path.join(PLUGIN_ROOT, "codex");
|
|
126
|
+
const pluginDst = path.join(cwd, ".codex-plugin");
|
|
127
|
+
copyDir(pluginSrc, pluginDst);
|
|
128
|
+
console.log(ok("Plugin: .codex-plugin/ (skills + plugin.json)"));
|
|
129
|
+
// ── Summary ────────────────────────────────────────────────────────────────
|
|
130
|
+
console.log("");
|
|
131
|
+
console.log(chalk.bold("Done."));
|
|
132
|
+
console.log("");
|
|
133
|
+
console.log(tip("Register the plugin in Codex:"));
|
|
134
|
+
console.log(dim(" codex plugin add .codex-plugin"));
|
|
135
|
+
console.log("");
|
|
136
|
+
console.log(tip("The agent now has:"));
|
|
137
|
+
console.log(dim(" memwal_recall / memwal_remember — memory storage via MemWal MCP"));
|
|
138
|
+
console.log(dim(" memwal_analyze — extract facts from conversation"));
|
|
139
|
+
console.log(dim(" memfork commit / merge — on-chain DAG anchoring"));
|
|
140
|
+
console.log("");
|
|
141
|
+
console.log(tip("memfork doctor — verify the full setup"));
|
|
142
|
+
console.log("");
|
|
143
|
+
}
|
|
144
|
+
function upsertCodexMcp(tomlPath, creds) {
|
|
145
|
+
fs.mkdirSync(path.dirname(tomlPath), { recursive: true });
|
|
146
|
+
// Read existing TOML as raw text — we do minimal surgery to avoid
|
|
147
|
+
// a full TOML parser dependency. We look for an existing [mcp_servers.memwal]
|
|
148
|
+
// block and replace it, or append if absent.
|
|
149
|
+
let existing = "";
|
|
150
|
+
if (fs.existsSync(tomlPath)) {
|
|
151
|
+
existing = fs.readFileSync(tomlPath, "utf8");
|
|
152
|
+
}
|
|
153
|
+
const block = `
|
|
154
|
+
[mcp_servers.memwal]
|
|
155
|
+
transport = "http"
|
|
156
|
+
url = "${creds.relayerUrl}"
|
|
157
|
+
headers = { Authorization = "Bearer ${creds.delegateKey}", x-memwal-account-id = "${creds.accountId}" }
|
|
158
|
+
`;
|
|
159
|
+
if (existing.includes("[mcp_servers.memwal]")) {
|
|
160
|
+
// Replace the existing block — find from the header to the next blank line / EOF.
|
|
161
|
+
existing = existing.replace(/\[mcp_servers\.memwal\][^\[]*/s, block.trimStart());
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
existing = existing.trimEnd() + "\n" + block;
|
|
165
|
+
}
|
|
166
|
+
fs.writeFileSync(tomlPath, existing, "utf8");
|
|
167
|
+
}
|
|
168
|
+
function copyDir(src, dst) {
|
|
169
|
+
fs.mkdirSync(dst, { recursive: true });
|
|
170
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
171
|
+
const srcPath = path.join(src, entry.name);
|
|
172
|
+
const dstPath = path.join(dst, entry.name);
|
|
173
|
+
if (entry.isDirectory()) {
|
|
174
|
+
copyDir(srcPath, dstPath);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
fs.copyFileSync(srcPath, dstPath);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// ─── Command ──────────────────────────────────────────────────────────────────
|
|
182
|
+
export function cmdInstall(target) {
|
|
183
|
+
const cwd = process.cwd();
|
|
184
|
+
switch (target.toLowerCase()) {
|
|
185
|
+
case "cursor":
|
|
186
|
+
installCursor(cwd);
|
|
187
|
+
break;
|
|
188
|
+
case "codex":
|
|
189
|
+
installCodex(cwd);
|
|
190
|
+
break;
|
|
191
|
+
default:
|
|
192
|
+
console.error(chalk.red(`Unknown install target: ${target}`));
|
|
193
|
+
console.error("Available targets: cursor, codex");
|
|
194
|
+
process.exit(1);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `memfork join`
|
|
3
|
+
*
|
|
4
|
+
* Onboards a new team member to an existing MemoryTree.
|
|
5
|
+
*
|
|
6
|
+
* Prerequisites:
|
|
7
|
+
* - The repo has been cloned — .memfork/config.json is already present.
|
|
8
|
+
* - The tree owner is reachable to run `memfork grant` after this completes.
|
|
9
|
+
*
|
|
10
|
+
* What this does:
|
|
11
|
+
* 1. Reads treeId from .memfork/config.json
|
|
12
|
+
* 2. Generates a fresh Sui Ed25519 keypair for this machine
|
|
13
|
+
* 3. Generates a MemWal delegate key for memory encryption/decryption
|
|
14
|
+
* 4. Saves both to ~/.memfork/credentials.json (chmod 600)
|
|
15
|
+
* 5. Prints copy-pasteable commands for the owner to run
|
|
16
|
+
*/
|
|
17
|
+
export declare function cmdJoin(): Promise<void>;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `memfork join`
|
|
3
|
+
*
|
|
4
|
+
* Onboards a new team member to an existing MemoryTree.
|
|
5
|
+
*
|
|
6
|
+
* Prerequisites:
|
|
7
|
+
* - The repo has been cloned — .memfork/config.json is already present.
|
|
8
|
+
* - The tree owner is reachable to run `memfork grant` after this completes.
|
|
9
|
+
*
|
|
10
|
+
* What this does:
|
|
11
|
+
* 1. Reads treeId from .memfork/config.json
|
|
12
|
+
* 2. Generates a fresh Sui Ed25519 keypair for this machine
|
|
13
|
+
* 3. Generates a MemWal delegate key for memory encryption/decryption
|
|
14
|
+
* 4. Saves both to ~/.memfork/credentials.json (chmod 600)
|
|
15
|
+
* 5. Prints copy-pasteable commands for the owner to run
|
|
16
|
+
*/
|
|
17
|
+
import chalk from "chalk";
|
|
18
|
+
import { select } from "@inquirer/prompts";
|
|
19
|
+
import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519";
|
|
20
|
+
import { decodeSuiPrivateKey } from "@mysten/sui/cryptography";
|
|
21
|
+
import { generateDelegateKey } from "@mysten-incubation/memwal/account";
|
|
22
|
+
import { readProjectConfig, readCredentials, writeCredentials, } from "../config.js";
|
|
23
|
+
function ok(s) { return chalk.green("✓") + " " + s; }
|
|
24
|
+
function tip(s) { return chalk.cyan("→") + " " + chalk.white(s); }
|
|
25
|
+
function dim(s) { return chalk.dim(s); }
|
|
26
|
+
function step(n, total, msg) {
|
|
27
|
+
process.stdout.write(` ${dim(`[${n}/${total}]`)} ${msg}… `);
|
|
28
|
+
}
|
|
29
|
+
function done() { console.log(chalk.green("done")); }
|
|
30
|
+
export async function cmdJoin() {
|
|
31
|
+
console.log("");
|
|
32
|
+
console.log(chalk.bold("MemForks join") + " " + dim("onboard to an existing memory tree"));
|
|
33
|
+
console.log("");
|
|
34
|
+
// ── 1. Find tree from project config ────────────────────────────────────────
|
|
35
|
+
const project = readProjectConfig();
|
|
36
|
+
if (!project?.treeId) {
|
|
37
|
+
console.error(chalk.red(" ✗ No .memfork/config.json found in this directory tree.\n") +
|
|
38
|
+
chalk.dim(" Make sure you've cloned the repo and are running this\n") +
|
|
39
|
+
chalk.dim(" from inside the project directory.\n"));
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
const treeId = project.treeId;
|
|
43
|
+
const network = project.network ?? "testnet";
|
|
44
|
+
console.log(dim(` Found .memfork/config.json`));
|
|
45
|
+
console.log(dim(` tree: ${treeId}`));
|
|
46
|
+
console.log(dim(` network: ${network}`));
|
|
47
|
+
console.log("");
|
|
48
|
+
// ── 2. Check if credentials already exist for this tree ─────────────────────
|
|
49
|
+
const existing = readCredentials();
|
|
50
|
+
if (existing.trees[treeId]) {
|
|
51
|
+
const address = (() => {
|
|
52
|
+
try {
|
|
53
|
+
const kp = existing.trees[treeId].privateKey.startsWith("suiprivkey")
|
|
54
|
+
? Ed25519Keypair.fromSecretKey(decodeSuiPrivateKey(existing.trees[treeId].privateKey).secretKey)
|
|
55
|
+
: Ed25519Keypair.fromSecretKey(Uint8Array.from(Buffer.from(existing.trees[treeId].privateKey, "hex")));
|
|
56
|
+
return kp.toSuiAddress();
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return "unknown";
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
console.log(chalk.yellow(" ⚠ Credentials already exist for this tree on this machine."));
|
|
63
|
+
console.log(dim(` Sui address: ${address}`));
|
|
64
|
+
console.log("");
|
|
65
|
+
const action = await select({
|
|
66
|
+
message: "What would you like to do?",
|
|
67
|
+
choices: [
|
|
68
|
+
{ value: "keep", name: "Keep existing credentials " + dim("(recommended)") },
|
|
69
|
+
{ value: "replace", name: "Generate new credentials " + dim("(replaces the old ones)") },
|
|
70
|
+
],
|
|
71
|
+
});
|
|
72
|
+
if (action === "keep") {
|
|
73
|
+
console.log("");
|
|
74
|
+
console.log(dim(" No changes made. Run `memfork doctor` to verify your access."));
|
|
75
|
+
console.log("");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
console.log("");
|
|
79
|
+
}
|
|
80
|
+
// ── 3. Generate Sui keypair ──────────────────────────────────────────────────
|
|
81
|
+
step(1, 2, "Generating Sui keypair");
|
|
82
|
+
const keypair = new Ed25519Keypair();
|
|
83
|
+
const privateKey = keypair.getSecretKey();
|
|
84
|
+
const address = keypair.toSuiAddress();
|
|
85
|
+
done();
|
|
86
|
+
console.log(dim(` address: ${address}`));
|
|
87
|
+
// ── 4. Generate MemWal delegate key ─────────────────────────────────────────
|
|
88
|
+
step(2, 2, "Generating MemWal delegate key");
|
|
89
|
+
const delegate = await generateDelegateKey();
|
|
90
|
+
done();
|
|
91
|
+
console.log(dim(` pubkey: ${Buffer.from(delegate.publicKey).toString("hex").slice(0, 32)}…`));
|
|
92
|
+
// ── 5. Save credentials ──────────────────────────────────────────────────────
|
|
93
|
+
const creds = readCredentials();
|
|
94
|
+
creds.trees[treeId] = {
|
|
95
|
+
privateKey,
|
|
96
|
+
memwalAccountId: "", // populated after the owner grants access
|
|
97
|
+
memwalKey: delegate.privateKey,
|
|
98
|
+
};
|
|
99
|
+
if (!creds.default)
|
|
100
|
+
creds.default = treeId;
|
|
101
|
+
writeCredentials(creds);
|
|
102
|
+
// ── 6. Instructions for owner ────────────────────────────────────────────────
|
|
103
|
+
console.log("");
|
|
104
|
+
console.log(ok("Credentials saved to ~/.memfork/credentials.json"));
|
|
105
|
+
console.log("");
|
|
106
|
+
console.log(" " + chalk.bold("Next: share these two commands with the tree owner"));
|
|
107
|
+
console.log("");
|
|
108
|
+
console.log(" " + dim("① Grant you on-chain access (lets you branch, propose merges):"));
|
|
109
|
+
console.log(" " + chalk.cyan(`memfork grant --agent ${address}`));
|
|
110
|
+
console.log("");
|
|
111
|
+
console.log(" " + dim("② Register your MemWal key (lets you read/write branch memory):"));
|
|
112
|
+
console.log(" " + chalk.cyan(`memfork grant-memwal --agent ${address} --pubkey ${Buffer.from(delegate.publicKey).toString("hex")}`));
|
|
113
|
+
console.log("");
|
|
114
|
+
console.log(" " + dim("Or send the owner this full block to copy-paste:"));
|
|
115
|
+
console.log(chalk.dim(" ─────────────────────────────────────────────────────────────"));
|
|
116
|
+
console.log(` memfork grant --agent ${address}`);
|
|
117
|
+
console.log(` memfork grant-memwal --agent ${address} --pubkey ${Buffer.from(delegate.publicKey).toString("hex")}`);
|
|
118
|
+
console.log(chalk.dim(" ─────────────────────────────────────────────────────────────"));
|
|
119
|
+
console.log("");
|
|
120
|
+
console.log(" " + dim("Once the owner has run both commands, verify your access:"));
|
|
121
|
+
console.log(" " + tip("memfork doctor"));
|
|
122
|
+
console.log("");
|
|
123
|
+
console.log(chalk.dim(" Note: the MemWal account ID will be filled in automatically\n") +
|
|
124
|
+
chalk.dim(" when you run `memfork doctor` after access is granted.\n"));
|
|
125
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operational commands: status, log, recall, commit, merge, proposals.
|
|
3
|
+
* All resolve config via the layered config system — no env vars needed.
|
|
4
|
+
*/
|
|
5
|
+
export declare function cmdStatus(): Promise<void>;
|
|
6
|
+
export declare function cmdLog(opts: {
|
|
7
|
+
branch?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
}): Promise<void>;
|
|
10
|
+
export declare function cmdRecall(query: string, opts: {
|
|
11
|
+
branch?: string;
|
|
12
|
+
limit?: number;
|
|
13
|
+
json?: boolean;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
export declare function cmdCommit(opts: {
|
|
16
|
+
branch?: string;
|
|
17
|
+
message: string;
|
|
18
|
+
facts?: string[];
|
|
19
|
+
fromResponse?: string;
|
|
20
|
+
autoExtract?: boolean;
|
|
21
|
+
}): Promise<void>;
|
|
22
|
+
export declare function cmdMerge(from: string, into: string, opts: {
|
|
23
|
+
resolver: string;
|
|
24
|
+
ttl?: number;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
export declare function cmdProposals(): Promise<void>;
|
|
27
|
+
export declare function cmdUi(opts?: {
|
|
28
|
+
share?: boolean;
|
|
29
|
+
port?: number;
|
|
30
|
+
}): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* `memfork show <anchorId>` — show details of an on-chain merge anchor.
|
|
33
|
+
* For off-chain commit blobs, use `memfork recall` or the UI history view.
|
|
34
|
+
*/
|
|
35
|
+
export declare function cmdShow(anchorId: string): Promise<void>;
|
|
36
|
+
export declare function cmdDiff(fromRef: string, toRef: string): Promise<void>;
|
|
37
|
+
export declare function cmdDelegates(): Promise<void>;
|
|
38
|
+
export declare function cmdGrant(opts: {
|
|
39
|
+
address: string;
|
|
40
|
+
permissions?: string;
|
|
41
|
+
expiry?: number;
|
|
42
|
+
branches?: string[];
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Register a new team member's MemWal delegate key with the tree's MemWal account.
|
|
46
|
+
* Run by the tree owner after a teammate runs `memfork join`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function cmdGrantMemwal(opts: {
|
|
49
|
+
agent: string;
|
|
50
|
+
pubkey: string;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
export declare function cmdRevoke(address: string): Promise<void>;
|
|
53
|
+
export declare function cmdBranch(name: string, opts?: {
|
|
54
|
+
from?: string;
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
export declare function cmdCheckout(name: string): Promise<void>;
|