fix(runtime): move team building policy into tools

This commit is contained in:
ZacharyZhang-NY committed 2026-04-22 16:38:59 -04:00
1 parent 473486aa61
commit 612a760152
9 files changed
+184 -62

No files matched your search

+2 -3
View File
@@ -24,9 +24,8 @@ export interface RunJob {
/**
* Internal tools (`hire_agent`, `file_approval`) to register on this
* run's agent in addition to the default coding tools. Determined on
* main side before enqueue (see `pi-agent-factory.ts:inject hire_agent
* and file_approval into CEO agent`) so the worker never needs to
* inspect company/agent state. Empty array = no extra tools.
* main side before enqueue so the worker never needs to inspect
* company/agent state. Empty array = no extra tools.
*/
internalTools: ReadonlyArray<"hire_agent" | "file_approval">;
}
@@ -122,7 +122,7 @@ export function createHireAgentTool(rpc: WorkerRpcClient, runId: string): AgentT
name: HIRE_AGENT_TOOL_NAME,
label: "hire agent",
description:
"File a hire_agent approval to add a new direct report to the company. Use when the CEO (or another manager) needs to fill a role. The approval is auto-approved for companies configured in hands-off mode; otherwise it goes to the board. Do not invoke for an agent that already exists.",
"File a hire_agent approval to add one direct report. During CEO Team Building, call this tool 3 to 5 times to populate the initial team. Outside Team Building, use it when the CEO or another manager needs to fill one role. The approval is auto-approved for hands-off companies; otherwise it goes to the board.",
parameters: hireAgentSchema,
async execute(toolCallId, params, _signal?, _onUpdate?) {
const payload: InvokeInternalToolRpcPayload = {