mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 04:25:52 +01:00
Forward validated agent identity to environment probes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
252d68f28a
commit
5b72e2f050
1 file changed
+2
-1
@@ -3060,7 +3060,7 @@ export function agentRoutes(
|
||||
if (test) {
|
||||
const testEnvironmentId = await resolveAdapterTestEnvironmentId(companyId, environmentId);
|
||||
if (testEnvironmentId) await assertAdapterTestEnvironmentForCompany(companyId, testEnvironmentId);
|
||||
const target = await resolveAdapterTestExecutionContext({ companyId, adapterType, environmentId: testEnvironmentId });
|
||||
const target = await resolveAdapterTestExecutionContext({ companyId, agentId, adapterType, environmentId: testEnvironmentId });
|
||||
try {
|
||||
if (!target.executionTarget && target.fallbackChecks.length > 0) throw unprocessable("The agent environment is not available for adoption");
|
||||
await withManagedAiProbe(db, { companyId, agentId, responsibleUserId: userId, adapterType, binding, config, allowUninstalledPersonal: newAgent, allowUninstalledShared, allowLegacyValidation: true }, async managed => {
|
||||
@@ -3193,6 +3193,7 @@ export function agentRoutes(
|
||||
const { executionTarget, environmentName, fallbackChecks, sandboxIdentityCheck, release } =
|
||||
await resolveAdapterTestExecutionContext({
|
||||
companyId,
|
||||
agentId: savedAgentId ?? undefined,
|
||||
adapterType: type,
|
||||
environmentId: requestedEnvironmentId,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user