@getcatalystiq/agent-plane-ui 0.1.23 → 0.1.24

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,2 @@
1
+ export { AgentIdentityTab } from './chunk-GFFQIJPU.js';
2
+ import './chunk-XFI227OB.js';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkNLED4YEY_cjs = require('./chunk-NLED4YEY.cjs');
3
+ var chunk7NGE4WHD_cjs = require('./chunk-7NGE4WHD.cjs');
4
4
  require('./chunk-XXF4U7WL.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "AgentIdentityTab", {
9
9
  enumerable: true,
10
- get: function () { return chunkNLED4YEY_cjs.AgentIdentityTab; }
10
+ get: function () { return chunk7NGE4WHD_cjs.AgentIdentityTab; }
11
11
  });
@@ -47,6 +47,9 @@ function AgentIdentityTab({
47
47
  const [generating, setGenerating] = react.useState(false);
48
48
  const [publishing, setPublishing] = react.useState(false);
49
49
  const [importOpen, setImportOpen] = react.useState(false);
50
+ const [publishOpen, setPublishOpen] = react.useState(false);
51
+ const [publishOwner, setPublishOwner] = react.useState("");
52
+ const [publishResult, setPublishResult] = react.useState(null);
50
53
  const [savedVersion, setSavedVersion] = react.useState(0);
51
54
  const [overrideFiles, setOverrideFiles] = react.useState(null);
52
55
  const initialFiles = react.useMemo(() => agentToFiles(agent), [agent]);
@@ -116,15 +119,16 @@ function AgentIdentityTab({
116
119
  }
117
120
  }
118
121
  async function handlePublish() {
119
- if (!onPublishSoul) return;
120
- const owner = prompt("Enter owner name for publishing:");
121
- if (!owner?.trim()) return;
122
+ if (!onPublishSoul || !publishOwner.trim()) return;
122
123
  setPublishing(true);
123
124
  setError("");
125
+ setPublishResult(null);
124
126
  try {
125
- await onPublishSoul(owner.trim());
127
+ await onPublishSoul(publishOwner.trim());
128
+ setPublishResult("Published successfully");
126
129
  } catch (err) {
127
130
  setError(err instanceof Error ? err.message : "Failed to publish");
131
+ setPublishOpen(false);
128
132
  } finally {
129
133
  setPublishing(false);
130
134
  }
@@ -183,15 +187,18 @@ function AgentIdentityTab({
183
187
  {
184
188
  variant: "outline",
185
189
  size: "sm",
186
- onClick: handlePublish,
187
- disabled: publishing,
190
+ onClick: () => {
191
+ setPublishOpen(true);
192
+ setPublishResult(null);
193
+ setPublishOwner("");
194
+ },
188
195
  children: [
189
196
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "size-4 mr-1.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
190
197
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
191
198
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
192
199
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 12h20" })
193
200
  ] }),
194
- publishing ? "Publishing..." : "Publish"
201
+ "Publish"
195
202
  ]
196
203
  }
197
204
  ),
@@ -228,7 +235,43 @@ function AgentIdentityTab({
228
235
  onImport: onImportSoul,
229
236
  onImported: handleImported
230
237
  }
231
- )
238
+ ),
239
+ onPublishSoul && /* @__PURE__ */ jsxRuntime.jsx(chunkXXF4U7WL_cjs.Dialog, { open: publishOpen, onOpenChange: setPublishOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkXXF4U7WL_cjs.DialogContent, { className: "max-w-md", children: [
240
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkXXF4U7WL_cjs.DialogHeader, { children: [
241
+ /* @__PURE__ */ jsxRuntime.jsx(chunkXXF4U7WL_cjs.DialogTitle, { children: "Publish to ClawSouls Registry" }),
242
+ /* @__PURE__ */ jsxRuntime.jsx(chunkXXF4U7WL_cjs.DialogDescription, { children: "Upload your agent's SoulSpec identity to the ClawSouls registry." })
243
+ ] }),
244
+ /* @__PURE__ */ jsxRuntime.jsx(chunkXXF4U7WL_cjs.DialogBody, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
245
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-muted-foreground/25 bg-muted/50 p-3 text-xs text-muted-foreground space-y-2", children: [
246
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
247
+ "Publishing uploads your agent's identity to the ",
248
+ /* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://clawsouls.ai/souls", target: "_blank", rel: "noopener noreferrer", className: "underline text-foreground", children: "ClawSouls registry" }),
249
+ " where others can discover and install it."
250
+ ] }),
251
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Requirements:" }) }),
252
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "list-disc pl-4 space-y-0.5", children: [
253
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "A ClawSouls API token (set in Settings)" }),
254
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "SOUL.md with required sections (Personality, Tone, Principles)" }),
255
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "IDENTITY.md with Name, Role, and Creature fields" })
256
+ ] }),
257
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Your soul will be validated by SoulScan before publishing." })
258
+ ] }),
259
+ /* @__PURE__ */ jsxRuntime.jsx(chunkXXF4U7WL_cjs.FormField, { label: "Owner (your ClawSouls username)", children: /* @__PURE__ */ jsxRuntime.jsx(
260
+ chunkXXF4U7WL_cjs.Input,
261
+ {
262
+ value: publishOwner,
263
+ onChange: (e) => setPublishOwner(e.target.value),
264
+ placeholder: "e.g. myusername",
265
+ disabled: publishing
266
+ }
267
+ ) }),
268
+ publishResult && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-green-600 bg-green-500/10 p-3 text-xs text-green-400", children: publishResult })
269
+ ] }) }),
270
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkXXF4U7WL_cjs.DialogFooter, { children: [
271
+ /* @__PURE__ */ jsxRuntime.jsx(chunkXXF4U7WL_cjs.Button, { variant: "outline", size: "sm", onClick: () => setPublishOpen(false), children: "Cancel" }),
272
+ /* @__PURE__ */ jsxRuntime.jsx(chunkXXF4U7WL_cjs.Button, { size: "sm", onClick: handlePublish, disabled: publishing || !publishOwner.trim(), children: publishing ? "Publishing..." : "Publish" })
273
+ ] })
274
+ ] }) })
232
275
  ] });
233
276
  }
234
277
  function ImportSoulDialog({
@@ -45,6 +45,9 @@ function AgentIdentityTab({
45
45
  const [generating, setGenerating] = useState(false);
46
46
  const [publishing, setPublishing] = useState(false);
47
47
  const [importOpen, setImportOpen] = useState(false);
48
+ const [publishOpen, setPublishOpen] = useState(false);
49
+ const [publishOwner, setPublishOwner] = useState("");
50
+ const [publishResult, setPublishResult] = useState(null);
48
51
  const [savedVersion, setSavedVersion] = useState(0);
49
52
  const [overrideFiles, setOverrideFiles] = useState(null);
50
53
  const initialFiles = useMemo(() => agentToFiles(agent), [agent]);
@@ -114,15 +117,16 @@ function AgentIdentityTab({
114
117
  }
115
118
  }
116
119
  async function handlePublish() {
117
- if (!onPublishSoul) return;
118
- const owner = prompt("Enter owner name for publishing:");
119
- if (!owner?.trim()) return;
120
+ if (!onPublishSoul || !publishOwner.trim()) return;
120
121
  setPublishing(true);
121
122
  setError("");
123
+ setPublishResult(null);
122
124
  try {
123
- await onPublishSoul(owner.trim());
125
+ await onPublishSoul(publishOwner.trim());
126
+ setPublishResult("Published successfully");
124
127
  } catch (err) {
125
128
  setError(err instanceof Error ? err.message : "Failed to publish");
129
+ setPublishOpen(false);
126
130
  } finally {
127
131
  setPublishing(false);
128
132
  }
@@ -181,15 +185,18 @@ function AgentIdentityTab({
181
185
  {
182
186
  variant: "outline",
183
187
  size: "sm",
184
- onClick: handlePublish,
185
- disabled: publishing,
188
+ onClick: () => {
189
+ setPublishOpen(true);
190
+ setPublishResult(null);
191
+ setPublishOwner("");
192
+ },
186
193
  children: [
187
194
  /* @__PURE__ */ jsxs("svg", { className: "size-4 mr-1.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
188
195
  /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
189
196
  /* @__PURE__ */ jsx("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
190
197
  /* @__PURE__ */ jsx("path", { d: "M2 12h20" })
191
198
  ] }),
192
- publishing ? "Publishing..." : "Publish"
199
+ "Publish"
193
200
  ]
194
201
  }
195
202
  ),
@@ -226,7 +233,43 @@ function AgentIdentityTab({
226
233
  onImport: onImportSoul,
227
234
  onImported: handleImported
228
235
  }
229
- )
236
+ ),
237
+ onPublishSoul && /* @__PURE__ */ jsx(Dialog, { open: publishOpen, onOpenChange: setPublishOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-md", children: [
238
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
239
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Publish to ClawSouls Registry" }),
240
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Upload your agent's SoulSpec identity to the ClawSouls registry." })
241
+ ] }),
242
+ /* @__PURE__ */ jsx(DialogBody, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
243
+ /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-muted-foreground/25 bg-muted/50 p-3 text-xs text-muted-foreground space-y-2", children: [
244
+ /* @__PURE__ */ jsxs("p", { children: [
245
+ "Publishing uploads your agent's identity to the ",
246
+ /* @__PURE__ */ jsx("a", { href: "https://clawsouls.ai/souls", target: "_blank", rel: "noopener noreferrer", className: "underline text-foreground", children: "ClawSouls registry" }),
247
+ " where others can discover and install it."
248
+ ] }),
249
+ /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: "Requirements:" }) }),
250
+ /* @__PURE__ */ jsxs("ul", { className: "list-disc pl-4 space-y-0.5", children: [
251
+ /* @__PURE__ */ jsx("li", { children: "A ClawSouls API token (set in Settings)" }),
252
+ /* @__PURE__ */ jsx("li", { children: "SOUL.md with required sections (Personality, Tone, Principles)" }),
253
+ /* @__PURE__ */ jsx("li", { children: "IDENTITY.md with Name, Role, and Creature fields" })
254
+ ] }),
255
+ /* @__PURE__ */ jsx("p", { children: "Your soul will be validated by SoulScan before publishing." })
256
+ ] }),
257
+ /* @__PURE__ */ jsx(FormField, { label: "Owner (your ClawSouls username)", children: /* @__PURE__ */ jsx(
258
+ Input,
259
+ {
260
+ value: publishOwner,
261
+ onChange: (e) => setPublishOwner(e.target.value),
262
+ placeholder: "e.g. myusername",
263
+ disabled: publishing
264
+ }
265
+ ) }),
266
+ publishResult && /* @__PURE__ */ jsx("div", { className: "rounded-md border border-green-600 bg-green-500/10 p-3 text-xs text-green-400", children: publishResult })
267
+ ] }) }),
268
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
269
+ /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => setPublishOpen(false), children: "Cancel" }),
270
+ /* @__PURE__ */ jsx(Button, { size: "sm", onClick: handlePublish, disabled: publishing || !publishOwner.trim(), children: publishing ? "Publishing..." : "Publish" })
271
+ ] })
272
+ ] }) })
230
273
  ] });
231
274
  }
232
275
  function ImportSoulDialog({
package/dist/editor.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkVZ43ATC5_cjs = require('./chunk-VZ43ATC5.cjs');
4
- var chunkNLED4YEY_cjs = require('./chunk-NLED4YEY.cjs');
4
+ var chunk7NGE4WHD_cjs = require('./chunk-7NGE4WHD.cjs');
5
5
  var chunkXXF4U7WL_cjs = require('./chunk-XXF4U7WL.cjs');
6
6
  var react = require('react');
7
7
  var CodeMirror = require('@uiw/react-codemirror');
@@ -187,6 +187,6 @@ Object.defineProperty(exports, "FileTreeEditor", {
187
187
  });
188
188
  Object.defineProperty(exports, "AgentIdentityTab", {
189
189
  enumerable: true,
190
- get: function () { return chunkNLED4YEY_cjs.AgentIdentityTab; }
190
+ get: function () { return chunk7NGE4WHD_cjs.AgentIdentityTab; }
191
191
  });
192
192
  exports.PluginEditorPage = PluginEditorPage;
package/dist/editor.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useApi, Skeleton, FileTreeEditor, Card, CardHeader, CardTitle, CardContent } from './chunk-CE2RHDPY.js';
2
2
  export { FileTreeEditor } from './chunk-CE2RHDPY.js';
3
- export { AgentIdentityTab } from './chunk-QXTNBR6E.js';
3
+ export { AgentIdentityTab } from './chunk-GFFQIJPU.js';
4
4
  import { useNavigation, useAgentPlaneClient, Badge, Button } from './chunk-XFI227OB.js';
5
5
  import { useState, useCallback } from 'react';
6
6
  import CodeMirror from '@uiw/react-codemirror';
package/dist/index.cjs CHANGED
@@ -4069,7 +4069,7 @@ function AgentA2aInfo({
4069
4069
  ] })
4070
4070
  ] });
4071
4071
  }
4072
- var AgentIdentityTab = React.lazy(() => import('./agent-identity-tab-3ERMWHVJ.cjs').then((m) => ({ default: m.AgentIdentityTab })));
4072
+ var AgentIdentityTab = React.lazy(() => import('./agent-identity-tab-AL2SL3CR.cjs').then((m) => ({ default: m.AgentIdentityTab })));
4073
4073
  function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug, adminApiBaseUrl, adminApiKey }) {
4074
4074
  const { LinkComponent, basePath } = chunkXXF4U7WL_cjs.useNavigation();
4075
4075
  const { mutate } = swr.useSWRConfig();
package/dist/index.js CHANGED
@@ -4045,7 +4045,7 @@ function AgentA2aInfo({
4045
4045
  ] })
4046
4046
  ] });
4047
4047
  }
4048
- var AgentIdentityTab = lazy(() => import('./agent-identity-tab-G62JP5VR.js').then((m) => ({ default: m.AgentIdentityTab })));
4048
+ var AgentIdentityTab = lazy(() => import('./agent-identity-tab-6T672HO7.js').then((m) => ({ default: m.AgentIdentityTab })));
4049
4049
  function AgentDetailPage({ agentId, a2aBaseUrl, tenantSlug, adminApiBaseUrl, adminApiKey }) {
4050
4050
  const { LinkComponent, basePath } = useNavigation();
4051
4051
  const { mutate } = useSWRConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getcatalystiq/agent-plane-ui",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Embeddable React component library for AgentPlane",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,2 +0,0 @@
1
- export { AgentIdentityTab } from './chunk-QXTNBR6E.js';
2
- import './chunk-XFI227OB.js';