style: run prettier and eslint on src/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,8 +48,12 @@ describe('stopContainer', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('rejects names with shell metacharacters', () => {
|
it('rejects names with shell metacharacters', () => {
|
||||||
expect(() => stopContainer('foo; rm -rf /')).toThrow('Invalid container name');
|
expect(() => stopContainer('foo; rm -rf /')).toThrow(
|
||||||
expect(() => stopContainer('foo$(whoami)')).toThrow('Invalid container name');
|
'Invalid container name',
|
||||||
|
);
|
||||||
|
expect(() => stopContainer('foo$(whoami)')).toThrow(
|
||||||
|
'Invalid container name',
|
||||||
|
);
|
||||||
expect(() => stopContainer('foo`id`')).toThrow('Invalid container name');
|
expect(() => stopContainer('foo`id`')).toThrow('Invalid container name');
|
||||||
expect(mockExecSync).not.toHaveBeenCalled();
|
expect(mockExecSync).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -410,7 +410,9 @@ async function runAgent(
|
|||||||
const isStaleSession =
|
const isStaleSession =
|
||||||
sessionId &&
|
sessionId &&
|
||||||
output.error &&
|
output.error &&
|
||||||
/no conversation found|ENOENT.*\.jsonl|session.*not found/i.test(output.error);
|
/no conversation found|ENOENT.*\.jsonl|session.*not found/i.test(
|
||||||
|
output.error,
|
||||||
|
);
|
||||||
|
|
||||||
if (isStaleSession) {
|
if (isStaleSession) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
|||||||
@@ -441,9 +441,9 @@ export async function processTaskIpc(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Defense in depth: agent cannot set isMain via IPC.
|
// Defense in depth: agent cannot set isMain via IPC.
|
||||||
// Preserve isMain from the existing registration so IPC config
|
// Preserve isMain from the existing registration so IPC config
|
||||||
// updates (e.g. adding additionalMounts) don't strip the flag.
|
// updates (e.g. adding additionalMounts) don't strip the flag.
|
||||||
const existingGroup = registeredGroups[data.jid];
|
const existingGroup = registeredGroups[data.jid];
|
||||||
deps.registerGroup(data.jid, {
|
deps.registerGroup(data.jid, {
|
||||||
name: data.name,
|
name: data.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user