@memfork/cli 0.1.21 → 0.1.23

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.js CHANGED
File without changes
@@ -79,11 +79,15 @@ async function cmdInitQuick() {
79
79
  network,
80
80
  existingKey: existingKey || undefined,
81
81
  });
82
- // Persist
82
+ // Persist — include sponsor URL on mainnet so all subsequent commands
83
+ // (branch, commit, merge) use sponsored gas automatically.
84
+ const sponsorBase = (process.env.MEMFORK_SPONSOR_URL ?? "https://memforks-sponsor-production.up.railway.app")
85
+ .replace(/\/sponsor\/?$/, "");
83
86
  writeProjectConfig({
84
87
  treeId: result.treeId,
85
88
  network: result.network,
86
89
  defaultBranch: "main",
90
+ ...(result.network === "mainnet" ? { sponsorUrl: `${sponsorBase}/sponsor` } : {}),
87
91
  });
88
92
  upsertCredential(result.treeId, {
89
93
  privateKey: result.privateKey,
package/dist/config.d.ts CHANGED
@@ -47,6 +47,8 @@ export interface ProjectConfig {
47
47
  rpcUrl?: string;
48
48
  /** Override package ID (post-upgrade). */
49
49
  packageId?: string;
50
+ /** Gas sponsor URL. When set, all on-chain txs are sponsored (no SUI balance needed). */
51
+ sponsorUrl?: string;
50
52
  }
51
53
  export interface TreeCredential {
52
54
  /** Ed25519 private key in bech32 suiprivkey1… format. */
package/dist/config.js CHANGED
@@ -180,7 +180,7 @@ export function resolveConfig(opts = {}) {
180
180
  rpcUrl: env['MEMFORK_RPC_URL'] ?? project?.rpcUrl,
181
181
  packageId: env['MEMFORK_PACKAGE_ID'] ?? project?.packageId,
182
182
  sponsorUrl: env['MEMFORK_SPONSOR_URL'] ??
183
- project?.['sponsorUrl'],
183
+ project?.sponsorUrl,
184
184
  };
185
185
  }
186
186
  /**
package/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memfork/cli",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "MemForks CLI — init, commit, recall, merge, install plugins",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@inquirer/prompts": "^8.5.2",
38
- "@memfork/core": "^0.1.9",
38
+ "@memfork/core": "^0.1.10",
39
39
  "chalk": "^5.6.2",
40
40
  "commander": "^15.0.0"
41
41
  },
@@ -11,27 +11,25 @@ cryptographically anchored to Sui with branch context and a full commit DAG.
11
11
  ## Setup (one time, per machine)
12
12
 
13
13
  ```bash
14
+ # 1. Install the MemForks CLI
14
15
  npm install -g @memfork/cli
15
16
 
16
- # Recommended zero copy-paste, ~30 seconds on testnet:
17
+ # 2. Initialise your on-chain tree (provisions a Sui key + MemWal account)
17
18
  memfork init --quick
18
-
19
- # Or manual if you already have a Sui key + MemWal account:
20
- memfork init
21
19
  ```
22
20
 
23
- ## Install the plugin
21
+ ## Install the plugin in Codex
24
22
 
25
23
  ```bash
26
24
  memfork install codex
27
25
  ```
28
26
 
29
- This does two things:
27
+ This reads the credentials provisioned by `memfork init` and does two things:
30
28
 
31
- 1. **Writes `~/.codex/config.toml`** — adds a `[mcp_servers.memwal]` entry using
32
- the delegate key provisioned by `memfork init`. No browser login needed.
29
+ 1. **Writes `~/.codex/config.toml`** — adds `[mcp_servers.memwal]` using the delegate key
30
+ already on disk. No browser login, no extra auth step.
33
31
 
34
- 2. **Copies `.codex-plugin/`** — installs the plugin skills into the current project.
32
+ 2. **Copies the plugin skills** into `.codex-plugin/` in the current project.
35
33
 
36
34
  Then register with Codex:
37
35
 
@@ -61,21 +59,35 @@ Memory is namespaced by Git branch — `namespace="branch/<branch-name>"`.
61
59
  ## What gets installed
62
60
 
63
61
  ```
64
- ~/.codex/config.toml ← MemWal MCP server entry (auto-configured)
62
+ ~/.codex/config.toml ← [mcp_servers.memwal] entry (HTTP relayer + delegate key)
65
63
  .codex-plugin/
66
64
  plugin.json ← plugin metadata
67
65
  skills/
68
66
  memory-recall/ ← when/how to use memwal_recall
69
67
  memforks-status/ ← when/how to use memfork commit/merge/status
68
+ memory-fork/ ← multi-hypothesis branch forking
70
69
  ```
71
70
 
72
- No shell hooks. The MCP server is the transport.
71
+ MCP credentials come from `~/.memfork/credentials.json` (written by `memfork init`).
72
+ No separate browser login. No bearer tokens to copy-paste.
73
+
74
+ ## Architecture
75
+
76
+ ```
77
+ Codex agent
78
+
79
+ ├── memwal_recall / memwal_remember → @mysten-incubation/memwal-mcp
80
+ │ (Walrus-backed encrypted memory)
81
+
82
+ └── memfork commit / merge / branch → @memfork/cli
83
+ (on-chain version control on Sui)
84
+ ```
73
85
 
74
86
  ## Override for CI / headless use
75
87
 
76
88
  ```bash
77
89
  MEMFORK_TREE_ID=0x…
78
90
  MEMFORK_PRIVATE_KEY=suiprivkey1…
79
- MEMFORK_MEMWAL_ACCOUNT=0x…
80
- MEMFORK_MEMWAL_KEY=<hex>
91
+ MEMWAL_ACCOUNT_ID=0x…
92
+ MEMWAL_API_TOKEN=<token>
81
93
  ```