Agent import
These compositions use the existing modal, input, and button primitives. Application adapters own authorization, queries, attestations, and submission. They are shared by organization administration and the global admin panel.
import { AgentImportForm } from "@rogo-technologies/ui/compositions/agent-import-form";
import { AgentImportConflictView } from "@rogo-technologies/ui/compositions/agent-import-conflict-view";Render AgentImportForm inside ModalContent, after the modal header. Supply initial-sharing and owner pickers as slots and conflict views as the conflicts slot. Choosing a person assigns that person as the owner; choosing a team or organization reveals the owner picker. Require an owner before selecting a ZIP. The form has no network access.
| Props | Purpose |
|---|---|
busy, reading, submitting, canSubmit | Pending feedback and submission availability |
preview | Agent name, description, and attached skill count |
error | Actionable upload error text |
initialSharing, hasOwner | Sharing choice and owner-selection state |
ownerPicker, audiencePicker, conflicts | Application-provided controls |
fileUpload | Optional upload control; defaults to a ZIP input |
onChooseFile, onSubmit, onCancel | File, submit, and cancellation handlers |
AgentImportConflictView displays candidate descriptions and separates View skill from Link existing skill. Supply onView to load files through the application's authorized endpoint, then pass files, isLoading, isError, and viewing. onLink records the chosen candidate; viewing never links automatically. selectedId marks the current choice.
<AgentImportConflictView
conflict={{
slug: "example",
candidates: [{ id: "skill", name: "Example", description: "An existing workflow" }],
}}
selectedId={undefined}
onView={loadSkillFiles}
onLink={selectSkill}
viewing={false}
files={undefined}
isLoading={false}
isError={false}
/>