@getcatalystiq/agent-plane-ui 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface DailyAgentStat {
4
+ date: string;
5
+ agent_name: string;
6
+ run_count: number;
7
+ cost_usd: number;
8
+ }
9
+ declare function RunCharts({ stats }: {
10
+ stats: DailyAgentStat[];
11
+ }): react_jsx_runtime.JSX.Element;
12
+
13
+ export { type DailyAgentStat, RunCharts };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface DailyAgentStat {
4
+ date: string;
5
+ agent_name: string;
6
+ run_count: number;
7
+ cost_usd: number;
8
+ }
9
+ declare function RunCharts({ stats }: {
10
+ stats: DailyAgentStat[];
11
+ }): react_jsx_runtime.JSX.Element;
12
+
13
+ export { type DailyAgentStat, RunCharts };
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/index.cjs CHANGED
@@ -1213,7 +1213,7 @@ function McpServerListPage({ initialData }) {
1213
1213
  servers.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyRow, { colSpan: 8, children: 'No custom connectors registered. Click "+ New Connector" to add one.' })
1214
1214
  ] })
1215
1215
  ] }),
1216
- /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: showCreate, onOpenChange: setShowCreate, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { children: [
1216
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: showCreate, onOpenChange: setShowCreate, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-lg", children: [
1217
1217
  /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Register Connector" }) }),
1218
1218
  /* @__PURE__ */ jsxRuntime.jsxs(DialogBody, { className: "space-y-3", children: [
1219
1219
  createError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: createError }),
@@ -1230,7 +1230,7 @@ function McpServerListPage({ initialData }) {
1230
1230
  ] }) }),
1231
1231
  /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: !!editTarget, onOpenChange: (open) => {
1232
1232
  if (!open) setEditTarget(null);
1233
- }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { children: [
1233
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-lg", children: [
1234
1234
  /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Edit Connector" }) }),
1235
1235
  /* @__PURE__ */ jsxRuntime.jsxs(DialogBody, { className: "space-y-3", children: [
1236
1236
  editError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: editError }),
@@ -1295,17 +1295,25 @@ function PluginMarketplaceListPage({ initialData }) {
1295
1295
  );
1296
1296
  const [showAdd, setShowAdd] = React3.useState(false);
1297
1297
  const [adding, setAdding] = React3.useState(false);
1298
+ const [addError, setAddError] = React3.useState("");
1298
1299
  const [newMarketplace, setNewMarketplace] = React3.useState({ name: "", github_repo: "" });
1299
1300
  const [deleteTarget, setDeleteTarget] = React3.useState(null);
1300
1301
  const [deleting, setDeleting] = React3.useState(false);
1301
1302
  const [deleteError, setDeleteError] = React3.useState("");
1303
+ function resetAddForm() {
1304
+ setNewMarketplace({ name: "", github_repo: "" });
1305
+ setAddError("");
1306
+ }
1302
1307
  async function handleAdd() {
1303
1308
  setAdding(true);
1309
+ setAddError("");
1304
1310
  try {
1305
1311
  await client.pluginMarketplaces.create(newMarketplace);
1306
1312
  setShowAdd(false);
1307
- setNewMarketplace({ name: "", github_repo: "" });
1313
+ resetAddForm();
1308
1314
  mutate("plugin-marketplaces");
1315
+ } catch (err) {
1316
+ setAddError(err?.message ?? "Failed to add marketplace");
1309
1317
  } finally {
1310
1318
  setAdding(false);
1311
1319
  }
@@ -1334,14 +1342,39 @@ function PluginMarketplaceListPage({ initialData }) {
1334
1342
  return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-96 rounded-lg" });
1335
1343
  }
1336
1344
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1337
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowAdd(!showAdd), children: showAdd ? "Cancel" : "Add Marketplace" }) }),
1338
- showAdd && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-border p-4 space-y-3", children: [
1339
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
1340
- /* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "Name", value: newMarketplace.name, onChange: (e) => setNewMarketplace({ ...newMarketplace, name: e.target.value }) }),
1341
- /* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "GitHub Repo (owner/repo)", value: newMarketplace.github_repo, onChange: (e) => setNewMarketplace({ ...newMarketplace, github_repo: e.target.value }) })
1345
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowAdd(true), children: "+ Add Marketplace" }) }),
1346
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: showAdd, onOpenChange: (v) => {
1347
+ setShowAdd(v);
1348
+ if (!v) resetAddForm();
1349
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-md", children: [
1350
+ /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Add Marketplace" }) }),
1351
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogBody, { className: "space-y-3", children: [
1352
+ /* @__PURE__ */ jsxRuntime.jsx(FormField, { label: "Name", children: /* @__PURE__ */ jsxRuntime.jsx(
1353
+ Input,
1354
+ {
1355
+ value: newMarketplace.name,
1356
+ onChange: (e) => setNewMarketplace({ ...newMarketplace, name: e.target.value }),
1357
+ placeholder: "My Marketplace"
1358
+ }
1359
+ ) }),
1360
+ /* @__PURE__ */ jsxRuntime.jsx(FormField, { label: "GitHub Repo", children: /* @__PURE__ */ jsxRuntime.jsx(
1361
+ Input,
1362
+ {
1363
+ value: newMarketplace.github_repo,
1364
+ onChange: (e) => setNewMarketplace({ ...newMarketplace, github_repo: e.target.value }),
1365
+ placeholder: "owner/repo"
1366
+ }
1367
+ ) }),
1368
+ /* @__PURE__ */ jsxRuntime.jsx(FormError, { error: addError })
1342
1369
  ] }),
1343
- /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: handleAdd, disabled: adding || !newMarketplace.name || !newMarketplace.github_repo, children: adding ? "Adding..." : "Add Marketplace" })
1344
- ] }),
1370
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { children: [
1371
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: () => {
1372
+ setShowAdd(false);
1373
+ resetAddForm();
1374
+ }, children: "Cancel" }),
1375
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", onClick: handleAdd, disabled: adding || !newMarketplace.name || !newMarketplace.github_repo, children: adding ? "Adding..." : "Add Marketplace" })
1376
+ ] })
1377
+ ] }) }),
1345
1378
  /* @__PURE__ */ jsxRuntime.jsxs(AdminTable, { children: [
1346
1379
  /* @__PURE__ */ jsxRuntime.jsxs(AdminTableHead, { children: [
1347
1380
  /* @__PURE__ */ jsxRuntime.jsx(Th, { children: "Name" }),
@@ -1423,7 +1456,7 @@ function PluginMarketplaceDetailPage({ marketplaceId, initialData, initialPlugin
1423
1456
  (c) => c.pluginMarketplaces.get(marketplaceId),
1424
1457
  initialData ? { fallbackData: initialData } : void 0
1425
1458
  );
1426
- const { data: pluginsResult } = useApi(
1459
+ const { data: plugins } = useApi(
1427
1460
  `marketplace-${marketplaceId}-plugins`,
1428
1461
  (c) => c.pluginMarketplaces.listPlugins(marketplaceId),
1429
1462
  initialPlugins ? { fallbackData: initialPlugins } : void 0
@@ -1489,10 +1522,7 @@ function PluginMarketplaceDetailPage({ marketplaceId, initialData, initialPlugin
1489
1522
  ] }),
1490
1523
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1491
1524
  /* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { title: "Plugins" }),
1492
- !pluginsResult ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-48 rounded-lg" }) : !pluginsResult.ok ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-destructive", children: [
1493
- "Failed to load plugins: ",
1494
- pluginsResult.message
1495
- ] }) : pluginsResult.data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "No plugins found in this marketplace." }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: pluginsResult.data.map((plugin) => /* @__PURE__ */ jsxRuntime.jsx(
1525
+ !plugins ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-48 rounded-lg" }) : plugins.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "No plugins found in this marketplace." }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: plugins.map((plugin) => /* @__PURE__ */ jsxRuntime.jsx(
1496
1526
  LinkComponent,
1497
1527
  {
1498
1528
  href: `${basePath}/plugin-marketplaces/${marketplaceId}/plugins/${plugin.name}`,