{
  "component": {
    "id": "agent-run",
    "name": "Agent run",
    "tier": "pro",
    "exampleId": "agent-run",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/agent-run-demo.tsx",
    "exportName": "AgentRunDemo",
    "sha256": "956a2e337d93c660d420d16662dc710fffd4e1148fdebe393ffa7e0984864586",
    "helperImports": [],
    "directComponentImports": [
      "agent-run"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/agent-run",
    "registryUrl": "https://tidalui.com/r/pro/agent-run.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/agent-run",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/agent-run",
      "registryUrl": "https://tidalui.com/r/pro/agent-run.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/agent-run.tsx",
    "exports": [
      "TidalAgentRun",
      "TidalRunStatus",
      "TidalRunStep"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/agent-run.css",
      "components/ui/status-badge.css",
      "components/ui/progress.css",
      "components/ui/collapsible-panel.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [
      "https://tidalui.com/r/tidal-button.json",
      "https://tidalui.com/r/status-badge.json",
      "@tidal-pro/progress",
      "@tidal-pro/collapsible-panel"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "agent-run",
      "collapsible-panel",
      "progress",
      "status-badge",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/agent-run.css",
      "components/ui/status-badge.css",
      "components/ui/progress.css",
      "components/ui/collapsible-panel.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/agent-run.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/agent-run-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useLayoutEffect, useRef, useState } from \"react\";\n\nimport { TidalAgentRun, type TidalRunStatus, type TidalRunStep } from \"./components/ui/agent-run\";\n\nimport \"./components/ui/agent-run.css\";\n\nimport \"./components/ui/status-badge.css\";\n\nimport \"./components/ui/progress.css\";\n\nimport \"./components/ui/collapsible-panel.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .agent-run-demo {\\n  width: min(100%, 640px);\\n  max-width: 640px;\\n  min-width: 0;\\n}\\n.tidal-scope .agent-run-demo-controls {\\n  display: flex;\\n  gap: 8px;\\n  flex-wrap: wrap;\\n  margin-top: 16px;\\n}\\n.tidal-scope .agent-run-demo-controls button {\\n  min-height: 44px;\\n  padding: 10px 14px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 9px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: inherit;\\n  font-size: 12px;\\n}\\n.tidal-scope .agent-run-demo-controls button:disabled {\\n  opacity: 0.45;\\n}\";\n\nexport function AgentRunDemo() {\n  const advance = useRef<HTMLButtonElement>(null),\n    run = useRef<HTMLElement>(null);\n  const [status, setStatus] = useState<TidalRunStatus>(\"running\"),\n    [step, setStep] = useState(1);\n  useLayoutEffect(() => {\n    if (status === \"completed\" && document.activeElement === advance.current)\n      run.current\n        ?.querySelector<HTMLElement>(\".tidal-agent-run-note\")\n        ?.focus({ preventScroll: true });\n  }, [status]);\n  const labels = [\n    \"Read project notes\",\n    \"Review open tasks\",\n    \"Prepare a summary\",\n  ];\n  const steps: TidalRunStep[] = labels.map((label, i) => ({\n    id: String(i),\n    label,\n    status:\n      status === \"completed\" || i < step\n        ? \"completed\"\n        : i === step && status === \"running\"\n          ? \"running\"\n          : \"pending\",\n    description: [\"3 sample documents\", \"5 sample tasks\", \"Markdown report\"][i],\n    content: [\n      \"Release notes, design review and launch checklist.\",\n      \"Two sample tasks need an owner before launch.\",\n      \"The sample report is ready for review.\",\n    ][i],\n  }));\n  return (\n    <div className=\"agent-run-demo\">\n      <TidalAgentRun\n        ref={run}\n        title=\"Prepare project summary\"\n        description=\"Review notes and open tasks for the next project update.\"\n        status={status}\n        steps={steps}\n        elapsedText=\"Sample run\"\n        statusNote={\n          status === \"completed\"\n            ? \"Sample summary complete.\"\n            : status === \"cancelled\"\n              ? \"Sample run cancelled.\"\n              : \"Local preview. No agent is running.\"\n        }\n        onCancel={() => setStatus(\"cancelled\")}\n        onRetry={() => {\n          setStatus(\"running\");\n          setStep(1);\n        }}\n      >\n        {status === \"completed\" ? (\n          <p>Two tasks need an owner. The mobile review is complete.</p>\n        ) : undefined}\n      </TidalAgentRun>\n      <div className=\"agent-run-demo-controls\">\n        <button\n          ref={advance}\n          disabled={status !== \"running\"}\n          onClick={() => {\n            if (step < 2) setStep(step + 1);\n            else setStatus(\"completed\");\n          }}\n        >\n          Advance sample\n        </button>\n        <button\n          onClick={() => {\n            setStatus(\"running\");\n            setStep(1);\n          }}\n        >\n          Reset\n        </button>\n      </div>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <AgentRunDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/agent-run.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "status",
      "type": "inferred-from-existing-demo",
      "initial": "\"running\"",
      "setter": "setStatus",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onCancel",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onRetry",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": false,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "No form submit is present in the existing demo.",
    "resetBehavior": "No reset control is present in the existing demo.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Consumer-provided label remains required where the component API requires one.",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
