feat(extensions): add Roast Room, bring Codex to parity, fix audit findings
Roast Room is installed as a managed Git clone under ~/.my-ai-configuration/roast-room, shared by Claude and Codex. A personal launcher skill runs it from any folder, starts its live room when needed, and only runs when invoked by name (/roast-room, $roast-room). Codex now gets what was Claude-only before: the Caveman skill with a SessionStart hook that keeps it on, PreCompact and session-pointer hooks, execpolicy deny rules mirroring Claude's permissions.deny, and Impeccable's custom agents registered in ~/.codex/agents. The command-safety hook checks both shell dialects for Codex on Windows, where PowerShell text arrives as Bash, in both the PowerShell and Bash packages. Audit fixes: - command-safety blocks git checkout -- / restore / push --force / stash clear and find -delete, and treats heredoc bodies as text - removing a clone clears read-only Git files, git errors no longer abort the extension sync, and a lock left by a dead process is replaced - with-credential passes child flags such as -k or -d through unchanged and resolves commands from PATH - uninstall strips only owned hooks from settings.json and config.toml and keeps the selection while another client is installed; update keeps CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY; Bash merges write the same bytes as PowerShell - qmd no longer trusts a stale daemon.json after a lost start race and prunes collections of deleted repositories - Bash scripts avoid GNU-only find -printf Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
63a36d90e0
commit
b35e2254b3
48 files changed
+1059
-98
No files matched your search
@@ -2,10 +2,10 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { existsSync, mkdtempSync, rmSync, utimesSync, writeFileSync } from 'node:fs';
|
||||
import { existsSync, mkdtempSync, readFileSync, rmSync, utimesSync, writeFileSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join, resolve } from 'node:path';
|
||||
import { INDEX_EXCLUDES, acquireStartLock, createServer, gitFingerprint, ignoreGlobs, indexIgnores, keepModelsLoaded } from '../../shared/qmd/qmd-daemon.mjs';
|
||||
import { INDEX_EXCLUDES, acquireStartLock, createServer, gitFingerprint, ignoreGlobs, indexIgnores, keepModelsLoaded, pruneCollections } from '../../shared/qmd/qmd-daemon.mjs';
|
||||
import { collectionName } from '../../shared/qmd/qmd-lib.mjs';
|
||||
|
||||
const defaultHits = () => [{ displayPath: `${collectionName('/r')}/src/a.ts`, body: 'x\nretry here', bestChunkPos: 2, bestChunk: 'retry here', score: 0.91 }];
|
||||
@@ -222,6 +222,27 @@ test('git ignored paths reach addCollection and are persisted only when they cha
|
||||
assert.equal(s.store.calls.filter((c) => c[0] === 'update').length, 3);
|
||||
});
|
||||
|
||||
test('daemon start prunes recorded repo collections whose path is gone and keeps the rest', async (t) => {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'qmd-prune-'));
|
||||
t.after(() => rmSync(dir, { recursive: true, force: true }));
|
||||
const collectionsFile = join(dir, 'collections.json');
|
||||
const gone = join(dir, 'deleted-worktree');
|
||||
const recorded = ['repo-aaaaaaaaaaaa', 'repo-bbbbbbbbbbbb', 'repo-cccccccccccc', 'repo-dddddddddddd'];
|
||||
writeFileSync(collectionsFile, JSON.stringify(recorded));
|
||||
const store = { listCollections: async () => [
|
||||
{ name: 'notes', pwd: gone }, { name: 'repo-aaaaaaaaaaaa', pwd: gone }, { name: 'repo-bbbbbbbbbbbb', pwd: dir }, { name: 'repo-cccccccccccc', pwd: gone },
|
||||
] };
|
||||
const removed = [];
|
||||
const logged = [];
|
||||
await pruneCollections({ store, collectionsFile, log: (line) => logged.push(line), remove: (name) => {
|
||||
if (name === 'repo-cccccccccccc') throw new Error('locked');
|
||||
removed.push(name);
|
||||
} });
|
||||
assert.deepEqual(removed, ['repo-aaaaaaaaaaaa'], 'only a missing path is removed; foreign collections are never touched');
|
||||
assert.deepEqual(JSON.parse(readFileSync(collectionsFile, 'utf8')), ['repo-bbbbbbbbbbbb', 'repo-cccccccccccc', 'repo-dddddddddddd']);
|
||||
assert.equal(logged.length, 1, 'a failed removal is logged and kept for the next start');
|
||||
});
|
||||
|
||||
test('the start lock admits one launcher and is taken over after 2 minutes', (t) => {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'qmd-lock-'));
|
||||
t.after(() => rmSync(dir, { recursive: true, force: true }));
|
||||
|
||||
Reference in new issue
Block a user