@mnemom/mnemom 0.17.5-next.0 → 0.17.6-next.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.
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* priced set (index.ts pricedSessions: every session is counted). A headless
|
|
8
8
|
* `claude -p` session (entrypoint sdk-cli) is marked: the env of the script that
|
|
9
9
|
* launched it (ANTHROPIC_BASE_URL, a proxy) is never recorded.
|
|
10
|
-
* - Sessions are discovered in ~/.claude/projects
|
|
10
|
+
* - Sessions are discovered in ~/.claude/projects, every ~/.claude-*\/projects, and
|
|
11
|
+
* $CLAUDE_CONFIG_DIR/projects wherever it points (a Console login often lives there).
|
|
11
12
|
* - Dollars are shown for API-billed sessions; Team / Enterprise subscription sessions
|
|
12
13
|
* (the plans `mnemom agent --auth subscription` supports) are in scope as usage-limit
|
|
13
14
|
* headroom with a clearly labelled list-price equivalent. Pro / Max are not supported
|
|
@@ -39,8 +40,11 @@ export interface ScopeResult {
|
|
|
39
40
|
kept: Map<string, Session>;
|
|
40
41
|
excluded: Map<string, string[]>;
|
|
41
42
|
}
|
|
42
|
-
/**
|
|
43
|
-
|
|
43
|
+
/**
|
|
44
|
+
* ~/.claude/projects, ~/.claude-*\/projects and $CLAUDE_CONFIG_DIR/projects that exist
|
|
45
|
+
* (realpath, de-duplicated). CLAUDE_CONFIG_DIR can point anywhere, not only ~/.claude-*.
|
|
46
|
+
*/
|
|
47
|
+
export declare function defaultProjectRoots(home?: string, env?: Record<string, string | undefined>): string[];
|
|
44
48
|
/** Every top-level transcript and subagent transcript under the roots, grouped by session. */
|
|
45
49
|
export declare function discover(roots: readonly string[]): Map<string, Session>;
|
|
46
50
|
export interface ClassifyOptions {
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* priced set (index.ts pricedSessions: every session is counted). A headless
|
|
8
8
|
* `claude -p` session (entrypoint sdk-cli) is marked: the env of the script that
|
|
9
9
|
* launched it (ANTHROPIC_BASE_URL, a proxy) is never recorded.
|
|
10
|
-
* - Sessions are discovered in ~/.claude/projects
|
|
10
|
+
* - Sessions are discovered in ~/.claude/projects, every ~/.claude-*\/projects, and
|
|
11
|
+
* $CLAUDE_CONFIG_DIR/projects wherever it points (a Console login often lives there).
|
|
11
12
|
* - Dollars are shown for API-billed sessions; Team / Enterprise subscription sessions
|
|
12
13
|
* (the plans `mnemom agent --auth subscription` supports) are in scope as usage-limit
|
|
13
14
|
* headroom with a clearly labelled list-price equivalent. Pro / Max are not supported
|
|
@@ -46,8 +47,11 @@ function list(dir) {
|
|
|
46
47
|
return [];
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
/**
|
|
50
|
-
|
|
50
|
+
/**
|
|
51
|
+
* ~/.claude/projects, ~/.claude-*\/projects and $CLAUDE_CONFIG_DIR/projects that exist
|
|
52
|
+
* (realpath, de-duplicated). CLAUDE_CONFIG_DIR can point anywhere, not only ~/.claude-*.
|
|
53
|
+
*/
|
|
54
|
+
export function defaultProjectRoots(home = homedir(), env = process.env) {
|
|
51
55
|
const out = [];
|
|
52
56
|
const add = (p) => {
|
|
53
57
|
const rp = realOrNull(p);
|
|
@@ -59,6 +63,9 @@ export function defaultProjectRoots(home = homedir()) {
|
|
|
59
63
|
if (d.startsWith(".claude-"))
|
|
60
64
|
add(join(home, d, "projects"));
|
|
61
65
|
}
|
|
66
|
+
const configDir = (env.CLAUDE_CONFIG_DIR ?? "").trim();
|
|
67
|
+
if (configDir)
|
|
68
|
+
add(join(configDir, "projects"));
|
|
62
69
|
return out;
|
|
63
70
|
}
|
|
64
71
|
/** Every top-level transcript and subagent transcript under the roots, grouped by session. */
|