@forwardimpact/libeval 0.1.41 → 0.1.42
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/package.json +1 -1
- package/src/facilitator.js +21 -0
- package/src/supervisor.js +3 -0
package/package.json
CHANGED
package/src/facilitator.js
CHANGED
|
@@ -394,6 +394,8 @@ const devNull = new Writable({
|
|
|
394
394
|
* @param {string} [deps.agentModel] - Agent model override (falls back to `model`).
|
|
395
395
|
* @param {string} [deps.facilitatorModel] - Facilitator model override (falls back to `model`).
|
|
396
396
|
* @param {number} [deps.maxTurns]
|
|
397
|
+
* @param {string[]} [deps.facilitatorAllowedTools] - Tools the facilitator may use; defaults to a read/write file-edit set.
|
|
398
|
+
* @param {string[]} [deps.facilitatorDisallowedTools] - Additional tools to block on the facilitator; merged with the sub-agent spawn defaults (Agent/Task/TaskOutput/TaskStop).
|
|
397
399
|
* @param {string} [deps.facilitatorProfile] - Facilitator profile name; resolved into the main-thread system prompt via `composeProfilePrompt`.
|
|
398
400
|
* @param {string} [deps.profilesDir] - Directory containing `<name>.md` profile files. Defaults to `<facilitatorCwd>/.claude/agents`. Resolved once from the facilitator's cwd so profiles travel with the project, not with per-agent sandboxes.
|
|
399
401
|
* @param {string} [deps.taskAmend] - Opaque addendum appended to the task before delivery.
|
|
@@ -408,6 +410,8 @@ export function createFacilitator({
|
|
|
408
410
|
agentModel,
|
|
409
411
|
facilitatorModel,
|
|
410
412
|
maxTurns,
|
|
413
|
+
facilitatorAllowedTools,
|
|
414
|
+
facilitatorDisallowedTools,
|
|
411
415
|
facilitatorProfile,
|
|
412
416
|
profilesDir,
|
|
413
417
|
taskAmend,
|
|
@@ -467,12 +471,29 @@ export function createFacilitator({
|
|
|
467
471
|
return { name: config.name, role: config.role, runner };
|
|
468
472
|
});
|
|
469
473
|
|
|
474
|
+
// Block the SDK's sub-agent spawn tools on the facilitator: its job is to
|
|
475
|
+
// coordinate participants through the libeval orchestration harness, not
|
|
476
|
+
// to fan work out to ad-hoc Claude Code sub-agents. Mirrors the supervisor.
|
|
477
|
+
const defaultDisallowed = ["Agent", "Task", "TaskOutput", "TaskStop"];
|
|
478
|
+
const disallowedTools = facilitatorDisallowedTools
|
|
479
|
+
? [...new Set([...defaultDisallowed, ...facilitatorDisallowedTools])]
|
|
480
|
+
: defaultDisallowed;
|
|
481
|
+
|
|
470
482
|
const facilitatorRunner = createAgentRunner({
|
|
471
483
|
cwd: facilitatorCwd,
|
|
472
484
|
query,
|
|
473
485
|
output: devNull,
|
|
474
486
|
model: facilitatorModel ?? model,
|
|
475
487
|
maxTurns: maxTurns ?? 20,
|
|
488
|
+
allowedTools: facilitatorAllowedTools ?? [
|
|
489
|
+
"Bash",
|
|
490
|
+
"Read",
|
|
491
|
+
"Glob",
|
|
492
|
+
"Grep",
|
|
493
|
+
"Write",
|
|
494
|
+
"Edit",
|
|
495
|
+
],
|
|
496
|
+
disallowedTools,
|
|
476
497
|
onLine: (line) => facilitator.emitLine("facilitator", line),
|
|
477
498
|
mcpServers: { orchestration: facilitatorServer },
|
|
478
499
|
settingSources: ["project"],
|
package/src/supervisor.js
CHANGED
|
@@ -561,6 +561,9 @@ export function createSupervisor({
|
|
|
561
561
|
redactor,
|
|
562
562
|
});
|
|
563
563
|
|
|
564
|
+
// Block the SDK's sub-agent spawn tools on the supervisor: its job is to
|
|
565
|
+
// coordinate the agent through the libeval orchestration harness, not to
|
|
566
|
+
// fan work out to ad-hoc Claude Code sub-agents. Mirrors the facilitator.
|
|
564
567
|
const defaultDisallowed = ["Agent", "Task", "TaskOutput", "TaskStop"];
|
|
565
568
|
const disallowedTools = supervisorDisallowedTools
|
|
566
569
|
? [...new Set([...defaultDisallowed, ...supervisorDisallowedTools])]
|