coding-friend-cli 1.20.1 → 1.20.2
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-QMD7P67N.js → chunk-2OOQQESF.js} +1 -1
- package/dist/{chunk-JFGLNTZI.js → chunk-DMVSYXKX.js} +1 -1
- package/dist/{chunk-RWUTFVRB.js → chunk-DQRUD4H7.js} +3 -3
- package/dist/{chunk-PHQK2MMO.js → chunk-ENG3TLQX.js} +4 -4
- package/dist/{chunk-CYQU33FY.js → chunk-EVGXUDX4.js} +2 -1
- package/dist/{chunk-V23HBD3E.js → chunk-IMFS66LB.js} +2 -2
- package/dist/{chunk-C5LYVVEI.js → chunk-RMQKSNH7.js} +2 -2
- package/dist/{chunk-7CAIGH2Y.js → chunk-U3ERRSBC.js} +1 -1
- package/dist/{chunk-ORACWEDN.js → chunk-VR3XXOAY.js} +10 -5
- package/dist/{config-RLSM3UAF.js → config-5ZIOKZHL.js} +7 -7
- package/dist/{dev-7DLYIXBO.js → dev-D3RW7PLW.js} +6 -5
- package/dist/{disable-XYZRE3TD.js → disable-3TVAPIMY.js} +4 -4
- package/dist/{enable-3NZBQWLQ.js → enable-LIPT4YGN.js} +4 -4
- package/dist/{host-QDWBFJB2.js → host-Q7XY2CTU.js} +3 -3
- package/dist/index.js +30 -30
- package/dist/{init-ONUC6QMM.js → init-FLADYT36.js} +5 -5
- package/dist/{install-35IWHBIS.js → install-DU264RZD.js} +6 -6
- package/dist/{mcp-GFIOFXOL.js → mcp-QTPM73K4.js} +3 -3
- package/dist/{memory-N6Q2ENBI.js → memory-LTKZUT5H.js} +5 -5
- package/dist/{permission-Z3LOBJ4X.js → permission-EYGAM2D7.js} +2 -2
- package/dist/{session-JGRF5SNX.js → session-OKCDYRB6.js} +19 -9
- package/dist/{status-WK3TBDN7.js → status-ZDJIACCH.js} +8 -8
- package/dist/{statusline-6Y2EBAFQ.js → statusline-A2QPWQ2E.js} +3 -3
- package/dist/{uninstall-NNCEKPIE.js → uninstall-6AYMTIJO.js} +4 -4
- package/dist/{update-NZ2HRWEN.js → update-MPUKWITS.js} +5 -5
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/lib/paths.ts
|
|
2
2
|
import { homedir } from "os";
|
|
3
|
-
import { resolve, join } from "path";
|
|
3
|
+
import { resolve, join, isAbsolute } from "path";
|
|
4
4
|
function resolvePath(p, base = process.cwd()) {
|
|
5
|
-
if (p
|
|
5
|
+
if (isAbsolute(p)) return p;
|
|
6
6
|
if (p.startsWith("~/")) return join(homedir(), p.slice(2));
|
|
7
7
|
return resolve(base, p);
|
|
8
8
|
}
|
|
@@ -62,7 +62,7 @@ function globalConfigDir() {
|
|
|
62
62
|
return join(homedir(), ".coding-friend");
|
|
63
63
|
}
|
|
64
64
|
function encodeProjectPath(absolutePath) {
|
|
65
|
-
return absolutePath.replace(
|
|
65
|
+
return absolutePath.replace(/[\\/:]/g, "-");
|
|
66
66
|
}
|
|
67
67
|
function claudeProjectsDir() {
|
|
68
68
|
return join(homedir(), ".claude", "projects");
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureStatusline,
|
|
3
3
|
getInstalledVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VR3XXOAY.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureShellCompletion
|
|
7
7
|
} from "./chunk-NEQZP5D4.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveScope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RMQKSNH7.js";
|
|
11
11
|
import {
|
|
12
12
|
commandExists,
|
|
13
13
|
run,
|
|
14
14
|
runWithStderr,
|
|
15
15
|
sleepSync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EVGXUDX4.js";
|
|
17
17
|
import {
|
|
18
18
|
claudeSettingsPath,
|
|
19
19
|
readJson
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DQRUD4H7.js";
|
|
21
21
|
import {
|
|
22
22
|
log
|
|
23
23
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -43,7 +43,8 @@ function sleepSync(ms) {
|
|
|
43
43
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
44
44
|
}
|
|
45
45
|
function commandExists(cmd) {
|
|
46
|
-
|
|
46
|
+
const checker = process.platform === "win32" ? "where" : "which";
|
|
47
|
+
return run(checker, [cmd]) !== null;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
export {
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
askScope,
|
|
7
7
|
formatScopeLabel,
|
|
8
8
|
injectBackChoice
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RMQKSNH7.js";
|
|
10
10
|
import {
|
|
11
11
|
globalConfigPath,
|
|
12
12
|
localConfigPath,
|
|
13
13
|
mergeJson,
|
|
14
14
|
readJson
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DQRUD4H7.js";
|
|
16
16
|
import {
|
|
17
17
|
log
|
|
18
18
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
run
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EVGXUDX4.js";
|
|
4
4
|
import {
|
|
5
5
|
globalConfigPath,
|
|
6
6
|
localConfigPath,
|
|
7
7
|
readJson
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DQRUD4H7.js";
|
|
9
9
|
import {
|
|
10
10
|
log
|
|
11
11
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -10,10 +10,11 @@ import {
|
|
|
10
10
|
pluginCachePath,
|
|
11
11
|
readJson,
|
|
12
12
|
writeJson
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DQRUD4H7.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/statusline.ts
|
|
16
16
|
import { existsSync, readdirSync } from "fs";
|
|
17
|
+
import { join } from "path";
|
|
17
18
|
import { checkbox } from "@inquirer/prompts";
|
|
18
19
|
function getInstalledVersion() {
|
|
19
20
|
const data = readJson(installedPluginsPath());
|
|
@@ -41,12 +42,12 @@ function findStatuslineHookPath() {
|
|
|
41
42
|
const cachePath = pluginCachePath();
|
|
42
43
|
const installed = getInstalledVersion();
|
|
43
44
|
if (installed) {
|
|
44
|
-
const hookPath2 =
|
|
45
|
+
const hookPath2 = join(cachePath, installed, "hooks", "statusline.sh");
|
|
45
46
|
if (existsSync(hookPath2)) return { hookPath: hookPath2, version: installed };
|
|
46
47
|
}
|
|
47
48
|
const latest = findLatestVersion();
|
|
48
49
|
if (!latest) return null;
|
|
49
|
-
const hookPath =
|
|
50
|
+
const hookPath = join(cachePath, latest, "hooks", "statusline.sh");
|
|
50
51
|
if (!existsSync(hookPath)) return null;
|
|
51
52
|
return { hookPath, version: latest };
|
|
52
53
|
}
|
|
@@ -73,12 +74,16 @@ async function selectStatuslineComponents(current) {
|
|
|
73
74
|
function saveStatuslineConfig(components) {
|
|
74
75
|
mergeJson(globalConfigPath(), { statusline: { components } });
|
|
75
76
|
}
|
|
77
|
+
function buildStatuslineCommand(hookPath) {
|
|
78
|
+
const normalized = hookPath.replace(/\\/g, "/");
|
|
79
|
+
return `bash "${normalized}"`;
|
|
80
|
+
}
|
|
76
81
|
function writeStatuslineSettings(hookPath) {
|
|
77
82
|
const settingsPath = claudeSettingsPath();
|
|
78
83
|
const settings = readJson(settingsPath) ?? {};
|
|
79
84
|
settings.statusLine = {
|
|
80
85
|
type: "command",
|
|
81
|
-
command:
|
|
86
|
+
command: buildStatuslineCommand(hookPath)
|
|
82
87
|
};
|
|
83
88
|
writeJson(settingsPath, settings);
|
|
84
89
|
}
|
|
@@ -88,7 +93,7 @@ function ensureStatusline() {
|
|
|
88
93
|
const settingsPath = claudeSettingsPath();
|
|
89
94
|
const settings = readJson(settingsPath) ?? {};
|
|
90
95
|
const current = settings.statusLine?.command;
|
|
91
|
-
const expected =
|
|
96
|
+
const expected = buildStatuslineCommand(info.hookPath);
|
|
92
97
|
if (current === expected) return null;
|
|
93
98
|
settings.statusLine = { type: "command", command: expected };
|
|
94
99
|
writeJson(settingsPath, settings);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
memoryConfigMenu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IMFS66LB.js";
|
|
4
4
|
import {
|
|
5
5
|
getAllRules,
|
|
6
6
|
getExistingRules
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U3ERRSBC.js";
|
|
8
8
|
import "./chunk-RZRT7NGT.js";
|
|
9
9
|
import {
|
|
10
10
|
findStatuslineHookPath,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
saveStatuslineConfig,
|
|
13
13
|
selectStatuslineComponents,
|
|
14
14
|
writeStatuslineSettings
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VR3XXOAY.js";
|
|
16
16
|
import {
|
|
17
17
|
ALL_COMPONENT_IDS,
|
|
18
18
|
DEFAULT_CONFIG
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
getScopeLabel,
|
|
32
32
|
injectBackChoice,
|
|
33
33
|
showConfigHint
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RMQKSNH7.js";
|
|
35
35
|
import {
|
|
36
36
|
run
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-EVGXUDX4.js";
|
|
38
38
|
import {
|
|
39
39
|
claudeLocalSettingsPath,
|
|
40
40
|
claudeSettingsPath,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
mergeJson,
|
|
44
44
|
readJson,
|
|
45
45
|
resolvePath
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-DQRUD4H7.js";
|
|
47
47
|
import {
|
|
48
48
|
log
|
|
49
49
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -540,7 +540,7 @@ async function editPermissions() {
|
|
|
540
540
|
)
|
|
541
541
|
});
|
|
542
542
|
if (choice === BACK) return;
|
|
543
|
-
const { permissionCommand } = await import("./permission-
|
|
543
|
+
const { permissionCommand } = await import("./permission-EYGAM2D7.js");
|
|
544
544
|
switch (choice) {
|
|
545
545
|
case "interactive":
|
|
546
546
|
await permissionCommand({});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isMarketplaceRegistered,
|
|
3
3
|
isPluginInstalled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DMVSYXKX.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureStatusline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VR3XXOAY.js";
|
|
8
8
|
import "./chunk-POC2WHU2.js";
|
|
9
9
|
import {
|
|
10
10
|
ensureShellCompletion
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
commandExists,
|
|
14
14
|
run
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EVGXUDX4.js";
|
|
16
16
|
import {
|
|
17
17
|
devStatePath,
|
|
18
18
|
knownMarketplacesPath,
|
|
19
19
|
pluginCachePath,
|
|
20
20
|
readJson,
|
|
21
21
|
writeJson
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DQRUD4H7.js";
|
|
23
23
|
import {
|
|
24
24
|
log
|
|
25
25
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
copyFileSync
|
|
35
35
|
} from "fs";
|
|
36
36
|
import { resolve, join } from "path";
|
|
37
|
+
import { homedir } from "os";
|
|
37
38
|
import chalk from "chalk";
|
|
38
39
|
var REMOTE_URL = "https://github.com/dinhanhthi/coding-friend.git";
|
|
39
40
|
var MARKETPLACE_NAME = "coding-friend-marketplace";
|
|
@@ -249,7 +250,7 @@ async function devSyncCommand() {
|
|
|
249
250
|
);
|
|
250
251
|
return;
|
|
251
252
|
}
|
|
252
|
-
const shortDest = cacheVersionDir.replace(
|
|
253
|
+
const shortDest = cacheVersionDir.replace(homedir(), "~");
|
|
253
254
|
log.step(`Syncing ${chalk.cyan(pluginSrcDir)} \u2192 ${chalk.dim(shortDest)}`);
|
|
254
255
|
const fileCount = { n: 0 };
|
|
255
256
|
copyDirRecursive(pluginSrcDir, cacheVersionDir, fileCount);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DMVSYXKX.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-RMQKSNH7.js";
|
|
8
|
+
import "./chunk-EVGXUDX4.js";
|
|
9
|
+
import "./chunk-DQRUD4H7.js";
|
|
10
10
|
import {
|
|
11
11
|
log
|
|
12
12
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isPluginDisabled,
|
|
3
3
|
setPluginEnabled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DMVSYXKX.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveScope
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-RMQKSNH7.js";
|
|
8
|
+
import "./chunk-EVGXUDX4.js";
|
|
9
|
+
import "./chunk-DQRUD4H7.js";
|
|
10
10
|
import {
|
|
11
11
|
log
|
|
12
12
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDocsDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OOQQESF.js";
|
|
4
4
|
import {
|
|
5
5
|
getLibPath
|
|
6
6
|
} from "./chunk-RZRT7NGT.js";
|
|
@@ -8,8 +8,8 @@ import "./chunk-POC2WHU2.js";
|
|
|
8
8
|
import {
|
|
9
9
|
run,
|
|
10
10
|
streamExec
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-EVGXUDX4.js";
|
|
12
|
+
import "./chunk-DQRUD4H7.js";
|
|
13
13
|
import {
|
|
14
14
|
log
|
|
15
15
|
} from "./chunk-W5CD7WTX.js";
|
package/dist/index.js
CHANGED
|
@@ -14,54 +14,54 @@ program.name("cf").description(
|
|
|
14
14
|
"coding-friend CLI \u2014 host learning docs, setup MCP, init projects"
|
|
15
15
|
).version(pkg.version, "-v, --version");
|
|
16
16
|
program.command("install").description("Install the Coding Friend plugin into Claude Code").option("--user", "Install at user scope (all projects)").option("--global", "Install at user scope (all projects)").option("--project", "Install at project scope (shared via git)").option("--local", "Install at local scope (this machine only)").action(async (opts) => {
|
|
17
|
-
const { installCommand } = await import("./install-
|
|
17
|
+
const { installCommand } = await import("./install-DU264RZD.js");
|
|
18
18
|
await installCommand(opts);
|
|
19
19
|
});
|
|
20
20
|
program.command("uninstall").description("Uninstall the Coding Friend plugin from Claude Code").option("--user", "Uninstall from user scope (all projects)").option("--global", "Uninstall from user scope (all projects)").option("--project", "Uninstall from project scope").option("--local", "Uninstall from local scope").action(async (opts) => {
|
|
21
|
-
const { uninstallCommand } = await import("./uninstall-
|
|
21
|
+
const { uninstallCommand } = await import("./uninstall-6AYMTIJO.js");
|
|
22
22
|
await uninstallCommand(opts);
|
|
23
23
|
});
|
|
24
24
|
program.command("disable").description("Disable the Coding Friend plugin without uninstalling").option("--user", "Disable at user scope (all projects)").option("--global", "Disable at user scope (all projects)").option("--project", "Disable at project scope").option("--local", "Disable at local scope").action(async (opts) => {
|
|
25
|
-
const { disableCommand } = await import("./disable-
|
|
25
|
+
const { disableCommand } = await import("./disable-3TVAPIMY.js");
|
|
26
26
|
await disableCommand(opts);
|
|
27
27
|
});
|
|
28
28
|
program.command("enable").description("Re-enable the Coding Friend plugin").option("--user", "Enable at user scope (all projects)").option("--global", "Enable at user scope (all projects)").option("--project", "Enable at project scope").option("--local", "Enable at local scope").action(async (opts) => {
|
|
29
|
-
const { enableCommand } = await import("./enable-
|
|
29
|
+
const { enableCommand } = await import("./enable-LIPT4YGN.js");
|
|
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-FLADYT36.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-5ZIOKZHL.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-Q7XY2CTU.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-QTPM73K4.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(
|
|
49
49
|
"--project",
|
|
50
50
|
"Save to project-level settings (.claude/settings.local.json)"
|
|
51
51
|
).action(async (opts) => {
|
|
52
|
-
const { permissionCommand } = await import("./permission-
|
|
52
|
+
const { permissionCommand } = await import("./permission-EYGAM2D7.js");
|
|
53
53
|
await permissionCommand(opts);
|
|
54
54
|
});
|
|
55
55
|
program.command("statusline").description("Setup coding-friend statusline in Claude Code").action(async () => {
|
|
56
|
-
const { statuslineCommand } = await import("./statusline-
|
|
56
|
+
const { statuslineCommand } = await import("./statusline-A2QPWQ2E.js");
|
|
57
57
|
await statuslineCommand();
|
|
58
58
|
});
|
|
59
59
|
program.command("update").description("Update coding-friend plugin, CLI, and statusline").option("--cli", "Update only the CLI (npm package)").option("--plugin", "Update only the Claude Code plugin").option("--statusline", "Update only the statusline").option("--user", "Update plugin at user scope (all projects)").option("--global", "Update plugin at user scope (all projects)").option("--project", "Update plugin at project scope").option("--local", "Update plugin at local scope").action(async (opts) => {
|
|
60
|
-
const { updateCommand } = await import("./update-
|
|
60
|
+
const { updateCommand } = await import("./update-MPUKWITS.js");
|
|
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-ZDJIACCH.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-OKCDYRB6.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-OKCDYRB6.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.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-LTKZUT5H.js");
|
|
148
148
|
await memoryRmCommand(opts);
|
|
149
149
|
}
|
|
150
150
|
);
|
|
@@ -161,35 +161,35 @@ Dev subcommands:
|
|
|
161
161
|
dev update [path] Update local dev plugin to latest version`
|
|
162
162
|
);
|
|
163
163
|
dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
|
|
164
|
-
const { devOnCommand } = await import("./dev-
|
|
164
|
+
const { devOnCommand } = await import("./dev-D3RW7PLW.js");
|
|
165
165
|
await devOnCommand(path);
|
|
166
166
|
});
|
|
167
167
|
dev.command("off").description("Switch back to remote marketplace").action(async () => {
|
|
168
|
-
const { devOffCommand } = await import("./dev-
|
|
168
|
+
const { devOffCommand } = await import("./dev-D3RW7PLW.js");
|
|
169
169
|
await devOffCommand();
|
|
170
170
|
});
|
|
171
171
|
dev.command("status").description("Show current dev mode").action(async () => {
|
|
172
|
-
const { devStatusCommand } = await import("./dev-
|
|
172
|
+
const { devStatusCommand } = await import("./dev-D3RW7PLW.js");
|
|
173
173
|
await devStatusCommand();
|
|
174
174
|
});
|
|
175
175
|
dev.command("sync").description(
|
|
176
176
|
"Copy local source files to plugin cache (no version bump needed)"
|
|
177
177
|
).action(async () => {
|
|
178
|
-
const { devSyncCommand } = await import("./dev-
|
|
178
|
+
const { devSyncCommand } = await import("./dev-D3RW7PLW.js");
|
|
179
179
|
await devSyncCommand();
|
|
180
180
|
});
|
|
181
181
|
dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
|
|
182
182
|
"[path]",
|
|
183
183
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
184
184
|
).action(async (path) => {
|
|
185
|
-
const { devRestartCommand } = await import("./dev-
|
|
185
|
+
const { devRestartCommand } = await import("./dev-D3RW7PLW.js");
|
|
186
186
|
await devRestartCommand(path);
|
|
187
187
|
});
|
|
188
188
|
dev.command("update").description("Update local dev plugin to latest version (off + on)").argument(
|
|
189
189
|
"[path]",
|
|
190
190
|
"path to local coding-friend repo (default: saved path or cwd)"
|
|
191
191
|
).action(async (path) => {
|
|
192
|
-
const { devUpdateCommand } = await import("./dev-
|
|
192
|
+
const { devUpdateCommand } = await import("./dev-D3RW7PLW.js");
|
|
193
193
|
await devUpdateCommand(path);
|
|
194
194
|
});
|
|
195
195
|
program.parse();
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getExistingRules,
|
|
7
7
|
getMissingRules,
|
|
8
8
|
logPluginScriptWarning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U3ERRSBC.js";
|
|
10
10
|
import {
|
|
11
11
|
getLibPath
|
|
12
12
|
} from "./chunk-RZRT7NGT.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
saveStatuslineConfig,
|
|
17
17
|
selectStatuslineComponents,
|
|
18
18
|
writeStatuslineSettings
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VR3XXOAY.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_CONFIG
|
|
22
22
|
} from "./chunk-POC2WHU2.js";
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
getScopeLabel,
|
|
35
35
|
injectBackChoice,
|
|
36
36
|
showConfigHint
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-RMQKSNH7.js";
|
|
38
38
|
import {
|
|
39
39
|
commandExists,
|
|
40
40
|
run
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-EVGXUDX4.js";
|
|
42
42
|
import {
|
|
43
43
|
claudeLocalSettingsPath,
|
|
44
44
|
claudeSettingsPath,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
readJson,
|
|
49
49
|
resolvePath,
|
|
50
50
|
writeJson
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-DQRUD4H7.js";
|
|
52
52
|
import {
|
|
53
53
|
log
|
|
54
54
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLatestVersion,
|
|
3
3
|
semverCompare
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ENG3TLQX.js";
|
|
5
5
|
import {
|
|
6
6
|
enableMarketplaceAutoUpdate,
|
|
7
7
|
isMarketplaceRegistered,
|
|
8
8
|
isPluginDisabled
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DMVSYXKX.js";
|
|
10
10
|
import {
|
|
11
11
|
getInstalledVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VR3XXOAY.js";
|
|
13
13
|
import "./chunk-POC2WHU2.js";
|
|
14
14
|
import {
|
|
15
15
|
ensureShellCompletion
|
|
16
16
|
} from "./chunk-NEQZP5D4.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveScope
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RMQKSNH7.js";
|
|
20
20
|
import {
|
|
21
21
|
commandExists,
|
|
22
22
|
run
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EVGXUDX4.js";
|
|
24
24
|
import {
|
|
25
25
|
devStatePath
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DQRUD4H7.js";
|
|
27
27
|
import {
|
|
28
28
|
log
|
|
29
29
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDocsDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OOQQESF.js";
|
|
4
4
|
import {
|
|
5
5
|
getLibPath
|
|
6
6
|
} from "./chunk-RZRT7NGT.js";
|
|
7
7
|
import "./chunk-POC2WHU2.js";
|
|
8
8
|
import {
|
|
9
9
|
run
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-EVGXUDX4.js";
|
|
11
|
+
import "./chunk-DQRUD4H7.js";
|
|
12
12
|
import {
|
|
13
13
|
log
|
|
14
14
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -5,27 +5,27 @@ import {
|
|
|
5
5
|
editMemoryEmbedding,
|
|
6
6
|
editMemoryTier,
|
|
7
7
|
memoryConfigMenu
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IMFS66LB.js";
|
|
9
9
|
import {
|
|
10
10
|
loadConfig,
|
|
11
11
|
resolveMemoryDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2OOQQESF.js";
|
|
13
13
|
import {
|
|
14
14
|
getLibPath
|
|
15
15
|
} from "./chunk-RZRT7NGT.js";
|
|
16
16
|
import "./chunk-POC2WHU2.js";
|
|
17
17
|
import {
|
|
18
18
|
showConfigHint
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RMQKSNH7.js";
|
|
20
20
|
import {
|
|
21
21
|
run,
|
|
22
22
|
runWithStderr
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EVGXUDX4.js";
|
|
24
24
|
import {
|
|
25
25
|
globalConfigPath,
|
|
26
26
|
localConfigPath,
|
|
27
27
|
readJson
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-DQRUD4H7.js";
|
|
29
29
|
import {
|
|
30
30
|
log
|
|
31
31
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
getExistingRules,
|
|
7
7
|
groupByCategory,
|
|
8
8
|
logPluginScriptWarning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U3ERRSBC.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeLocalSettingsPath,
|
|
12
12
|
claudeSettingsPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DQRUD4H7.js";
|
|
14
14
|
import {
|
|
15
15
|
log
|
|
16
16
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OOQQESF.js";
|
|
4
4
|
import "./chunk-POC2WHU2.js";
|
|
5
5
|
import {
|
|
6
6
|
claudeSessionDir,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
readJson,
|
|
9
9
|
resolvePath,
|
|
10
10
|
writeJson
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DQRUD4H7.js";
|
|
12
12
|
import {
|
|
13
13
|
log
|
|
14
14
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -70,13 +70,23 @@ function listSyncedSessions(syncDir) {
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
function remapProjectPath(originalPath, currentHome) {
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
const unixPattern = /^(\/(?:Users|home)\/[^/]+)(\/.*)?$/;
|
|
74
|
+
const unixMatch = originalPath.match(unixPattern);
|
|
75
|
+
if (unixMatch) {
|
|
76
|
+
const origHomeDir = unixMatch[1];
|
|
77
|
+
const rest = unixMatch[2] ?? "";
|
|
78
|
+
if (origHomeDir === currentHome) return originalPath;
|
|
79
|
+
return currentHome + rest;
|
|
80
|
+
}
|
|
81
|
+
const winPattern = /^([A-Za-z]:\\Users\\[^\\]+)(\\.*)?$/;
|
|
82
|
+
const winMatch = originalPath.match(winPattern);
|
|
83
|
+
if (winMatch) {
|
|
84
|
+
const origHomeDir = winMatch[1];
|
|
85
|
+
const rest = winMatch[2] ?? "";
|
|
86
|
+
if (origHomeDir === currentHome) return originalPath;
|
|
87
|
+
return currentHome + rest;
|
|
88
|
+
}
|
|
89
|
+
return originalPath;
|
|
80
90
|
}
|
|
81
91
|
function saveSession(opts) {
|
|
82
92
|
const { jsonlPath, sessionId, label, projectPath, syncDir, previewText } = opts;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveMemoryDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OOQQESF.js";
|
|
4
4
|
import {
|
|
5
5
|
getCliVersion,
|
|
6
6
|
getLatestCliVersion,
|
|
7
7
|
getLatestVersion,
|
|
8
8
|
semverCompare
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ENG3TLQX.js";
|
|
10
10
|
import {
|
|
11
11
|
detectPluginScope,
|
|
12
12
|
isPluginDisabled
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DMVSYXKX.js";
|
|
14
14
|
import {
|
|
15
15
|
getExistingRules
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-U3ERRSBC.js";
|
|
17
17
|
import {
|
|
18
18
|
getLibPath
|
|
19
19
|
} from "./chunk-RZRT7NGT.js";
|
|
20
20
|
import {
|
|
21
21
|
getInstalledVersion
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VR3XXOAY.js";
|
|
23
23
|
import "./chunk-POC2WHU2.js";
|
|
24
24
|
import "./chunk-NEQZP5D4.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-RMQKSNH7.js";
|
|
26
|
+
import "./chunk-EVGXUDX4.js";
|
|
27
27
|
import {
|
|
28
28
|
claudeSettingsPath,
|
|
29
29
|
devStatePath,
|
|
30
30
|
globalConfigPath,
|
|
31
31
|
localConfigPath,
|
|
32
32
|
readJson
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-DQRUD4H7.js";
|
|
34
34
|
import "./chunk-W5CD7WTX.js";
|
|
35
35
|
|
|
36
36
|
// src/commands/status.ts
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
saveStatuslineConfig,
|
|
5
5
|
selectStatuslineComponents,
|
|
6
6
|
writeStatuslineSettings
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VR3XXOAY.js";
|
|
8
8
|
import {
|
|
9
9
|
ALL_COMPONENT_IDS
|
|
10
10
|
} from "./chunk-POC2WHU2.js";
|
|
11
11
|
import {
|
|
12
12
|
commandExists
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-EVGXUDX4.js";
|
|
14
|
+
import "./chunk-DQRUD4H7.js";
|
|
15
15
|
import {
|
|
16
16
|
log
|
|
17
17
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isMarketplaceRegistered,
|
|
3
3
|
isPluginInstalled
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DMVSYXKX.js";
|
|
5
5
|
import {
|
|
6
6
|
hasShellCompletion,
|
|
7
7
|
removeShellCompletion
|
|
8
8
|
} from "./chunk-NEQZP5D4.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveScope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RMQKSNH7.js";
|
|
12
12
|
import {
|
|
13
13
|
commandExists,
|
|
14
14
|
run
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EVGXUDX4.js";
|
|
16
16
|
import {
|
|
17
17
|
claudeSettingsPath,
|
|
18
18
|
devStatePath,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
marketplaceClonePath,
|
|
22
22
|
readJson,
|
|
23
23
|
writeJson
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DQRUD4H7.js";
|
|
25
25
|
import {
|
|
26
26
|
log
|
|
27
27
|
} from "./chunk-W5CD7WTX.js";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
getLatestVersion,
|
|
5
5
|
semverCompare,
|
|
6
6
|
updateCommand
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-ENG3TLQX.js";
|
|
8
|
+
import "./chunk-VR3XXOAY.js";
|
|
9
9
|
import "./chunk-POC2WHU2.js";
|
|
10
10
|
import "./chunk-NEQZP5D4.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-RMQKSNH7.js";
|
|
12
|
+
import "./chunk-EVGXUDX4.js";
|
|
13
|
+
import "./chunk-DQRUD4H7.js";
|
|
14
14
|
import "./chunk-W5CD7WTX.js";
|
|
15
15
|
export {
|
|
16
16
|
getCliVersion,
|