coding-friend-cli 1.31.3 → 1.32.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/{chunk-ZEROY3CW.js → chunk-5OXEUKOE.js} +7 -15
- package/dist/{chunk-65S7Q5PW.js → chunk-GTX6I57V.js} +0 -3
- package/dist/{chunk-YMCAGIYB.js → chunk-U7IVVN45.js} +1 -35
- package/dist/{config-OLEUUS32.js → config-OBCZNDKV.js} +3 -3
- package/dist/{host-DTWSRS2U.js → host-N3GQ6OJM.js} +1 -1
- package/dist/index.js +17 -17
- package/dist/{init-W55DKHKZ.js → init-H2EOLWJ5.js} +3 -3
- package/dist/{mcp-JL2EUJBT.js → mcp-G4FEXMZW.js} +3 -3
- package/dist/{memory-VOLXT5SX.js → memory-SO33RAI5.js} +3 -3
- package/dist/{session-COIV2PO5.js → session-FMC2MG6C.js} +1 -1
- package/dist/{status-CYAKIHFW.js → status-EFEXM3ZM.js} +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
editMemoryAutoCapture,
|
|
3
3
|
editMemoryAutoStart,
|
|
4
|
-
editMemoryDaemonTimeout,
|
|
5
4
|
editMemoryEmbedding,
|
|
6
5
|
editMemoryTier,
|
|
7
6
|
getMemoryMcpStatus,
|
|
8
7
|
memoryConfigMenu,
|
|
9
8
|
writeMemoryMcpEntry
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U7IVVN45.js";
|
|
11
10
|
import {
|
|
12
11
|
getLibPath
|
|
13
12
|
} from "./chunk-RZRT7NGT.js";
|
|
14
13
|
import {
|
|
15
14
|
loadConfig,
|
|
16
15
|
resolveMemoryDir
|
|
17
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GTX6I57V.js";
|
|
18
17
|
import {
|
|
19
18
|
showConfigHint
|
|
20
19
|
} from "./chunk-HPNRQYLM.js";
|
|
@@ -343,8 +342,7 @@ async function memoryStartDaemonCommand() {
|
|
|
343
342
|
log.step("Starting memory daemon...");
|
|
344
343
|
const config = loadConfig();
|
|
345
344
|
const embedding = config.memory?.embedding;
|
|
346
|
-
const
|
|
347
|
-
const result = await spawnDaemon(memoryDir, embedding, { idleTimeoutMs });
|
|
345
|
+
const result = await spawnDaemon(memoryDir, embedding, {});
|
|
348
346
|
if (result) {
|
|
349
347
|
log.success(`Daemon started (PID ${result.pid})`);
|
|
350
348
|
log.info(`Watching ${chalk.cyan(memoryDir)} for changes`);
|
|
@@ -466,36 +464,30 @@ function isMemoryInitialized() {
|
|
|
466
464
|
return getDbPath(memoryDir) !== null;
|
|
467
465
|
}
|
|
468
466
|
async function memoryInitWizard(memoryDir, mcpDir) {
|
|
469
|
-
log.step("Step 1/
|
|
467
|
+
log.step("Step 1/4: Search tier");
|
|
470
468
|
await editMemoryTier(
|
|
471
469
|
readJson(globalConfigPath()),
|
|
472
470
|
readJson(localConfigPath())
|
|
473
471
|
);
|
|
474
472
|
console.log();
|
|
475
|
-
log.step("Step 2/
|
|
473
|
+
log.step("Step 2/4: Embedding provider");
|
|
476
474
|
await editMemoryEmbedding(
|
|
477
475
|
readJson(globalConfigPath()),
|
|
478
476
|
readJson(localConfigPath())
|
|
479
477
|
);
|
|
480
478
|
console.log();
|
|
481
|
-
log.step("Step 3/
|
|
479
|
+
log.step("Step 3/4: Auto-capture");
|
|
482
480
|
await editMemoryAutoCapture(
|
|
483
481
|
readJson(globalConfigPath()),
|
|
484
482
|
readJson(localConfigPath())
|
|
485
483
|
);
|
|
486
484
|
console.log();
|
|
487
|
-
log.step("Step 4/
|
|
485
|
+
log.step("Step 4/4: Auto-start daemon");
|
|
488
486
|
await editMemoryAutoStart(
|
|
489
487
|
readJson(globalConfigPath()),
|
|
490
488
|
readJson(localConfigPath())
|
|
491
489
|
);
|
|
492
490
|
console.log();
|
|
493
|
-
log.step("Step 5/5: Daemon idle timeout");
|
|
494
|
-
await editMemoryDaemonTimeout(
|
|
495
|
-
readJson(globalConfigPath()),
|
|
496
|
-
readJson(localConfigPath())
|
|
497
|
-
);
|
|
498
|
-
console.log();
|
|
499
491
|
const config = loadConfig();
|
|
500
492
|
const tier = config.memory?.tier ?? "auto";
|
|
501
493
|
if (tier === "markdown") {
|
|
@@ -58,9 +58,6 @@ var StatuslineConfigSchema = z.object({
|
|
|
58
58
|
});
|
|
59
59
|
var MemoryConfigSchema = z.object({
|
|
60
60
|
tier: z.enum(["auto", "full", "lite", "markdown"]).optional(),
|
|
61
|
-
daemon: z.object({
|
|
62
|
-
idleTimeout: z.number().optional()
|
|
63
|
-
}).optional(),
|
|
64
61
|
embedding: z.object({
|
|
65
62
|
provider: z.enum(["transformers", "ollama"]).optional(),
|
|
66
63
|
model: z.string().optional(),
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-RZRT7NGT.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveMemoryDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GTX6I57V.js";
|
|
7
7
|
import {
|
|
8
8
|
BACK,
|
|
9
9
|
askScope,
|
|
@@ -219,30 +219,6 @@ async function editMemoryEmbedding(globalCfg, localCfg) {
|
|
|
219
219
|
if (ollamaUrl) embedding.ollamaUrl = ollamaUrl;
|
|
220
220
|
writeMemoryField(scope, "embedding", embedding);
|
|
221
221
|
}
|
|
222
|
-
async function editMemoryDaemonTimeout(globalCfg, localCfg) {
|
|
223
|
-
const currentDaemon = getMergedMemoryValue("daemon", globalCfg, localCfg);
|
|
224
|
-
const currentMs = currentDaemon?.idleTimeout;
|
|
225
|
-
const currentMin = currentMs !== void 0 ? currentMs / 6e4 : void 0;
|
|
226
|
-
if (currentMin !== void 0) {
|
|
227
|
-
log.dim(`Current: ${currentMin} minutes`);
|
|
228
|
-
}
|
|
229
|
-
const value = await input({
|
|
230
|
-
message: "Daemon idle timeout (minutes, 0 = no timeout):",
|
|
231
|
-
default: String(currentMin ?? 0),
|
|
232
|
-
validate: (val) => {
|
|
233
|
-
const n = Number(val);
|
|
234
|
-
if (isNaN(n) || n < 0)
|
|
235
|
-
return "Must be 0 (no timeout) or a positive number";
|
|
236
|
-
return true;
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
const scope = await askScope();
|
|
240
|
-
if (scope === "back") return;
|
|
241
|
-
writeMemoryField(scope, "daemon", {
|
|
242
|
-
...currentDaemon,
|
|
243
|
-
idleTimeout: Number(value) * 6e4
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
222
|
function writeMemoryMcpEntry(serverPath, memoryDir) {
|
|
247
223
|
const mcpPath = join(process.cwd(), ".mcp.json");
|
|
248
224
|
const existing = readJson(mcpPath) ?? {};
|
|
@@ -340,8 +316,6 @@ async function memoryConfigMenu(opts) {
|
|
|
340
316
|
globalCfg,
|
|
341
317
|
localCfg
|
|
342
318
|
);
|
|
343
|
-
const daemonScope = getMemoryFieldScope("daemon", globalCfg, localCfg);
|
|
344
|
-
const daemonVal = getMergedMemoryValue("daemon", globalCfg, localCfg);
|
|
345
319
|
const embeddingLabel = embeddingVal?.provider ? embeddingVal.model ? `${embeddingVal.model} (${embeddingVal.provider})` : embeddingVal.provider : "";
|
|
346
320
|
const mcpStatus = getMemoryMcpStatus();
|
|
347
321
|
const mcpLabel = mcpStatus.configured ? mcpStatus.scope === "local" ? chalk.green("configured") + chalk.dim(" (.mcp.json)") : chalk.green("configured") + chalk.dim(" (global)") + " " + chalk.yellow("\u26A0") : chalk.dim("not configured");
|
|
@@ -365,10 +339,6 @@ async function memoryConfigMenu(opts) {
|
|
|
365
339
|
name: `Embedding ${formatScopeLabel(embeddingScope)}${embeddingLabel ? ` (${embeddingLabel})` : ""}`,
|
|
366
340
|
value: "embedding"
|
|
367
341
|
},
|
|
368
|
-
{
|
|
369
|
-
name: `Daemon timeout ${formatScopeLabel(daemonScope)}${daemonVal?.idleTimeout ? ` (${daemonVal.idleTimeout / 6e4}min)` : ""}`,
|
|
370
|
-
value: "daemon"
|
|
371
|
-
},
|
|
372
342
|
{
|
|
373
343
|
name: `MCP setup (${mcpLabel})`,
|
|
374
344
|
value: "mcp"
|
|
@@ -391,9 +361,6 @@ async function memoryConfigMenu(opts) {
|
|
|
391
361
|
case "embedding":
|
|
392
362
|
await editMemoryEmbedding(globalCfg, localCfg);
|
|
393
363
|
break;
|
|
394
|
-
case "daemon":
|
|
395
|
-
await editMemoryDaemonTimeout(globalCfg, localCfg);
|
|
396
|
-
break;
|
|
397
364
|
case "mcp":
|
|
398
365
|
await editMemoryMcp();
|
|
399
366
|
break;
|
|
@@ -406,7 +373,6 @@ export {
|
|
|
406
373
|
editMemoryAutoCapture,
|
|
407
374
|
editMemoryAutoStart,
|
|
408
375
|
editMemoryEmbedding,
|
|
409
|
-
editMemoryDaemonTimeout,
|
|
410
376
|
writeMemoryMcpEntry,
|
|
411
377
|
getMemoryMcpStatus,
|
|
412
378
|
memoryConfigMenu
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
memoryConfigMenu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U7IVVN45.js";
|
|
4
4
|
import "./chunk-RZRT7NGT.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-GTX6I57V.js";
|
|
6
6
|
import {
|
|
7
7
|
findStatuslineHookPath,
|
|
8
8
|
getCurrentAccountEmail,
|
|
@@ -659,7 +659,7 @@ async function configCommand() {
|
|
|
659
659
|
{
|
|
660
660
|
name: `Memory settings ${formatScopeLabel(memoryScope)}`,
|
|
661
661
|
value: "memory",
|
|
662
|
-
description: " Tier, auto-capture, auto-start, embedding provider
|
|
662
|
+
description: " Tier, auto-capture, auto-start, embedding provider"
|
|
663
663
|
},
|
|
664
664
|
{
|
|
665
665
|
name: `Auto-approve ${formatScopeLabel(autoApproveScope)}${autoApproveVal !== void 0 ? ` (${autoApproveVal})` : ""}`,
|
package/dist/index.js
CHANGED
|
@@ -30,19 +30,19 @@ program.command("enable").description("Re-enable the Coding Friend plugin").opti
|
|
|
30
30
|
await enableCommand(opts);
|
|
31
31
|
});
|
|
32
32
|
program.command("init").description("Initialize coding-friend in current project").action(async () => {
|
|
33
|
-
const { initCommand } = await import("./init-
|
|
33
|
+
const { initCommand } = await import("./init-H2EOLWJ5.js");
|
|
34
34
|
await initCommand();
|
|
35
35
|
});
|
|
36
36
|
program.command("config").description("Manage Coding Friend configuration").action(async () => {
|
|
37
|
-
const { configCommand } = await import("./config-
|
|
37
|
+
const { configCommand } = await import("./config-OBCZNDKV.js");
|
|
38
38
|
await configCommand();
|
|
39
39
|
});
|
|
40
40
|
program.command("host").description("Build and serve learning docs as a static website").argument("[path]", "path to docs folder").option("-p, --port <port>", "port number", "3333").action(async (path, opts) => {
|
|
41
|
-
const { hostCommand } = await import("./host-
|
|
41
|
+
const { hostCommand } = await import("./host-N3GQ6OJM.js");
|
|
42
42
|
await hostCommand(path, opts);
|
|
43
43
|
});
|
|
44
44
|
program.command("mcp").description("Setup MCP server for learning docs").argument("[path]", "path to docs folder").action(async (path) => {
|
|
45
|
-
const { mcpCommand } = await import("./mcp-
|
|
45
|
+
const { mcpCommand } = await import("./mcp-G4FEXMZW.js");
|
|
46
46
|
await mcpCommand(path);
|
|
47
47
|
});
|
|
48
48
|
program.command("permission").description("Manage Claude Code permission rules for Coding Friend").option("--all", "Apply all recommended permissions without prompts").option("--user", "Save to user-level settings (~/.claude/settings.json)").option(
|
|
@@ -61,7 +61,7 @@ program.command("update").description("Update coding-friend plugin, CLI, and sta
|
|
|
61
61
|
await updateCommand(opts);
|
|
62
62
|
});
|
|
63
63
|
program.command("status").description("Show comprehensive Coding Friend status").action(async () => {
|
|
64
|
-
const { statusCommand } = await import("./status-
|
|
64
|
+
const { statusCommand } = await import("./status-EFEXM3ZM.js");
|
|
65
65
|
await statusCommand();
|
|
66
66
|
});
|
|
67
67
|
var session = program.command("session").description("Save and load Claude Code sessions across machines");
|
|
@@ -76,11 +76,11 @@ session.command("save").description("Save current Claude Code session to sync fo
|
|
|
76
76
|
"-s, --session-id <id>",
|
|
77
77
|
"session UUID to save (default: auto-detect newest)"
|
|
78
78
|
).option("-l, --label <label>", "label for this session").action(async (opts) => {
|
|
79
|
-
const { sessionSaveCommand } = await import("./session-
|
|
79
|
+
const { sessionSaveCommand } = await import("./session-FMC2MG6C.js");
|
|
80
80
|
await sessionSaveCommand(opts);
|
|
81
81
|
});
|
|
82
82
|
session.command("load").description("Load a saved session from sync folder").action(async () => {
|
|
83
|
-
const { sessionLoadCommand } = await import("./session-
|
|
83
|
+
const { sessionLoadCommand } = await import("./session-FMC2MG6C.js");
|
|
84
84
|
await sessionLoadCommand();
|
|
85
85
|
});
|
|
86
86
|
var memory = program.command("memory").description("AI memory system \u2014 store and search project knowledge");
|
|
@@ -100,43 +100,43 @@ Memory subcommands:
|
|
|
100
100
|
memory mcp Show MCP server setup instructions`
|
|
101
101
|
);
|
|
102
102
|
memory.command("status").description("Show memory system status").action(async () => {
|
|
103
|
-
const { memoryStatusCommand } = await import("./memory-
|
|
103
|
+
const { memoryStatusCommand } = await import("./memory-SO33RAI5.js");
|
|
104
104
|
await memoryStatusCommand();
|
|
105
105
|
});
|
|
106
106
|
memory.command("search").description("Search memories by query").argument("<query>", "search query").action(async (query) => {
|
|
107
|
-
const { memorySearchCommand } = await import("./memory-
|
|
107
|
+
const { memorySearchCommand } = await import("./memory-SO33RAI5.js");
|
|
108
108
|
await memorySearchCommand(query);
|
|
109
109
|
});
|
|
110
110
|
memory.command("list").description(
|
|
111
111
|
"List memories in current project, or all projects with --projects"
|
|
112
112
|
).option("--projects", "List all project databases with size and metadata").action(async (opts) => {
|
|
113
|
-
const { memoryListCommand } = await import("./memory-
|
|
113
|
+
const { memoryListCommand } = await import("./memory-SO33RAI5.js");
|
|
114
114
|
await memoryListCommand(opts);
|
|
115
115
|
});
|
|
116
116
|
memory.command("init").description(
|
|
117
117
|
"Initialize memory system \u2014 interactive wizard (first time) or config menu"
|
|
118
118
|
).action(async () => {
|
|
119
|
-
const { memoryInitCommand } = await import("./memory-
|
|
119
|
+
const { memoryInitCommand } = await import("./memory-SO33RAI5.js");
|
|
120
120
|
await memoryInitCommand();
|
|
121
121
|
});
|
|
122
122
|
memory.command("config").description("Configure memory system settings").action(async () => {
|
|
123
|
-
const { memoryConfigCommand } = await import("./memory-
|
|
123
|
+
const { memoryConfigCommand } = await import("./memory-SO33RAI5.js");
|
|
124
124
|
await memoryConfigCommand();
|
|
125
125
|
});
|
|
126
126
|
memory.command("start-daemon").description("Start the memory daemon (Tier 2 \u2014 MiniSearch)").action(async () => {
|
|
127
|
-
const { memoryStartDaemonCommand } = await import("./memory-
|
|
127
|
+
const { memoryStartDaemonCommand } = await import("./memory-SO33RAI5.js");
|
|
128
128
|
await memoryStartDaemonCommand();
|
|
129
129
|
});
|
|
130
130
|
memory.command("stop-daemon").description("Stop the memory daemon").action(async () => {
|
|
131
|
-
const { memoryStopDaemonCommand } = await import("./memory-
|
|
131
|
+
const { memoryStopDaemonCommand } = await import("./memory-SO33RAI5.js");
|
|
132
132
|
await memoryStopDaemonCommand();
|
|
133
133
|
});
|
|
134
134
|
memory.command("rebuild").description("Rebuild the daemon search index").action(async () => {
|
|
135
|
-
const { memoryRebuildCommand } = await import("./memory-
|
|
135
|
+
const { memoryRebuildCommand } = await import("./memory-SO33RAI5.js");
|
|
136
136
|
await memoryRebuildCommand();
|
|
137
137
|
});
|
|
138
138
|
memory.command("mcp").description("Show MCP server setup instructions").action(async () => {
|
|
139
|
-
const { memoryMcpCommand } = await import("./memory-
|
|
139
|
+
const { memoryMcpCommand } = await import("./memory-SO33RAI5.js");
|
|
140
140
|
await memoryMcpCommand();
|
|
141
141
|
});
|
|
142
142
|
memory.command("rm").description("Remove a project database").option("--project-id <id>", "Project ID to remove").option("--all", "Remove all project databases").option(
|
|
@@ -144,7 +144,7 @@ memory.command("rm").description("Remove a project database").option("--project-
|
|
|
144
144
|
"Remove orphaned projects (source dir missing or 0 memories)"
|
|
145
145
|
).action(
|
|
146
146
|
async (opts) => {
|
|
147
|
-
const { memoryRmCommand } = await import("./memory-
|
|
147
|
+
const { memoryRmCommand } = await import("./memory-SO33RAI5.js");
|
|
148
148
|
await memoryRmCommand(opts);
|
|
149
149
|
}
|
|
150
150
|
);
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
ensureMemoryBuilt,
|
|
3
3
|
isMemoryInitialized,
|
|
4
4
|
memoryInitWizard
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5OXEUKOE.js";
|
|
6
6
|
import {
|
|
7
7
|
memoryConfigMenu
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-U7IVVN45.js";
|
|
9
9
|
import {
|
|
10
10
|
getLibPath
|
|
11
11
|
} from "./chunk-RZRT7NGT.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-GTX6I57V.js";
|
|
13
13
|
import {
|
|
14
14
|
findStatuslineHookPath,
|
|
15
15
|
getCurrentAccountEmail,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryBuilt,
|
|
3
3
|
printMemoryMcpConfig
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5OXEUKOE.js";
|
|
5
|
+
import "./chunk-U7IVVN45.js";
|
|
6
6
|
import {
|
|
7
7
|
getLibPath
|
|
8
8
|
} from "./chunk-RZRT7NGT.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveDocsDir,
|
|
11
11
|
resolveMemoryDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GTX6I57V.js";
|
|
13
13
|
import "./chunk-DHH6SRXV.js";
|
|
14
14
|
import "./chunk-HPNRQYLM.js";
|
|
15
15
|
import {
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
memoryStatusCommand,
|
|
14
14
|
memoryStopDaemonCommand,
|
|
15
15
|
printMemoryMcpConfig
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-5OXEUKOE.js";
|
|
17
|
+
import "./chunk-U7IVVN45.js";
|
|
18
18
|
import "./chunk-RZRT7NGT.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-GTX6I57V.js";
|
|
20
20
|
import "./chunk-DHH6SRXV.js";
|
|
21
21
|
import "./chunk-HPNRQYLM.js";
|
|
22
22
|
import "./chunk-EVGXUDX4.js";
|