@memfork/cli 0.1.46 → 0.1.47

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
@@ -85,6 +85,7 @@ program
85
85
  .requiredOption("-m, --message <msg>", "commit message")
86
86
  .option("-b, --branch <name>", "branch (default: current git branch)")
87
87
  .option("-f, --facts <facts...>", "one or more fact strings")
88
+ .option("--tool <tool>", "tool that wrote this commit: codex | cursor | sdk")
88
89
  .option("--from-response <text>", "extract facts from a full response text")
89
90
  .option("--auto-extract", "use LLM to extract durable facts (requires --from-response)")
90
91
  .option("--file <path>", "attach a file as a Walrus artifact (repeatable). Requires artifacts.enabled = true in config.", (v, acc) => [...acc, v], [])
@@ -16,6 +16,7 @@ export declare function cmdCommit(opts: {
16
16
  branch?: string;
17
17
  message: string;
18
18
  facts?: string[];
19
+ tool?: string;
19
20
  fromResponse?: string;
20
21
  autoExtract?: boolean;
21
22
  /**
@@ -155,6 +155,7 @@ export async function cmdCommit(opts) {
155
155
  const { blobId, artifacts: refs } = await client.commit(branch, {
156
156
  facts,
157
157
  message: opts.message,
158
+ ...(opts.tool ? { tool: opts.tool } : {}),
158
159
  ...(artifacts.length > 0 ? { artifacts } : {}),
159
160
  });
160
161
  const out = { blobId, branch, artifacts: refs };
@@ -242,6 +242,19 @@ async function handleApiHistory(res, url) {
242
242
  message: facts?.length ? facts[0] : `commit ${entry.blob_id.slice(0, 8)}`,
243
243
  delta: payload["delta"] ?? {},
244
244
  ...(artifacts?.length ? { artifacts } : {}),
245
+ // author is stored as base64-encoded bytes; decode to 0x-prefixed hex address.
246
+ ...(payload["author"] ? {
247
+ author: (() => {
248
+ try {
249
+ const hex = Buffer.from(String(payload["author"]), "base64").toString("hex");
250
+ return `0x${hex}`;
251
+ }
252
+ catch {
253
+ return undefined;
254
+ }
255
+ })(),
256
+ } : {}),
257
+ ...(payload["tool"] ? { tool: payload["tool"] } : {}),
245
258
  }];
246
259
  });
247
260
  commits.sort((a, b) => a.ts_ms - b.ts_ms);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memfork/cli",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "MemForks CLI — init, commit, recall, merge, install plugins",
5
5
  "repository": {
6
6
  "type": "git",