@getcatalystiq/agent-plane-ui 0.1.19 → 0.1.21
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/agent-identity-tab-ETPM6LQN.js +2 -0
- package/dist/agent-identity-tab-F4MU2HP2.cjs +11 -0
- package/dist/chunk-CE2RHDPY.js +422 -0
- package/dist/chunk-CHJL4MZI.cjs +277 -0
- package/dist/chunk-L45SI32F.js +275 -0
- package/dist/chunk-VZ43ATC5.cjs +454 -0
- package/dist/{chunk-OOBDCC6Q.js → chunk-XFI227OB.js} +6 -48
- package/dist/{chunk-VBGYWQUF.cjs → chunk-XXF4U7WL.cjs} +15 -67
- package/dist/editor.cjs +26 -657
- package/dist/editor.js +7 -643
- package/dist/index.cjs +390 -381
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +58 -48
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -599,8 +599,13 @@ interface AgentDetailPageProps {
|
|
|
599
599
|
a2aBaseUrl?: string;
|
|
600
600
|
/** Tenant slug (needed for A2A URLs) */
|
|
601
601
|
tenantSlug?: string;
|
|
602
|
+
/** Admin API base URL — when provided, enables Generate/Import/Export/Publish buttons on the Identity tab */
|
|
603
|
+
adminApiBaseUrl?: string;
|
|
604
|
+
/** Admin API key or auth token for admin endpoints */
|
|
605
|
+
adminApiKey?: string;
|
|
602
606
|
}
|
|
603
|
-
|
|
607
|
+
|
|
608
|
+
declare function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug, adminApiBaseUrl, adminApiKey }: AgentDetailPageProps): react_jsx_runtime.JSX.Element;
|
|
604
609
|
|
|
605
610
|
interface Agent {
|
|
606
611
|
id: string;
|
|
@@ -612,8 +617,6 @@ interface Agent {
|
|
|
612
617
|
max_turns: number;
|
|
613
618
|
max_budget_usd: number;
|
|
614
619
|
max_runtime_seconds: number;
|
|
615
|
-
soul_md?: string | null;
|
|
616
|
-
identity_md?: string | null;
|
|
617
620
|
}
|
|
618
621
|
interface AgentEditFormProps {
|
|
619
622
|
agent: Agent;
|
package/dist/index.d.ts
CHANGED
|
@@ -599,8 +599,13 @@ interface AgentDetailPageProps {
|
|
|
599
599
|
a2aBaseUrl?: string;
|
|
600
600
|
/** Tenant slug (needed for A2A URLs) */
|
|
601
601
|
tenantSlug?: string;
|
|
602
|
+
/** Admin API base URL — when provided, enables Generate/Import/Export/Publish buttons on the Identity tab */
|
|
603
|
+
adminApiBaseUrl?: string;
|
|
604
|
+
/** Admin API key or auth token for admin endpoints */
|
|
605
|
+
adminApiKey?: string;
|
|
602
606
|
}
|
|
603
|
-
|
|
607
|
+
|
|
608
|
+
declare function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug, adminApiBaseUrl, adminApiKey }: AgentDetailPageProps): react_jsx_runtime.JSX.Element;
|
|
604
609
|
|
|
605
610
|
interface Agent {
|
|
606
611
|
id: string;
|
|
@@ -612,8 +617,6 @@ interface Agent {
|
|
|
612
617
|
max_turns: number;
|
|
613
618
|
max_budget_usd: number;
|
|
614
619
|
max_runtime_seconds: number;
|
|
615
|
-
soul_md?: string | null;
|
|
616
|
-
identity_md?: string | null;
|
|
617
620
|
}
|
|
618
621
|
interface AgentEditFormProps {
|
|
619
622
|
agent: Agent;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
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
6
|
import * as React from 'react';
|
|
5
7
|
import React__default, { lazy, useState, useCallback, useMemo, useRef, useEffect, Suspense } from 'react';
|
|
@@ -2432,10 +2434,8 @@ function AgentEditForm({ agent, onSaved }) {
|
|
|
2432
2434
|
const [maxTurns, setMaxTurns] = useState(agent.max_turns.toString());
|
|
2433
2435
|
const [maxBudget, setMaxBudget] = useState(agent.max_budget_usd.toString());
|
|
2434
2436
|
const [maxRuntime, setMaxRuntime] = useState(Math.floor(agent.max_runtime_seconds / 60).toString());
|
|
2435
|
-
const [soulMd, setSoulMd] = useState(agent.soul_md ?? "");
|
|
2436
|
-
const [identityMd, setIdentityMd] = useState(agent.identity_md ?? "");
|
|
2437
2437
|
const [saving, setSaving] = useState(false);
|
|
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()
|
|
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();
|
|
2439
2439
|
const [error, setError] = useState("");
|
|
2440
2440
|
async function handleSave() {
|
|
2441
2441
|
setSaving(true);
|
|
@@ -2449,9 +2449,7 @@ function AgentEditForm({ agent, onSaved }) {
|
|
|
2449
2449
|
permission_mode: permissionMode,
|
|
2450
2450
|
max_turns: parseInt(maxTurns) || agent.max_turns,
|
|
2451
2451
|
max_budget_usd: parseFloat(maxBudget) || agent.max_budget_usd,
|
|
2452
|
-
max_runtime_seconds: (parseInt(maxRuntime) || Math.floor(agent.max_runtime_seconds / 60)) * 60
|
|
2453
|
-
soul_md: soulMd || null,
|
|
2454
|
-
identity_md: identityMd || null
|
|
2452
|
+
max_runtime_seconds: (parseInt(maxRuntime) || Math.floor(agent.max_runtime_seconds / 60)) * 60
|
|
2455
2453
|
});
|
|
2456
2454
|
onSaved?.();
|
|
2457
2455
|
} catch (err) {
|
|
@@ -2512,42 +2510,6 @@ function AgentEditForm({ agent, onSaved }) {
|
|
|
2512
2510
|
/* @__PURE__ */ jsx("option", { value: "bypassPermissions", children: "bypassPermissions" }),
|
|
2513
2511
|
/* @__PURE__ */ jsx("option", { value: "plan", children: "plan" })
|
|
2514
2512
|
] }) }) })
|
|
2515
|
-
] }),
|
|
2516
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
2517
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(FormField, { label: "SOUL.md", children: [
|
|
2518
|
-
/* @__PURE__ */ jsx(
|
|
2519
|
-
Textarea,
|
|
2520
|
-
{
|
|
2521
|
-
value: soulMd,
|
|
2522
|
-
onChange: (e) => setSoulMd(e.target.value),
|
|
2523
|
-
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.",
|
|
2524
|
-
rows: 10,
|
|
2525
|
-
className: "font-mono text-sm",
|
|
2526
|
-
disabled: saving
|
|
2527
|
-
}
|
|
2528
|
-
),
|
|
2529
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground mt-1 block", children: [
|
|
2530
|
-
soulMd.split(/\s+/).filter(Boolean).length,
|
|
2531
|
-
" words"
|
|
2532
|
-
] })
|
|
2533
|
-
] }) }),
|
|
2534
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(FormField, { label: "IDENTITY.md", children: [
|
|
2535
|
-
/* @__PURE__ */ jsx(
|
|
2536
|
-
Textarea,
|
|
2537
|
-
{
|
|
2538
|
-
value: identityMd,
|
|
2539
|
-
onChange: (e) => setIdentityMd(e.target.value),
|
|
2540
|
-
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",
|
|
2541
|
-
rows: 10,
|
|
2542
|
-
className: "font-mono text-sm",
|
|
2543
|
-
disabled: saving
|
|
2544
|
-
}
|
|
2545
|
-
),
|
|
2546
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground mt-1 block", children: [
|
|
2547
|
-
identityMd.split(/\s+/).filter(Boolean).length,
|
|
2548
|
-
" words"
|
|
2549
|
-
] })
|
|
2550
|
-
] }) })
|
|
2551
2513
|
] })
|
|
2552
2514
|
] }) })
|
|
2553
2515
|
] });
|
|
@@ -3315,7 +3277,7 @@ function buildTree(files) {
|
|
|
3315
3277
|
if (existing) return existing;
|
|
3316
3278
|
const parts = dirPath.split("/");
|
|
3317
3279
|
const node = {
|
|
3318
|
-
name: parts[parts.length - 1],
|
|
3280
|
+
name: parts[parts.length - 1] ?? dirPath,
|
|
3319
3281
|
fullPath: dirPath,
|
|
3320
3282
|
children: [],
|
|
3321
3283
|
files: []
|
|
@@ -3365,7 +3327,7 @@ function collectAllDirPaths(nodes) {
|
|
|
3365
3327
|
nodes.forEach(walk);
|
|
3366
3328
|
return paths;
|
|
3367
3329
|
}
|
|
3368
|
-
function
|
|
3330
|
+
function FileTreeEditor2({
|
|
3369
3331
|
initialFiles,
|
|
3370
3332
|
onSave,
|
|
3371
3333
|
onChange,
|
|
@@ -3675,7 +3637,7 @@ function AgentSkillManager({ agentId, initialSkills, onSaved }) {
|
|
|
3675
3637
|
onSaved?.();
|
|
3676
3638
|
}, [agentId, client, onSaved]);
|
|
3677
3639
|
return /* @__PURE__ */ jsx(
|
|
3678
|
-
|
|
3640
|
+
FileTreeEditor2,
|
|
3679
3641
|
{
|
|
3680
3642
|
initialFiles,
|
|
3681
3643
|
onSave: handleSave,
|
|
@@ -4083,7 +4045,8 @@ function AgentA2aInfo({
|
|
|
4083
4045
|
] })
|
|
4084
4046
|
] });
|
|
4085
4047
|
}
|
|
4086
|
-
|
|
4048
|
+
var AgentIdentityTab = lazy(() => import('./agent-identity-tab-ETPM6LQN.js').then((m) => ({ default: m.AgentIdentityTab })));
|
|
4049
|
+
function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug, adminApiBaseUrl, adminApiKey }) {
|
|
4087
4050
|
const { LinkComponent, basePath } = useNavigation();
|
|
4088
4051
|
const { mutate } = useSWRConfig();
|
|
4089
4052
|
const cacheKey = `agent-${agentId}`;
|
|
@@ -4094,6 +4057,49 @@ function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug }) {
|
|
|
4094
4057
|
const invalidate = useCallback(() => {
|
|
4095
4058
|
mutate(cacheKey);
|
|
4096
4059
|
}, [mutate, cacheKey]);
|
|
4060
|
+
const adminFetch = useCallback(async (path, options) => {
|
|
4061
|
+
if (!adminApiBaseUrl) throw new Error("Admin API not configured");
|
|
4062
|
+
const res = await fetch(`${adminApiBaseUrl}${path}`, {
|
|
4063
|
+
...options,
|
|
4064
|
+
headers: {
|
|
4065
|
+
"Content-Type": "application/json",
|
|
4066
|
+
...adminApiKey ? { Authorization: `Bearer ${adminApiKey}` } : {},
|
|
4067
|
+
...options?.headers
|
|
4068
|
+
}
|
|
4069
|
+
});
|
|
4070
|
+
if (!res.ok) {
|
|
4071
|
+
const body = await res.json().catch(() => ({ error: { message: res.statusText } }));
|
|
4072
|
+
throw new Error(body?.error?.message ?? `Request failed: ${res.status}`);
|
|
4073
|
+
}
|
|
4074
|
+
return res.json();
|
|
4075
|
+
}, [adminApiBaseUrl, adminApiKey]);
|
|
4076
|
+
const soulCallbacks = useMemo(() => {
|
|
4077
|
+
if (!adminApiBaseUrl) return {};
|
|
4078
|
+
return {
|
|
4079
|
+
onGenerateSoul: async () => {
|
|
4080
|
+
const result = await adminFetch(`/api/admin/agents/${agentId}/generate-soul`, { method: "POST" });
|
|
4081
|
+
return { files: result.files };
|
|
4082
|
+
},
|
|
4083
|
+
onImportSoul: async (ref) => {
|
|
4084
|
+
const [owner, name] = ref.split("/");
|
|
4085
|
+
const result = await adminFetch(`/api/admin/agents/${agentId}/import-soul`, {
|
|
4086
|
+
method: "POST",
|
|
4087
|
+
body: JSON.stringify({ owner, name })
|
|
4088
|
+
});
|
|
4089
|
+
return { files: result.imported_files };
|
|
4090
|
+
},
|
|
4091
|
+
onExportSoul: async () => {
|
|
4092
|
+
const result = await adminFetch(`/api/admin/agents/${agentId}/export-soul`);
|
|
4093
|
+
return { files: result.files, name: agent?.name ?? "agent" };
|
|
4094
|
+
},
|
|
4095
|
+
onPublishSoul: async (owner) => {
|
|
4096
|
+
await adminFetch(`/api/admin/agents/${agentId}/publish-soul`, {
|
|
4097
|
+
method: "POST",
|
|
4098
|
+
body: JSON.stringify({ owner })
|
|
4099
|
+
});
|
|
4100
|
+
}
|
|
4101
|
+
};
|
|
4102
|
+
}, [adminApiBaseUrl, adminFetch, agentId, agent?.name]);
|
|
4097
4103
|
if (isLoading) {
|
|
4098
4104
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
4099
4105
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-40" }),
|
|
@@ -4152,6 +4158,10 @@ function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug }) {
|
|
|
4152
4158
|
)
|
|
4153
4159
|
] })
|
|
4154
4160
|
},
|
|
4161
|
+
{
|
|
4162
|
+
label: "Identity",
|
|
4163
|
+
content: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Skeleton, { className: "h-64 w-full" }), children: /* @__PURE__ */ jsx(AgentIdentityTab, { agent, FileTreeEditor, onSaved: invalidate, ...soulCallbacks }) })
|
|
4164
|
+
},
|
|
4155
4165
|
{
|
|
4156
4166
|
label: "Connectors",
|
|
4157
4167
|
content: /* @__PURE__ */ jsx(
|