暴走抑止
This commit is contained in:
parent
eb32cf0138
commit
9546806649
@ -55,7 +55,7 @@ export const callAiJudge: AiJudgeCaller = async (
|
|||||||
const response = await runAgent(undefined, prompt, {
|
const response = await runAgent(undefined, prompt, {
|
||||||
cwd: options.cwd,
|
cwd: options.cwd,
|
||||||
maxTurns: 1,
|
maxTurns: 1,
|
||||||
allowedTools: [],
|
permissionMode: 'readonly',
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.status !== 'done') {
|
if (response.status !== 'done') {
|
||||||
|
|||||||
@ -82,8 +82,8 @@ export class OptionsBuilder {
|
|||||||
): RunAgentOptions {
|
): RunAgentOptions {
|
||||||
return {
|
return {
|
||||||
...this.buildBaseOptions(step),
|
...this.buildBaseOptions(step),
|
||||||
// Do not pass permission mode in report/status phases.
|
// Report/status phases are read-only regardless of movement settings.
|
||||||
permissionMode: undefined,
|
permissionMode: 'readonly',
|
||||||
sessionId,
|
sessionId,
|
||||||
allowedTools: overrides.allowedTools,
|
allowedTools: overrides.allowedTools,
|
||||||
maxTurns: overrides.maxTurns,
|
maxTurns: overrides.maxTurns,
|
||||||
|
|||||||
@ -69,8 +69,8 @@ abstract class JudgmentStrategyBase implements JudgmentStrategy {
|
|||||||
protected async runConductor(instruction: string, context: JudgmentContext): Promise<string> {
|
protected async runConductor(instruction: string, context: JudgmentContext): Promise<string> {
|
||||||
const response = await runAgent('conductor', instruction, {
|
const response = await runAgent('conductor', instruction, {
|
||||||
cwd: context.cwd,
|
cwd: context.cwd,
|
||||||
allowedTools: [],
|
|
||||||
maxTurns: 3,
|
maxTurns: 3,
|
||||||
|
permissionMode: 'readonly',
|
||||||
language: context.language,
|
language: context.language,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user