claude-memory-admin 1.12.1 → 1.13.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/README.md +6 -5
- package/package.json +1 -1
- package/public/views/cost.mjs +3 -2
- package/public/views/settings.mjs +3 -1
- package/src/cost.mjs +19 -0
- package/src/settings.mjs +6 -15
package/README.md
CHANGED
|
@@ -309,9 +309,9 @@ through, each labelled with the file it came from:
|
|
|
309
309
|
|
|
310
310
|
`autoMemoryEnabled`, `autoMemoryDirectory`, `claudeMdExcludes` and
|
|
311
311
|
`cleanupPeriodDays`, plus `CLAUDE_CODE_DISABLE_AUTO_MEMORY` wherever it is set:
|
|
312
|
-
in the
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
in the `env` block of any of the five, which a session exports over the shell's
|
|
313
|
+
value and which reading `process.env` alone would miss, or in the environment,
|
|
314
|
+
which decides only when no file sets it. `CLAUDE_CONFIG_DIR` is named here too, since it decides where
|
|
315
315
|
all five of those files are looked for in the first place.
|
|
316
316
|
|
|
317
317
|
It also names the failures that are otherwise silent:
|
|
@@ -351,8 +351,9 @@ saved to `~/.claude/settings.json`:
|
|
|
351
351
|
Each is shown the way the Settings segment shows a key: every layer that sets it,
|
|
352
352
|
strongest first, with the losers struck through. Your user file is the weakest of
|
|
353
353
|
the five, so when something stronger already sets the key the panel says the save
|
|
354
|
-
will not take effect *before* you make it.
|
|
355
|
-
|
|
354
|
+
will not take effect *before* you make it. A shell export is called out when it
|
|
355
|
+
disagrees with what is on disk: a file's `env` block replaces it, so it only
|
|
356
|
+
decides when no file sets the variable.
|
|
356
357
|
|
|
357
358
|
Below them, one row per agent file in `~/.claude/agents`, each with a **model** and
|
|
358
359
|
an **effort** picker - a summariser pinned to Haiku while a reviewer stays on Opus.
|
package/package.json
CHANGED
package/public/views/cost.mjs
CHANGED
|
@@ -158,8 +158,9 @@ function settingCard(entry, writable) {
|
|
|
158
158
|
if (entry.envValue && entry.envValue !== entry.effective?.value) {
|
|
159
159
|
card.append(issue(
|
|
160
160
|
`${entry.envVar}=${entry.envValue} is set in the environment`,
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
entry.effective
|
|
162
|
+
? `A settings file's env block replaces a shell export, so ${entry.effective.value} from ${entry.effective.scope} settings is what a session runs with. This is what the shell that launched this tool had; a session started elsewhere may see something different.`
|
|
163
|
+
: `No settings file sets this, so any session started from a shell that has it runs with ${entry.envValue}. Saving a value below overrides the shell export.`,
|
|
163
164
|
));
|
|
164
165
|
}
|
|
165
166
|
|
|
@@ -64,7 +64,9 @@ export async function renderSettings(container) {
|
|
|
64
64
|
container.append(node('div', { class: ui.issue(false) }, [
|
|
65
65
|
node('div', { class: ui.issueBody }, [
|
|
66
66
|
node('div', { class: ui.issueTitle, text: `${data.env.name}=${data.env.value}` }),
|
|
67
|
-
node('div', { class: ui.issueDetail, text:
|
|
67
|
+
node('div', { class: ui.issueDetail, text: data.env.scope === 'env'
|
|
68
|
+
? `Set in this shell and no settings file sets it, so it forces ${data.env.overrides} off. The store will not grow while it is set.`
|
|
69
|
+
: `Set in the env block of ${data.env.file}, which replaces any shell value, so it forces ${data.env.overrides} off. The store will not grow while it is set.` }),
|
|
68
70
|
]),
|
|
69
71
|
]));
|
|
70
72
|
}
|
package/src/cost.mjs
CHANGED
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
// promptSuggestionEnabled whether a suggested next prompt is generated
|
|
20
20
|
// after every turn. On by default, and it
|
|
21
21
|
// spends tokens whether anyone uses it or not.
|
|
22
|
+
// env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
|
|
23
|
+
// whether a named subagent launches as a
|
|
24
|
+
// teammate, each one a full session of its own.
|
|
22
25
|
|
|
23
26
|
import fs from 'node:fs';
|
|
24
27
|
import path from 'node:path';
|
|
@@ -95,6 +98,22 @@ export const COST_KEYS = [
|
|
|
95
98
|
{ value: true, label: 'true' },
|
|
96
99
|
],
|
|
97
100
|
},
|
|
101
|
+
{
|
|
102
|
+
key: 'agentTeams',
|
|
103
|
+
path: ['env', 'CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS'],
|
|
104
|
+
label: 'CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS',
|
|
105
|
+
title: 'Agent teams',
|
|
106
|
+
detail: 'Experimental. When on, any subagent Claude names launches as a teammate: a full Claude Code session with its own context window, so token use scales with the number of teammates. Teams can form without being asked for, because Claude names subagents on its own.',
|
|
107
|
+
envVar: 'CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS',
|
|
108
|
+
unset: 'Default',
|
|
109
|
+
allowModelId: false,
|
|
110
|
+
custom: null,
|
|
111
|
+
options: [
|
|
112
|
+
{ value: null, label: 'Default', note: 'unset - off' },
|
|
113
|
+
{ value: '1', label: '1', note: 'on - costs more tokens' },
|
|
114
|
+
{ value: '0', label: '0', note: 'off, overrides a shell export' },
|
|
115
|
+
],
|
|
116
|
+
},
|
|
98
117
|
];
|
|
99
118
|
|
|
100
119
|
/**
|
package/src/settings.mjs
CHANGED
|
@@ -199,26 +199,17 @@ function truthyEnv(value) {
|
|
|
199
199
|
* block whose entries a session exports before it starts, so the same switch is
|
|
200
200
|
* equally settable in any of the five layers. Reading only process.env reported
|
|
201
201
|
* auto memory as on for anyone who had turned it off in a file - the reverse of
|
|
202
|
-
* what this tool is for.
|
|
202
|
+
* what this tool is for. A file's entry replaces the shell's value, so the shell
|
|
203
|
+
* only decides when no file sets the variable.
|
|
203
204
|
*/
|
|
204
205
|
export function disableAutoMemoryEnv({ layers = null, projectDir = null, env = process.env } = {}) {
|
|
205
|
-
const raw = env[DISABLE_AUTO_MEMORY];
|
|
206
|
-
if (truthyEnv(raw)) {
|
|
207
|
-
return { disabling: true, value: raw, scope: 'env', file: null };
|
|
208
|
-
}
|
|
209
|
-
|
|
210
206
|
const found = lookupPath(layers || settingsLayers({ projectDir }), ['env', DISABLE_AUTO_MEMORY]);
|
|
211
|
-
if (found
|
|
212
|
-
return { disabling:
|
|
207
|
+
if (found) {
|
|
208
|
+
return { disabling: truthyEnv(found.value), value: found.value, scope: found.scope, file: found.file };
|
|
213
209
|
}
|
|
214
210
|
|
|
215
|
-
const
|
|
216
|
-
return {
|
|
217
|
-
disabling: false,
|
|
218
|
-
value: value === undefined ? null : value,
|
|
219
|
-
scope: raw !== undefined && raw !== null ? 'env' : found?.scope ?? null,
|
|
220
|
-
file: raw !== undefined && raw !== null ? null : found?.file ?? null,
|
|
221
|
-
};
|
|
211
|
+
const raw = env[DISABLE_AUTO_MEMORY] ?? null;
|
|
212
|
+
return { disabling: truthyEnv(raw), value: raw, scope: raw === null ? null : 'env', file: null };
|
|
222
213
|
}
|
|
223
214
|
|
|
224
215
|
/**
|