Skip to content

Artifact And Evidence Refs

ArtifactRefListEvidenceRefList 是 Lime React AgentUI 的标准引用 surface。它们只展示 projection 里的轻量 ref,并把打开意图交给宿主应用。

实现锚点:packages/agent-runtime-ui/src/refs.tsx

导出

ts
export {
  AgentUiRefList,
  ArtifactRefList,
  EvidenceRefList
} from "@limecloud/agent-runtime-ui";

Props

ts
export interface AgentUiRefListProps<TRef extends AgentUiRefView = AgentUiRefView> {
  refs?: readonly TRef[];
  empty?: ReactNode;
  ariaLabel?: string;
  className?: string;
  refKind?: string;
  refTitle?: (ref: TRef) => ReactNode;
  refMeta?: (ref: TRef) => ReactNode;
  refPreview?: (ref: TRef) => ReactNode;
  refActionLabel?: (ref: TRef) => ReactNode;
  onSelectRef?: (ref: TRef) => void;
}

ArtifactRefListPropsEvidenceRefListProps 分别绑定 AgentUiArtifactRefViewAgentUiEvidenceRefView

DOM Contract

Class / attributePurpose
.agent-artifact-refsartifact ref list root。
.agent-evidence-refsevidence ref list root。
.agent-ref-card单个 ref card。
.agent-ref-action选择 / 打开按钮。
data-ref-kindartifact / evidence / custom ref kind。
data-ref-idartifact/evidence id。
data-source-event-id产生该 ref 的 runtime event id。

Example

tsx
<ArtifactRefList
  refs={state.artifacts}
  refTitle={(ref) => artifactTitle(ref.id)}
  refActionLabel={() => "打开交付物"}
  onSelectRef={(ref) => openArtifactWorkspace(ref.id)}
/>
tsx
<EvidenceRefList
  refs={state.evidence}
  refTitle={(ref) => evidenceTitle(ref.id)}
  refActionLabel={() => "打开证据"}
  onSelectRef={(ref) => openEvidencePack(ref.id)}
/>

Boundary

  • 不读取 artifact body。
  • 不导出 evidence pack。
  • 不推断 review verdict。
  • 不把完整文件或长报告塞进 React state。
  • 不把本地 artifact workspace 状态写回 projection facts。

验证入口

bash
npm --prefix packages/agent-runtime-ui run test

Lime Agent Workbench 是面向 Lime AgentRuntime 与 AgentUI 的治理优先标准。