/* Shared — the cross-project global feed and the shared key/value context store. * Writing a context key needs the higher-trust shared-write token. */ "use client"; import { useState } from "react"; import { useDashboard } from "@/components/store"; import { Button, Card, Input, StatusBadge } from "@/components/ui"; import { fmtFull } from "@/lib/format"; export function SharedSection() { const s = useDashboard(); const [key, setKey] = useState(""); const [value, setValue] = useState(""); const set = async () => { if (!key.trim() || !value.trim()) return; const ok = await s.setSharedKey(key.trim(), value.trim()); if (ok) { setKey(""); setValue(""); } }; return ( <>
| When | Agent | Status | Summary | CI |
|---|---|---|---|---|
| {fmtFull(e.created_at)} | {e.agent_id} |
|
{e.summary || "—"} |
|
Requires the shared-context write token (or admin/global if unset).
| Key | Value | Updated |
|---|---|---|
| {c.key} | {c.value} | {fmtFull(c.updated_at)} |