(params: {
projectPath: string;
agentId: string;
agentType?: string;
})
| 14 | const CHILD_WORKSPACE_ID = "child-workspace"; |
| 15 | |
| 16 | function createSubagentMetadata(params: { |
| 17 | projectPath: string; |
| 18 | agentId: string; |
| 19 | agentType?: string; |
| 20 | }): WorkspaceMetadata { |
| 21 | return { |
| 22 | id: CHILD_WORKSPACE_ID, |
| 23 | name: CHILD_WORKSPACE_ID, |
| 24 | projectName: path.basename(params.projectPath), |
| 25 | projectPath: params.projectPath, |
| 26 | runtimeConfig: DEFAULT_RUNTIME_CONFIG, |
| 27 | parentWorkspaceId: PARENT_WORKSPACE_ID, |
| 28 | agentId: params.agentId, |
| 29 | agentType: params.agentType ?? params.agentId, |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | async function resolvePolicyForAgent(params: { |
| 34 | agentId: string; |
no test coverage detected