feat(server): W4-A integration endpoints and contract gaps

- POST /acquisition-plans: manual submit via download.plan -> download.submit
  (same authorization/audit/idempotency path as the agent), slotId or entityId
- read-only /media-assets, /asset-locations, /asset-unit-coverage, /path-bindings,
  /reconcile-runs, /server-mappings, /artifacts, GET /title-aliases/{id};
  unimplemented write endpoints removed from api.ts; registry test now checks both directions
- candidate evaluation upsert per (slot, source_release) + migration 0022 dedupe/unique index
- organization records expose downloadTaskId (+ list filter); inventory adds
  subscribed/candidateReasons; feed sources expose derived possibleGap
- GET /events?after=&limit= JSON replay page for API key callers (same sse_event table)
- preference tag revision history from audit_event; subscriptions/identities/aliases
  lists carry mediaEntityTitle; subscription q/mediaKind search; slot subscriptionId
  filter + currentAsset summary; policy preview samples carry title/reasons
- DecisionSummary, IdentityRevisionList, ReleaseIdentityResult, PolicyPreviewSummary exported from contracts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-27 21:10:02 +08:00
1 parent ea4c384664
commit d3ab54f2bd
34 files changed
+1083 -123

No files matched your search

@@ -65,7 +65,8 @@ function LocalInventory({ release, entry }: { release: WorkbenchRelease; entry:
) : (
<>
<p className="text-meta text-muted-foreground">
{slots.length ? `${slots.length} 个版本目标(已订阅)` : "没有版本目标(未订阅)"}
{slots.length ? `${slots.length} 个版本目标` : "没有版本目标"}
{entry ? (entry.subscribed ? " · 已订阅" : " · 未订阅") : ""}
</p>
{candidates.length ? (
<ul className="space-y-2">
@@ -73,7 +74,7 @@ function LocalInventory({ release, entry }: { release: WorkbenchRelease; entry:
const d = DECISION_LABEL[c.decision];
const slot = slots.find((s) => s.id === c.slotId);
return (
<li key={`${c.slotId}-${c.evaluatedAt}`} className="rounded-lg border border-border/70 px-3 py-2">
<li key={c.slotId} className="rounded-lg border border-border/70 px-3 py-2">
<div className="flex flex-wrap items-center gap-2 text-caption">
<StatusBadge tone={d.tone}>{d.label}</StatusBadge>
<span className="text-foreground">{slot ? `目标 ${slot.name}` : "版本目标"}</span>
@@ -44,7 +44,7 @@ export function InventoryOverlay({
: "未识别到本地作品";
return <span className="text-meta text-muted-foreground">{label}</span>;
}
const flags = inventoryFlags(entry, release.resolutionStatus);
const flags = inventoryFlags(entry, release.resolutionStatus, release.id);
return (
<span className="flex min-w-0 flex-wrap items-center gap-1.5">
<span className="truncate text-meta text-foreground">
@@ -53,11 +53,17 @@ export function InventoryOverlay({
</span>
{loading ? <span className="text-meta text-muted-foreground">库存加载中…</span> : null}
{!loading && entry && flags.length === 0 ? <StatusBadge>本地无版本</StatusBadge> : null}
{flags.map((f) => (
<StatusBadge key={f.key} tone={f.tone}>
{f.label}
</StatusBadge>
))}
{flags.map((f) =>
f.title ? (
<span key={f.key} title={f.title}>
<StatusBadge tone={f.tone}>{f.label}</StatusBadge>
</span>
) : (
<StatusBadge key={f.key} tone={f.tone}>
{f.label}
</StatusBadge>
),
)}
</span>
);
}