feat(docker): make mock-agent runnable inside Docker for E2E
Lay the backend groundwork so the existing mock-agent can run inside local_docker containers — needed for real-Docker E2E tests that don't require Anthropic/OpenAI API keys. Container builder bind-mounts a host mock-agent binary at /usr/local/bin/mock-agent when KANDEV_MOCK_AGENT_LINUX_BINARY is set (or build/mock-agent-linux-amd64 sits next to the kandev binary), the same pattern already used for agentctl. MockAgent.BuildCommand always resolves via PATH so the same command works on host (E2E PATH includes bin/) and in containers (mounted at /usr/local/bin/mock-agent). Mock now declares non-nil empty RemoteAuth so it counts as a remote-capable agent. The remoteauth catalog includes specs even with zero methods, and the frontend gating helper treats an empty-method spec as "no credentials needed" — letting mock-agent pass the configure-on-executor check that hides uncatalogued agents on remote executors. repositoryCloneURL falls back to the local origin remote URL when the repo has no provider info, so local-only repos with a real remote (including file:// remotes used in E2E) work on remote executors that clone inside the container. Makefile: build-mock-agent-linux target mirrors build-agentctl-linux.
This commit is contained in:
@@ -226,12 +226,6 @@ function NewSessionForm({
|
||||
const [isCreating, setIsCreating] = useState(false);
|
||||
const [contextValue, setContextValue] = useState("blank");
|
||||
const [selectedProfileId, setSelectedProfileId] = useState(initialProfileId ?? defaultProfileId);
|
||||
useEnforceCompatibleProfile(
|
||||
Boolean(executorProfile),
|
||||
compatibleAgentProfiles,
|
||||
selectedProfileId,
|
||||
setSelectedProfileId,
|
||||
);
|
||||
const [hasPrompt, setHasPrompt] = useState(false);
|
||||
const promptRef = useRef<HTMLTextAreaElement>(null);
|
||||
const {
|
||||
@@ -251,6 +245,12 @@ function NewSessionForm({
|
||||
[attachments, handleRemoveAttachment],
|
||||
);
|
||||
const compatibleAgentProfiles = useCompatibleAgentProfiles(agentProfiles, executorProfile);
|
||||
useEnforceCompatibleProfile(
|
||||
Boolean(executorProfile),
|
||||
compatibleAgentProfiles,
|
||||
selectedProfileId,
|
||||
setSelectedProfileId,
|
||||
);
|
||||
const profileOptions = useAgentProfileOptions(compatibleAgentProfiles);
|
||||
const sessionOptions = useSessionOptions(taskId);
|
||||
const isUtilityConfigured = useIsUtilityConfigured();
|
||||
|
||||
Reference in New Issue
Block a user