claude-dev-env 8.88.5 → 8.88.7
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/.agents/skills/efficient-review/tools/config/test_efficient_review_constants.py +23 -0
- package/.agents/skills/efficient-review/tools/test_efficient_review.py +33 -0
- package/.agents/skills/efficient-review/tools/test_efficient_review_plan.py +27 -0
- package/bin/install.settings-defaults.test.mjs +5 -1
- package/hooks/blocking/test_verify_before_acting.py +1 -1
- package/hooks/features/session-context.md +4 -0
- package/hooks/hooks.json +18 -0
- package/hooks/hooks_constants/compaction_user_messages_constants.py +93 -0
- package/hooks/hooks_constants/test_haiku_spawn_slim_gate_constants.py +18 -0
- package/hooks/session/compaction_recall_prompt.py +90 -0
- package/hooks/session/compaction_trim_eval.py +392 -0
- package/hooks/session/compaction_user_messages.py +307 -0
- package/hooks/session/fixtures/compaction_user_messages/deploy_session.jsonl +17 -0
- package/hooks/session/fixtures/compaction_user_messages/long_session.jsonl +41 -0
- package/hooks/session/fixtures/compaction_user_messages/one_compaction.jsonl +7 -0
- package/hooks/session/fixtures/compaction_user_messages/recall_request_session.jsonl +4 -0
- package/hooks/session/fixtures/compaction_user_messages/trim_cases.json +47 -0
- package/hooks/session/test_compaction_recall_prompt.py +144 -0
- package/hooks/session/test_compaction_trim_eval.py +115 -0
- package/hooks/session/test_compaction_user_messages.py +228 -0
- package/package.json +1 -1
- package/scripts/ci/scratch-home-install.mjs +3 -2
- package/scripts/ci/scratch-home-install.test.mjs +23 -1
- package/settings.json +2 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Install this package into a scratch home directory.
|
|
4
4
|
*
|
|
5
|
-
* The installer writes into `$HOME/.claude
|
|
6
|
-
* configuration.
|
|
5
|
+
* The installer writes into `$HOME/.claude`, rewrites the global git
|
|
6
|
+
* configuration, and edits `$CODEX_HOME/config.toml`. All three are redirected here so a run leaves the caller's own home
|
|
7
7
|
* untouched.
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -44,6 +44,7 @@ export function scratchHomeEnvironment(scratchHome) {
|
|
|
44
44
|
HOME: scratchHome,
|
|
45
45
|
USERPROFILE: scratchHome,
|
|
46
46
|
GIT_CONFIG_GLOBAL: join(scratchHome, SANDBOX_GIT_CONFIG_NAME),
|
|
47
|
+
CODEX_HOME: join(scratchHome, '.codex'),
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import assert from 'node:assert/strict';
|
|
2
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
3
4
|
import { join } from 'node:path';
|
|
4
5
|
import test from 'node:test';
|
|
5
6
|
|
|
@@ -30,6 +31,7 @@ test('a scratch home starts with an isolated global git configuration and is rem
|
|
|
30
31
|
assert.equal(environment.HOME, scratchHome);
|
|
31
32
|
assert.equal(environment.USERPROFILE, scratchHome);
|
|
32
33
|
assert.equal(environment.GIT_CONFIG_GLOBAL, gitConfigPath);
|
|
34
|
+
assert.equal(environment.CODEX_HOME, join(scratchHome, '.codex'));
|
|
33
35
|
} finally {
|
|
34
36
|
removeScratchHome(scratchHome);
|
|
35
37
|
}
|
|
@@ -47,3 +49,23 @@ test('the installer runs against a scratch home and leaves the caller home alone
|
|
|
47
49
|
removeScratchHome(scratchHome);
|
|
48
50
|
}
|
|
49
51
|
});
|
|
52
|
+
|
|
53
|
+
test('an install into a scratch home leaves the caller Codex home config alone', () => {
|
|
54
|
+
const callerCodexHome = mkdtempSync(join(tmpdir(), 'cde-caller-codex-'));
|
|
55
|
+
const callerConfigPath = join(callerCodexHome, 'config.toml');
|
|
56
|
+
const callerConfigBody = 'model = "caller"\n';
|
|
57
|
+
writeFileSync(callerConfigPath, callerConfigBody);
|
|
58
|
+
const priorCodexHome = process.env.CODEX_HOME;
|
|
59
|
+
process.env.CODEX_HOME = callerCodexHome;
|
|
60
|
+
const scratchHome = createScratchHome();
|
|
61
|
+
try {
|
|
62
|
+
const install = runInstaller(scratchHome, []);
|
|
63
|
+
assert.equal(install.status, 0, `${install.stdout}\n${install.stderr}`);
|
|
64
|
+
assert.equal(readFileSync(callerConfigPath, 'utf8'), callerConfigBody);
|
|
65
|
+
} finally {
|
|
66
|
+
if (priorCodexHome === undefined) delete process.env.CODEX_HOME;
|
|
67
|
+
else process.env.CODEX_HOME = priorCodexHome;
|
|
68
|
+
removeScratchHome(scratchHome);
|
|
69
|
+
rmSync(callerCodexHome, { recursive: true, force: true });
|
|
70
|
+
}
|
|
71
|
+
});
|