@getcatalystiq/agent-plane-ui 0.1.18 → 0.1.20

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.
package/dist/index.d.cts CHANGED
@@ -612,8 +612,6 @@ interface Agent {
612
612
  max_turns: number;
613
613
  max_budget_usd: number;
614
614
  max_runtime_seconds: number;
615
- soul_md?: string | null;
616
- identity_md?: string | null;
617
615
  }
618
616
  interface AgentEditFormProps {
619
617
  agent: Agent;
package/dist/index.d.ts CHANGED
@@ -612,8 +612,6 @@ interface Agent {
612
612
  max_turns: number;
613
613
  max_budget_usd: number;
614
614
  max_runtime_seconds: number;
615
- soul_md?: string | null;
616
- identity_md?: string | null;
617
615
  }
618
616
  interface AgentEditFormProps {
619
617
  agent: Agent;
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
- import { cn, Card, CardHeader, CardTitle, CardContent, Button, Badge, useNavigation, useApi, Skeleton, useAgentPlaneClient, Input, supportsClaudeRunner, buttonVariants } from './chunk-P4N2P42X.js';
2
- export { AgentPlaneProvider, Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Input, Skeleton, badgeVariants, buttonVariants, cn, useAgentPlaneClient, useApi, useAuthError, useNavigation } from './chunk-P4N2P42X.js';
1
+ import { Card, CardHeader, CardTitle, CardContent, useApi, Skeleton, FileTreeEditor } from './chunk-CE2RHDPY.js';
2
+ export { Card, CardContent, CardDescription, CardHeader, CardTitle, Skeleton, useApi } from './chunk-CE2RHDPY.js';
3
+ import { cn, Dialog, DialogContent, DialogHeader, DialogTitle, DialogBody, DialogFooter, Button, Badge, useNavigation, useAgentPlaneClient, DialogDescription, FormField, Input, supportsClaudeRunner, buttonVariants } from './chunk-XFI227OB.js';
4
+ export { AgentPlaneProvider, Badge, Button, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FormField, Input, badgeVariants, buttonVariants, cn, useAgentPlaneClient, useAuthError, useNavigation } from './chunk-XFI227OB.js';
3
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import * as React3 from 'react';
5
- import React3__default, { lazy, useState, useCallback, useMemo, useRef, useEffect, Suspense } from 'react';
6
+ import * as React from 'react';
7
+ import React__default, { lazy, useState, useCallback, useMemo, useRef, useEffect, Suspense } from 'react';
6
8
  import { useSWRConfig } from 'swr';
7
9
  import ReactMarkdown from 'react-markdown';
8
10
  import { Command } from 'cmdk';
@@ -25,7 +27,7 @@ function Select({ className = "", ...props }) {
25
27
  ] }) })
26
28
  ] });
27
29
  }
28
- var Textarea = React3.forwardRef(
30
+ var Textarea = React.forwardRef(
29
31
  ({ className, ...props }, ref) => {
30
32
  return /* @__PURE__ */ jsx(
31
33
  "textarea",
@@ -41,14 +43,6 @@ var Textarea = React3.forwardRef(
41
43
  }
42
44
  );
43
45
  Textarea.displayName = "Textarea";
44
- function FormField({ label, children, error, hint }) {
45
- return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
46
- /* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-muted-foreground", children: label }),
47
- children,
48
- hint && !error && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: hint }),
49
- error && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive mt-1", children: error })
50
- ] });
51
- }
52
46
  function FormError({ error }) {
53
47
  if (!error) return null;
54
48
  return /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: error });
@@ -139,7 +133,7 @@ function PaginationBar({
139
133
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 py-2 border-t border-border bg-muted/20 text-sm", children: [
140
134
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
141
135
  /* @__PURE__ */ jsx("span", { children: "Rows per page:" }),
142
- PAGE_SIZE_OPTIONS.map((ps) => /* @__PURE__ */ jsx(React3__default.Fragment, { children: renderLink(
136
+ PAGE_SIZE_OPTIONS.map((ps) => /* @__PURE__ */ jsx(React__default.Fragment, { children: renderLink(
143
137
  buildHref(1, ps),
144
138
  ps,
145
139
  `px-2 py-0.5 rounded text-xs ${pageSize === ps ? "bg-primary text-primary-foreground font-medium" : "hover:bg-muted"}`
@@ -187,71 +181,6 @@ function Tabs({ tabs, defaultTab = 0 }) {
187
181
  /* @__PURE__ */ jsx("div", { className: "pt-6", children: tabs[active]?.content })
188
182
  ] });
189
183
  }
190
- function Dialog({ open, onOpenChange, children }) {
191
- React3.useEffect(() => {
192
- if (!open) return;
193
- function onKeyDown(e) {
194
- if (e.key === "Escape") onOpenChange(false);
195
- }
196
- document.addEventListener("keydown", onKeyDown);
197
- return () => document.removeEventListener("keydown", onKeyDown);
198
- }, [open, onOpenChange]);
199
- React3.useEffect(() => {
200
- if (!open) return;
201
- const prev = document.body.style.overflow;
202
- document.body.style.overflow = "hidden";
203
- return () => {
204
- document.body.style.overflow = prev;
205
- };
206
- }, [open]);
207
- if (!open) return null;
208
- return /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [
209
- /* @__PURE__ */ jsx(
210
- "div",
211
- {
212
- className: "absolute inset-0 bg-black/60 animate-dialog-overlay",
213
- onClick: () => onOpenChange(false)
214
- }
215
- ),
216
- children
217
- ] });
218
- }
219
- function DialogContent({ className, children, ...props }) {
220
- return /* @__PURE__ */ jsx(
221
- "div",
222
- {
223
- className: cn(
224
- "relative z-10 w-full bg-background border border-border rounded-xl shadow-2xl mx-4 max-h-[85vh] overflow-y-auto animate-dialog-content",
225
- className
226
- ),
227
- onClick: (e) => e.stopPropagation(),
228
- ...props,
229
- children
230
- }
231
- );
232
- }
233
- function DialogHeader({ className, children, ...props }) {
234
- return /* @__PURE__ */ jsx("div", { className: cn("px-6 pt-6 pb-0", className), ...props, children });
235
- }
236
- function DialogBody({ className, children, ...props }) {
237
- return /* @__PURE__ */ jsx("div", { className: cn("px-6 py-4", className), ...props, children });
238
- }
239
- function DialogFooter({ className, children, ...props }) {
240
- return /* @__PURE__ */ jsx(
241
- "div",
242
- {
243
- className: cn("flex items-center justify-end gap-2 px-6 py-4 border-t border-border bg-muted/30 rounded-b-xl", className),
244
- ...props,
245
- children
246
- }
247
- );
248
- }
249
- function DialogTitle({ className, children, ...props }) {
250
- return /* @__PURE__ */ jsx("h2", { className: cn("text-base font-semibold", className), ...props, children });
251
- }
252
- function DialogDescription({ className, children, ...props }) {
253
- return /* @__PURE__ */ jsx("p", { className: cn("text-sm text-muted-foreground mt-1", className), ...props, children });
254
- }
255
184
  function ConfirmDialog({
256
185
  open,
257
186
  onOpenChange,
@@ -2505,10 +2434,8 @@ function AgentEditForm({ agent, onSaved }) {
2505
2434
  const [maxTurns, setMaxTurns] = useState(agent.max_turns.toString());
2506
2435
  const [maxBudget, setMaxBudget] = useState(agent.max_budget_usd.toString());
2507
2436
  const [maxRuntime, setMaxRuntime] = useState(Math.floor(agent.max_runtime_seconds / 60).toString());
2508
- const [soulMd, setSoulMd] = useState(agent.soul_md ?? "");
2509
- const [identityMd, setIdentityMd] = useState(agent.identity_md ?? "");
2510
2437
  const [saving, setSaving] = useState(false);
2511
- const isDirty = name !== agent.name || description !== (agent.description ?? "") || model !== agent.model || runner !== (agent.runner ?? "") || permissionMode !== agent.permission_mode || maxTurns !== agent.max_turns.toString() || maxBudget !== agent.max_budget_usd.toString() || maxRuntime !== Math.floor(agent.max_runtime_seconds / 60).toString() || soulMd !== (agent.soul_md ?? "") || identityMd !== (agent.identity_md ?? "");
2438
+ const isDirty = name !== agent.name || description !== (agent.description ?? "") || model !== agent.model || runner !== (agent.runner ?? "") || permissionMode !== agent.permission_mode || maxTurns !== agent.max_turns.toString() || maxBudget !== agent.max_budget_usd.toString() || maxRuntime !== Math.floor(agent.max_runtime_seconds / 60).toString();
2512
2439
  const [error, setError] = useState("");
2513
2440
  async function handleSave() {
2514
2441
  setSaving(true);
@@ -2522,9 +2449,7 @@ function AgentEditForm({ agent, onSaved }) {
2522
2449
  permission_mode: permissionMode,
2523
2450
  max_turns: parseInt(maxTurns) || agent.max_turns,
2524
2451
  max_budget_usd: parseFloat(maxBudget) || agent.max_budget_usd,
2525
- max_runtime_seconds: (parseInt(maxRuntime) || Math.floor(agent.max_runtime_seconds / 60)) * 60,
2526
- soul_md: soulMd || null,
2527
- identity_md: identityMd || null
2452
+ max_runtime_seconds: (parseInt(maxRuntime) || Math.floor(agent.max_runtime_seconds / 60)) * 60
2528
2453
  });
2529
2454
  onSaved?.();
2530
2455
  } catch (err) {
@@ -2585,42 +2510,6 @@ function AgentEditForm({ agent, onSaved }) {
2585
2510
  /* @__PURE__ */ jsx("option", { value: "bypassPermissions", children: "bypassPermissions" }),
2586
2511
  /* @__PURE__ */ jsx("option", { value: "plan", children: "plan" })
2587
2512
  ] }) }) })
2588
- ] }),
2589
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
2590
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(FormField, { label: "SOUL.md", children: [
2591
- /* @__PURE__ */ jsx(
2592
- Textarea,
2593
- {
2594
- value: soulMd,
2595
- onChange: (e) => setSoulMd(e.target.value),
2596
- placeholder: "## Voice & Tone\nDirect, concise, technical.\n\n## Values\nClarity over completeness.\n\n## Stance\nProactive problem-solver.\n\n## Boundaries\n- Never modify production data directly\n\n## Essence\nA focused engineering assistant.",
2597
- rows: 10,
2598
- className: "font-mono text-sm",
2599
- disabled: saving
2600
- }
2601
- ),
2602
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground mt-1 block", children: [
2603
- soulMd.split(/\s+/).filter(Boolean).length,
2604
- " words"
2605
- ] })
2606
- ] }) }),
2607
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(FormField, { label: "IDENTITY.md", children: [
2608
- /* @__PURE__ */ jsx(
2609
- Textarea,
2610
- {
2611
- value: identityMd,
2612
- onChange: (e) => setIdentityMd(e.target.value),
2613
- placeholder: "- **Communication Verbosity:** concise\n- **Communication Tone:** direct\n- **Decision Autonomy:** high\n- **Risk Tolerance:** moderate\n- **Collaboration Mode:** autonomous\n\n## Escalation Preferences\n- Budget over $50 -> escalate\n- Breaking changes -> escalate",
2614
- rows: 10,
2615
- className: "font-mono text-sm",
2616
- disabled: saving
2617
- }
2618
- ),
2619
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground mt-1 block", children: [
2620
- identityMd.split(/\s+/).filter(Boolean).length,
2621
- " words"
2622
- ] })
2623
- ] }) })
2624
2513
  ] })
2625
2514
  ] }) })
2626
2515
  ] });
@@ -3388,7 +3277,7 @@ function buildTree(files) {
3388
3277
  if (existing) return existing;
3389
3278
  const parts = dirPath.split("/");
3390
3279
  const node = {
3391
- name: parts[parts.length - 1],
3280
+ name: parts[parts.length - 1] ?? dirPath,
3392
3281
  fullPath: dirPath,
3393
3282
  children: [],
3394
3283
  files: []
@@ -3438,7 +3327,7 @@ function collectAllDirPaths(nodes) {
3438
3327
  nodes.forEach(walk);
3439
3328
  return paths;
3440
3329
  }
3441
- function FileTreeEditor({
3330
+ function FileTreeEditor2({
3442
3331
  initialFiles,
3443
3332
  onSave,
3444
3333
  onChange,
@@ -3748,7 +3637,7 @@ function AgentSkillManager({ agentId, initialSkills, onSaved }) {
3748
3637
  onSaved?.();
3749
3638
  }, [agentId, client, onSaved]);
3750
3639
  return /* @__PURE__ */ jsx(
3751
- FileTreeEditor,
3640
+ FileTreeEditor2,
3752
3641
  {
3753
3642
  initialFiles,
3754
3643
  onSave: handleSave,
@@ -4156,6 +4045,7 @@ function AgentA2aInfo({
4156
4045
  ] })
4157
4046
  ] });
4158
4047
  }
4048
+ var AgentIdentityTab = lazy(() => import('./agent-identity-tab-ETPM6LQN.js').then((m) => ({ default: m.AgentIdentityTab })));
4159
4049
  function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug }) {
4160
4050
  const { LinkComponent, basePath } = useNavigation();
4161
4051
  const { mutate } = useSWRConfig();
@@ -4225,6 +4115,10 @@ function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug }) {
4225
4115
  )
4226
4116
  ] })
4227
4117
  },
4118
+ {
4119
+ label: "Identity",
4120
+ content: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "h-64 w-full" }), children: /* @__PURE__ */ jsx(AgentIdentityTab, { agent, FileTreeEditor, onSaved: invalidate }) })
4121
+ },
4228
4122
  {
4229
4123
  label: "Connectors",
4230
4124
  content: /* @__PURE__ */ jsx(
@@ -4841,4 +4735,4 @@ function PlaygroundPage({ agentId }) {
4841
4735
  ] });
4842
4736
  }
4843
4737
 
4844
- export { AdminTable, AdminTableHead, AdminTableRow, AgentA2aInfo, AgentConnectorsManager, AgentDetailPage, AgentEditForm, AgentListPage, AgentPluginManager, AgentRuns, AgentScheduleForm, AgentSkillManager, ConfirmDialog, CopyButton, DashboardPage, DetailPageHeader, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, EmptyRow, FormError, FormField, LocalDate, McpServerListPage, MetricCard, ModelSelector, PaginationBar, PlaygroundPage, PluginDetailPage, PluginMarketplaceDetailPage, PluginMarketplaceListPage, RunDetailPage, RunListPage, RunSourceBadge, RunStatusBadge, SectionHeader, Select, SettingsPage, Tabs, Textarea, Th, ToolkitMultiselect, TranscriptViewer, parsePaginationParams };
4738
+ export { AdminTable, AdminTableHead, AdminTableRow, AgentA2aInfo, AgentConnectorsManager, AgentDetailPage, AgentEditForm, AgentListPage, AgentPluginManager, AgentRuns, AgentScheduleForm, AgentSkillManager, ConfirmDialog, CopyButton, DashboardPage, DetailPageHeader, EmptyRow, FormError, LocalDate, McpServerListPage, MetricCard, ModelSelector, PaginationBar, PlaygroundPage, PluginDetailPage, PluginMarketplaceDetailPage, PluginMarketplaceListPage, RunDetailPage, RunListPage, RunSourceBadge, RunStatusBadge, SectionHeader, Select, SettingsPage, Tabs, Textarea, Th, ToolkitMultiselect, TranscriptViewer, parsePaginationParams };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getcatalystiq/agent-plane-ui",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Embeddable React component library for AgentPlane",
5
5
  "type": "module",
6
6
  "exports": {