@solidxai/core-ui 0.1.22 → 0.1.23-beta.2

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.
Files changed (88) hide show
  1. package/dist/components/core/solid-agent/SolidAgent.module.css +65 -0
  2. package/dist/components/core/solid-agent/SolidAgentChat.d.ts.map +1 -1
  3. package/dist/components/core/solid-agent/SolidAgentChat.js +190 -64
  4. package/dist/components/core/solid-agent/SolidAgentChat.js.map +1 -1
  5. package/dist/components/core/solid-agent/SolidAgentChat.tsx +201 -5
  6. package/dist/components/core/solid-agent/agentEvents.d.ts.map +1 -1
  7. package/dist/components/core/solid-agent/agentEvents.js +21 -18
  8. package/dist/components/core/solid-agent/agentEvents.js.map +1 -1
  9. package/dist/components/core/solid-agent/agentEvents.ts +7 -3
  10. package/dist/components/core/solid-agent/client/agentAttachmentMedia.d.ts +8 -5
  11. package/dist/components/core/solid-agent/client/agentAttachmentMedia.d.ts.map +1 -1
  12. package/dist/components/core/solid-agent/client/agentAttachmentMedia.js +71 -23
  13. package/dist/components/core/solid-agent/client/agentAttachmentMedia.js.map +1 -1
  14. package/dist/components/core/solid-agent/client/agentAttachmentMedia.ts +52 -25
  15. package/dist/components/core/solid-agent/client/agentRuntime.d.ts +5 -0
  16. package/dist/components/core/solid-agent/client/agentRuntime.d.ts.map +1 -1
  17. package/dist/components/core/solid-agent/client/agentRuntime.js +90 -5
  18. package/dist/components/core/solid-agent/client/agentRuntime.js.map +1 -1
  19. package/dist/components/core/solid-agent/client/agentRuntime.ts +37 -1
  20. package/dist/components/core/solid-agent/client/agentSocket.d.ts +5 -0
  21. package/dist/components/core/solid-agent/client/agentSocket.d.ts.map +1 -1
  22. package/dist/components/core/solid-agent/client/agentSocket.js +19 -2
  23. package/dist/components/core/solid-agent/client/agentSocket.js.map +1 -1
  24. package/dist/components/core/solid-agent/client/agentSocket.ts +12 -2
  25. package/dist/components/core/solid-agent/humanReview.d.ts +5 -1
  26. package/dist/components/core/solid-agent/humanReview.d.ts.map +1 -1
  27. package/dist/components/core/solid-agent/humanReview.js +35 -4
  28. package/dist/components/core/solid-agent/humanReview.js.map +1 -1
  29. package/dist/components/core/solid-agent/humanReview.ts +37 -5
  30. package/dist/components/core/solid-agent/types.d.ts +57 -0
  31. package/dist/components/core/solid-agent/types.d.ts.map +1 -1
  32. package/dist/components/core/solid-agent/types.js.map +1 -1
  33. package/dist/components/core/solid-agent/types.ts +25 -1
  34. package/dist/components/core/solid-agent/widgets/DefaultAgentChatHeaderWidget.d.ts +1 -1
  35. package/dist/components/core/solid-agent/widgets/DefaultAgentChatHeaderWidget.d.ts.map +1 -1
  36. package/dist/components/core/solid-agent/widgets/DefaultAgentChatHeaderWidget.js +5 -5
  37. package/dist/components/core/solid-agent/widgets/DefaultAgentChatHeaderWidget.js.map +1 -1
  38. package/dist/components/core/solid-agent/widgets/DefaultAgentChatHeaderWidget.tsx +2 -6
  39. package/dist/components/core/solid-agent/widgets/DefaultAgentToolCallWidget.d.ts.map +1 -1
  40. package/dist/components/core/solid-agent/widgets/DefaultAgentToolCallWidget.js +4 -1
  41. package/dist/components/core/solid-agent/widgets/DefaultAgentToolCallWidget.js.map +1 -1
  42. package/dist/components/core/solid-agent/widgets/DefaultAgentToolCallWidget.tsx +5 -0
  43. package/dist/components/core/solid-agent/widgets/DefaultThinkingChatWidget.d.ts.map +1 -1
  44. package/dist/components/core/solid-agent/widgets/DefaultThinkingChatWidget.js +2 -3
  45. package/dist/components/core/solid-agent/widgets/DefaultThinkingChatWidget.js.map +1 -1
  46. package/dist/components/core/solid-agent/widgets/DefaultThinkingChatWidget.tsx +0 -2
  47. package/dist/components/core/solid-agent/widgets/solidChatWidgets.module.css +39 -3
  48. package/dist/helpers/registry.d.ts +2 -0
  49. package/dist/helpers/registry.d.ts.map +1 -1
  50. package/dist/helpers/registry.js +6 -0
  51. package/dist/helpers/registry.js.map +1 -1
  52. package/dist/helpers/registry.ts +6 -0
  53. package/dist/index.d.ts +7 -2
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +4 -0
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.ts +15 -0
  58. package/dist/redux/features/agentSlice.d.ts +5 -1
  59. package/dist/redux/features/agentSlice.d.ts.map +1 -1
  60. package/dist/redux/features/agentSlice.js +12 -1
  61. package/dist/redux/features/agentSlice.js.map +1 -1
  62. package/dist/redux/features/agentSlice.ts +11 -0
  63. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.css +2 -1
  64. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.d.ts.map +1 -1
  65. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.js +16 -9
  66. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.js.map +1 -1
  67. package/dist/routes/pages/admin/core/AgentConfigComparisonPage.tsx +18 -5
  68. package/dist/routes/pages/admin/core/AgentJobsInboxPage.d.ts.map +1 -1
  69. package/dist/routes/pages/admin/core/AgentJobsInboxPage.js +25 -8
  70. package/dist/routes/pages/admin/core/AgentJobsInboxPage.js.map +1 -1
  71. package/dist/routes/pages/admin/core/AgentJobsInboxPage.tsx +28 -4
  72. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.css +2 -0
  73. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.d.ts.map +1 -1
  74. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +22 -12
  75. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
  76. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +20 -10
  77. package/dist/routes/pages/admin/core/agentConfigComparison.d.ts +17 -0
  78. package/dist/routes/pages/admin/core/agentConfigComparison.d.ts.map +1 -1
  79. package/dist/routes/pages/admin/core/agentConfigComparison.js.map +1 -1
  80. package/dist/routes/pages/admin/core/agentConfigComparison.ts +4 -0
  81. package/dist/types/extension-registry.d.ts +2 -0
  82. package/dist/types/extension-registry.d.ts.map +1 -1
  83. package/dist/types/extension-registry.js +2 -0
  84. package/dist/types/extension-registry.js.map +1 -1
  85. package/dist/types/extension-registry.ts +2 -0
  86. package/dist/types/index.d.ts +2 -0
  87. package/dist/types/solid-core.d.ts +27 -0
  88. package/package.json +1 -1
@@ -323,9 +323,9 @@ function ResourcePreviewDialog(_a) {
323
323
  : _jsx(SolidCodeEditor, { value: content, language: "python", readOnly: true, fontSize: 12, height: "min(65vh, 42rem)" }) }) });
324
324
  }
325
325
  var itemLabel = function (item) { var _a, _b, _c; return String((_c = (_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key) !== null && _c !== void 0 ? _c : ""); };
326
- var itemMatches = function (item, query) { var _a; return "".concat(itemLabel(item), " ").concat((_a = item.description) !== null && _a !== void 0 ? _a : "").toLowerCase().includes(query); };
326
+ var itemMatches = function (item, query) { var _a, _b; return "".concat(itemLabel(item), " ").concat((_a = item.key) !== null && _a !== void 0 ? _a : "", " ").concat((_b = item.description) !== null && _b !== void 0 ? _b : "").toLowerCase().includes(query); };
327
327
  function AddLinksDialog(_a) {
328
- var label = _a.label, options = _a.options, selected = _a.selected, createUrl = _a.createUrl, onClose = _a.onClose, onConfirm = _a.onConfirm;
328
+ var label = _a.label, options = _a.options, selected = _a.selected, createUrl = _a.createUrl, onClose = _a.onClose, onConfirm = _a.onConfirm, onRefresh = _a.onRefresh;
329
329
  var _b = React.useState(""), search = _b[0], setSearch = _b[1];
330
330
  var _c = React.useState([]), picked = _c[0], setPicked = _c[1];
331
331
  var plural = label.toLowerCase();
@@ -344,17 +344,17 @@ function AddLinksDialog(_a) {
344
344
  setPicked(function (current) { return allPicked ? current.filter(function (id) { return !ids.includes(id); }) : Array.from(new Set(__spreadArray(__spreadArray([], current, true), ids, true))); });
345
345
  };
346
346
  return _jsx(SolidDialog, { open: true, onOpenChange: function (next) { if (!next)
347
- onClose(); }, header: "Add ".concat(plural), style: { width: "min(34rem, 94vw)" }, footer: _jsxs(_Fragment, { children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(SolidButton, { type: "button", disabled: !picked.length, onClick: function () { onConfirm(picked); onClose(); }, children: picked.length ? "Add ".concat(picked.length, " ").concat(picked.length === 1 ? singular : plural) : "Add ".concat(plural) })] }), children: _jsx(SolidDialogBody, { children: _jsxs("div", { className: "agent-editor__add-dialog", children: [_jsx(SolidInput, { autoFocus: true, value: search, placeholder: "Search ".concat(plural, "\u2026"), "aria-label": "Search ".concat(plural), onChange: function (event) { return setSearch(event.target.value); } }), _jsxs("div", { className: "agent-editor__add-options", role: "group", "aria-label": "Available ".concat(plural), children: [visible.length > 0 && _jsxs("label", { className: "agent-editor__add-option agent-editor__add-option--all", children: [_jsx("input", { type: "checkbox", checked: allPicked, ref: function (element) { if (element)
347
+ onClose(); }, header: "Add ".concat(plural), style: { width: "min(34rem, 94vw)" }, footer: _jsxs(_Fragment, { children: [_jsx(SolidButton, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(SolidButton, { type: "button", disabled: !picked.length, onClick: function () { onConfirm(picked); onClose(); }, children: picked.length ? "Add ".concat(picked.length, " ").concat(picked.length === 1 ? singular : plural) : "Add ".concat(plural) })] }), children: _jsx(SolidDialogBody, { children: _jsxs("div", { className: "agent-editor__add-dialog", children: [_jsxs("div", { className: "agent-editor__lookup-search", children: [_jsx(SolidInput, { autoFocus: true, value: search, placeholder: "Search ".concat(plural, "\u2026"), "aria-label": "Search ".concat(plural), onChange: function (event) { return setSearch(event.target.value); } }), onRefresh && _jsx("button", { type: "button", className: "agent-editor__icon-button", "aria-label": "Refresh ".concat(plural), title: "Refresh ".concat(plural), onClick: onRefresh, children: _jsx(RefreshCw, { size: 15 }) })] }), _jsxs("div", { className: "agent-editor__add-options", role: "group", "aria-label": "Available ".concat(plural), children: [visible.length > 0 && _jsxs("label", { className: "agent-editor__add-option agent-editor__add-option--all", children: [_jsx("input", { type: "checkbox", checked: allPicked, ref: function (element) { if (element)
348
348
  element.indeterminate = visiblePicked > 0 && !allPicked; }, onChange: toggleAll }), _jsx("span", { children: _jsxs("strong", { children: ["Select all (", visible.length, ")"] }) })] }), visible.map(function (item) { return _jsxs("label", { className: "agent-editor__add-option", children: [_jsx("input", { type: "checkbox", checked: pickedIds.has(item.id), onChange: function () { return togglePicked(item.id); } }), _jsxs("span", { children: [_jsx("strong", { title: itemLabel(item), children: itemLabel(item) }), item.description && _jsx("small", { title: item.description, children: item.description })] })] }, item.id); }), !visible.length && !canCreate && _jsxs("p", { className: "agent-editor__add-empty", children: ["No available ", plural, " found."] }), canCreate && _jsxs("a", { className: "agent-editor__add-create", href: "".concat(createUrl, "?name=").concat(encodeURIComponent(typedName)), target: "_blank", rel: "noopener noreferrer", children: [_jsx(Plus, { size: 16, "aria-hidden": "true" }), _jsxs("strong", { children: ["Create a new ", singular, " \"", typedName, "\""] }), _jsx(ExternalLink, { size: 14, "aria-hidden": "true" })] })] })] }) }) });
349
349
  }
350
350
  function LinkPicker(_a) {
351
- var label = _a.label, description = _a.description, options = _a.options, selected = _a.selected, onAdd = _a.onAdd, onAddMany = _a.onAddMany, onRemove = _a.onRemove, createUrl = _a.createUrl, render = _a.render, renderSettings = _a.renderSettings, linkFor = _a.linkFor, onView = _a.onView, editUrlFor = _a.editUrlFor, compact = _a.compact, view = _a.view, onViewChange = _a.onViewChange, renderRow = _a.renderRow;
351
+ var label = _a.label, description = _a.description, options = _a.options, selected = _a.selected, onAdd = _a.onAdd, onAddMany = _a.onAddMany, onRemove = _a.onRemove, createUrl = _a.createUrl, onRefresh = _a.onRefresh, render = _a.render, renderSettings = _a.renderSettings, linkFor = _a.linkFor, onView = _a.onView, editUrlFor = _a.editUrlFor, compact = _a.compact, view = _a.view, onViewChange = _a.onViewChange, renderRow = _a.renderRow;
352
352
  var _b = React.useState(""), search = _b[0], setSearch = _b[1];
353
353
  var _c = React.useState(false), open = _c[0], setOpen = _c[1];
354
354
  var _d = React.useState(false), searchOpen = _d[0], setSearchOpen = _d[1];
355
355
  var _e = React.useState(false), addOpen = _e[0], setAddOpen = _e[1];
356
356
  var pickerRef = React.useRef(null);
357
- var showAssociatedCount = label === "Skills" || label === "Tools";
357
+ var showAssociatedCount = label === "Skills" || label === "Tools" || label === "Secrets";
358
358
  var typedName = search.trim();
359
359
  var query = typedName.toLowerCase();
360
360
  var available = options.filter(function (item) { return !selected.some(function (selectedItem) { return selectedItem.id === item.id; }) && itemMatches(item, query); }).slice(0, 20);
@@ -387,7 +387,7 @@ function LinkPicker(_a) {
387
387
  }) : _jsxs("p", { children: ["No available ", label.toLowerCase(), " found."] }) })] }), view && onViewChange && renderRow && _jsxs("div", { className: "agent-editor__view-toggle", role: "group", "aria-label": "".concat(label, " view"), children: [_jsx("button", { type: "button", "aria-label": "List view", title: "List view", "aria-pressed": view === "list", onClick: function () { return onViewChange("list"); }, children: _jsx(List, { size: 16 }) }), _jsx("button", { type: "button", "aria-label": "Card view", title: "Card view", "aria-pressed": view === "card", onClick: function () { return onViewChange("card"); }, children: _jsx(LayoutGrid, { size: 16 }) })] })] }), visibleSelected.length ? _jsx("div", { className: isList ? "agent-editor__list" : "agent-editor__cards", children: visibleSelected.map(function (item) {
388
388
  var _a, _b, _c, _d;
389
389
  return _jsxs("div", { className: "agent-editor__linked-card".concat(compact || isList ? " agent-editor__linked-card--compact" : ""), children: [_jsx("div", { className: "agent-editor__card-content", children: isList ? renderRow === null || renderRow === void 0 ? void 0 : renderRow(item) : render(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)) }), renderSettings === null || renderSettings === void 0 ? void 0 : renderSettings(item, linkFor === null || linkFor === void 0 ? void 0 : linkFor(item.id)), onView && editUrlFor ? _jsxs(SolidDropdownMenu, { children: [_jsx(SolidDropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "agent-editor__resource-menu-trigger", "aria-label": "Actions for ".concat((_b = (_a = item.name) !== null && _a !== void 0 ? _a : item.displayName) !== null && _b !== void 0 ? _b : item.key), children: _jsx(Ellipsis, { size: 18 }) }) }), _jsxs(SolidDropdownMenuContent, { className: "agent-editor__resource-menu", children: [_jsxs(SolidDropdownMenuItem, { onSelect: function () { return onView(item); }, children: [_jsx(Eye, { size: 16 }), " View"] }), item.type !== "solidx" && _jsx(SolidDropdownMenuItem, { asChild: true, children: _jsxs("a", { href: editUrlFor(item), target: "_blank", rel: "noopener noreferrer", children: [_jsx(Pencil, { size: 16 }), " Edit"] }) }), _jsxs(SolidDropdownMenuItem, { className: "agent-editor__resource-delete", onSelect: function () { return onRemove(item.id); }, children: [_jsx(Trash2, { size: 16 }), " Delete"] })] })] }) : _jsx("button", { type: "button", "aria-label": "Remove ".concat((_d = (_c = item.name) !== null && _c !== void 0 ? _c : item.displayName) !== null && _d !== void 0 ? _d : item.key), onClick: function () { return onRemove(item.id); }, children: _jsx(Trash2, { size: 16 }) })] }, item.id);
390
- }) }) : _jsx("div", { className: "agent-editor__empty", children: selected.length ? "No linked ".concat(label.toLowerCase(), " match \"").concat(typedName, "\".") : "No ".concat(label.toLowerCase(), " linked yet.") }), addOpen && onAddMany && _jsx(AddLinksDialog, { label: label, options: options, selected: selected, createUrl: createUrl, onClose: function () { return setAddOpen(false); }, onConfirm: onAddMany })] });
390
+ }) }) : _jsx("div", { className: "agent-editor__empty", children: selected.length ? "No linked ".concat(label.toLowerCase(), " match \"").concat(typedName, "\".") : "No ".concat(label.toLowerCase(), " linked yet.") }), addOpen && onAddMany && _jsx(AddLinksDialog, { label: label, options: options, selected: selected, createUrl: createUrl, onClose: function () { return setAddOpen(false); }, onConfirm: onAddMany, onRefresh: onRefresh })] });
391
391
  }
392
392
  export function AgentRegistryEditorPage() {
393
393
  var _this = this;
@@ -695,7 +695,7 @@ export function AgentRegistryEditorPage() {
695
695
  var save = function (nextStatus, versionDetails) {
696
696
  if (versionDetails === void 0) { versionDetails = {}; }
697
697
  return __awaiter(_this, void 0, void 0, function () {
698
- var next, normalizedInputs, payload, newlyCreatedId, scalarSaved, activationAttempted, result, _a, savedId, readyAt, error_1;
698
+ var next, envNames, normalizedInputs, payload, newlyCreatedId, scalarSaved, activationAttempted, result, _a, savedId, readyAt, error_1;
699
699
  var _b, _c, _d, _e, _f, _g, _h, _j;
700
700
  return __generator(this, function (_k) {
701
701
  switch (_k.label) {
@@ -725,9 +725,13 @@ export function AgentRegistryEditorPage() {
725
725
  next.limits = "Step limits must be positive and cost limit cannot be negative.";
726
726
  if (deployment.minProcesses != null && deployment.maxProcesses != null && deployment.minProcesses > deployment.maxProcesses)
727
727
  next.deployment = "Minimum processes cannot exceed maximum processes.";
728
+ envNames = secretIds.map(function (id) { var _a; return (_a = secretEnvVarNames[id]) !== null && _a !== void 0 ? _a : ""; });
729
+ if (envNames.some(function (value) { return !/^[A-Za-z_][A-Za-z0-9_]*$/.test(value) || ["APP_ENCRYPTION_KEY", "DATABASE_URL", "AGENT_HUB_MANAGER_INTERNAL_TOKEN", "AGENT_HUB_BRIDGE_PROCESS_KEY"].includes(value); }) || new Set(envNames).size !== envNames.length) {
730
+ next.secrets = "Each linked secret needs a valid, unique environment variable name. Use the pencil icon to update it.";
731
+ }
728
732
  setErrors(next);
729
733
  if (Object.keys(next).length) {
730
- setTab(next.systemPrompt ? "persona" : next.limits && isAdmin ? "policies" : "basics");
734
+ setTab(next.secrets ? "secrets" : next.systemPrompt ? "persona" : next.limits && isAdmin ? "policies" : "basics");
731
735
  dispatch(showToast({ severity: "error", summary: "Missing information", detail: Object.values(next).join(" ") }));
732
736
  return [2 /*return*/, false];
733
737
  }
@@ -896,14 +900,14 @@ export function AgentRegistryEditorPage() {
896
900
  }) }), _jsx("small", { className: "agent-editor__workflow-save-hint", children: "Changing stage saves the current form and its linked skills, tools, roles, and secrets." })] }), _jsx(AgentDeploymentPanel, { value: deployment, onChange: setDeployment })] }) },
897
901
  { value: "persona", label: "System Prompt", content: _jsxs("section", { className: "agent-editor__section agent-editor__persona", children: [_jsxs("div", { className: "agent-editor__section-head", children: [_jsxs("div", { children: [_jsx("h2", { children: "System prompt *" }), _jsx("p", { children: "Describe the agent's role, behavior, and instructions in Markdown." })] }), _jsxs("div", { className: "agent-editor__persona-actions", children: [_jsx("button", { type: "button", className: "agent-editor__persona-preview-toggle", "aria-pressed": previewSystemPrompt, "aria-label": previewSystemPrompt ? "Edit system prompt" : "Preview system prompt", title: previewSystemPrompt ? "Edit system prompt" : "Preview system prompt", onClick: function () { return setPreviewSystemPrompt(function (current) { return !current; }); }, children: previewSystemPrompt ? _jsx(Pencil, { size: 15, "aria-hidden": "true" }) : _jsx(Eye, { size: 15, "aria-hidden": "true" }) }), (record === null || record === void 0 ? void 0 : record.id) && _jsx(AgentPersonaHistory, { agentId: record.id, savedPrompt: (_k = record.systemPrompt) !== null && _k !== void 0 ? _k : "", refreshVersion: auditVersion })] })] }), previewSystemPrompt ? _jsx("div", { className: "agent-editor__persona-preview", role: "region", "aria-label": "System prompt preview", children: systemPrompt.trim() ? _jsx(SolidAgentMarkdown, { text: systemPrompt }) : _jsx("p", { className: "agent-editor__hint", children: "Nothing to preview yet." }) })
898
902
  : _jsx(SolidCodeEditor, { value: systemPrompt, onChange: function (value) { setSystemPrompt(value !== null && value !== void 0 ? value : ""); setErrors(function (current) { return (__assign(__assign({}, current), { systemPrompt: "" })); }); }, language: "markdown", wordWrap: "on", fontSize: 11, height: "max(34rem, calc(100dvh - 18rem))" }), errors.systemPrompt && _jsx("small", { className: "agent-editor__error", children: errors.systemPrompt })] }) },
899
- { value: "skills", label: "Skills", content: _jsx(LinkPicker, { label: "Skills", description: "Skills available to this agent.", options: skills.records, selected: linked(skillIds, skills.records, items(record === null || record === void 0 ? void 0 : record.agentSkills).map(function (link) { return link.agentSkillRegistry; }).filter(Boolean)), onAddMany: function (ids) { return addAll(setSkillIds, ids); }, onRemove: function (id) { return toggle(setSkillIds, id); }, createUrl: "/admin/core/solid-core/agent-skill-registry/editor/new", onView: function (item) { return setPreview({ item: item, kind: "skill" }); }, editUrlFor: function (item) { return "/admin/core/solid-core/agent-skill-registry/editor/".concat(item.id); }, linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentSkills, "agentSkillRegistry", id); }, view: resourceView, onViewChange: setResourceView, renderRow: function (item) { return _jsx(AgentResourceRowWidget, { rowData: item }); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
903
+ { value: "skills", label: "Skills", content: _jsx(LinkPicker, { label: "Skills", description: "Skills available to this agent.", options: skills.records, selected: linked(skillIds, skills.records, items(record === null || record === void 0 ? void 0 : record.agentSkills).map(function (link) { return link.agentSkillRegistry; }).filter(Boolean)), onRefresh: function () { return void skills.refetch(); }, onAddMany: function (ids) { return addAll(setSkillIds, ids); }, onRemove: function (id) { return toggle(setSkillIds, id); }, createUrl: "/admin/core/solid-core/agent-skill-registry/editor/new", onView: function (item) { return setPreview({ item: item, kind: "skill" }); }, editUrlFor: function (item) { return "/admin/core/solid-core/agent-skill-registry/editor/".concat(item.id); }, linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentSkills, "agentSkillRegistry", id); }, view: resourceView, onViewChange: setResourceView, renderRow: function (item) { return _jsx(AgentResourceRowWidget, { rowData: item }); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
900
904
  var _a;
901
905
  return _jsx("div", { className: "agent-editor__link-settings", children: linkSetting("Always include", (_a = alwaysIncludeValues[item.id]) !== null && _a !== void 0 ? _a : true, function (checked) { return setAlwaysIncludeValues(function (current) {
902
906
  var _a;
903
907
  return (__assign(__assign({}, current), (_a = {}, _a[item.id] = checked, _a)));
904
908
  }); }, "Add the full skill to the agent prompt. Turn off to load it on demand.") });
905
909
  } }) },
906
- { value: "tools", label: "Tools", content: _jsx(LinkPicker, { label: "Tools", description: "Tools available to this agent.", options: tools.records, selected: linked(toolIds, tools.records, items(record === null || record === void 0 ? void 0 : record.agentTools).map(function (link) { return link.agentToolRegistry; }).filter(Boolean)), onAddMany: function (ids) { return addAll(setToolIds, ids); }, onRemove: function (id) { return toggle(setToolIds, id); }, createUrl: "/admin/core/solid-core/agent-tool-registry/editor/new", onView: function (item) { return setPreview({ item: item, kind: "tool" }); }, editUrlFor: function (item) { return "/admin/core/solid-core/agent-tool-registry/editor/".concat(item.id); }, linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentTools, "agentToolRegistry", id); }, view: resourceView, onViewChange: setResourceView, renderRow: function (item) { return _jsx(AgentResourceRowWidget, { rowData: item }); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
910
+ { value: "tools", label: "Tools", content: _jsx(LinkPicker, { label: "Tools", description: "Tools available to this agent.", options: tools.records, selected: linked(toolIds, tools.records, items(record === null || record === void 0 ? void 0 : record.agentTools).map(function (link) { return link.agentToolRegistry; }).filter(Boolean)), onRefresh: function () { return void tools.refetch(); }, onAddMany: function (ids) { return addAll(setToolIds, ids); }, onRemove: function (id) { return toggle(setToolIds, id); }, createUrl: "/admin/core/solid-core/agent-tool-registry/editor/new", onView: function (item) { return setPreview({ item: item, kind: "tool" }); }, editUrlFor: function (item) { return "/admin/core/solid-core/agent-tool-registry/editor/".concat(item.id); }, linkFor: function (id) { return linkForTarget(record === null || record === void 0 ? void 0 : record.agentTools, "agentToolRegistry", id); }, view: resourceView, onViewChange: setResourceView, renderRow: function (item) { return _jsx(AgentResourceRowWidget, { rowData: item }); }, render: function (item) { return _jsx(AgentResourceCardWidget, __assign({}, { rowData: item })); }, renderSettings: function (item) {
907
911
  var _a;
908
912
  return _jsx("div", { className: "agent-editor__link-settings", children: linkSetting("Require approval", (_a = requiresApprovalValues[item.id]) !== null && _a !== void 0 ? _a : false, function (checked) { return setRequiresApprovalValues(function (current) {
909
913
  var _a;
@@ -917,8 +921,14 @@ export function AgentRegistryEditorPage() {
917
921
  var label = _a[0], value = _a[1], setter = _a[2];
918
922
  return _jsxs("label", { className: "agent-editor__field", children: [_jsx("span", { children: label }), _jsx("input", { type: "number", min: label === "Cost limit" ? 0 : 1, step: label === "Cost limit" ? 0.01 : 1, value: value, onChange: function (event) { return setter(Number(event.target.value)); } }), label === "Cost limit" && _jsx("small", { className: "agent-editor__hint", children: "Cost is an estimate and is not guaranteed to be correct." })] }, label);
919
923
  }) }), errors.limits && _jsx("small", { className: "agent-editor__error", children: errors.limits })] })] }) },
920
- { value: "secrets", label: "Secrets", content: _jsx(LinkPicker, { label: "Secrets", description: "Grant access to existing secrets. Secret values are never shown here.", options: secrets.records, selected: linked(secretIds, secrets.records, items(record === null || record === void 0 ? void 0 : record.agentSecrets).map(function (link) { return link.secret; }).filter(Boolean)), onAdd: function (id) { var secret = secrets.records.find(function (item) { return item.id === id; }); if (secret)
921
- beginSecretEnvVarEdit(secret); }, onRemove: function (id) { return toggle(setSecretIds, id); }, compact: true, render: function (item) {
924
+ { value: "secrets", label: "Secrets", content: _jsx(LinkPicker, { label: "Secrets", description: "Grant access to existing secrets. Secret values are never shown here.", options: secrets.records, selected: linked(secretIds, secrets.records, items(record === null || record === void 0 ? void 0 : record.agentSecrets).map(function (link) { return link.secret; }).filter(Boolean)), onRefresh: function () { return void secrets.refetch(); }, onAddMany: function (ids) { ids.forEach(function (secretId) { var secret = secrets.records.find(function (item) { return item.id === secretId; }); if (secret) {
925
+ setSecretIds(function (current) { return Array.from(new Set(__spreadArray(__spreadArray([], current, true), [secretId], false))); });
926
+ setSecretEnvVarNames(function (current) {
927
+ var _a;
928
+ var _b, _c, _d;
929
+ return (__assign(__assign({}, current), (_a = {}, _a[secretId] = String((_d = (_c = (_b = secret.key) !== null && _b !== void 0 ? _b : secret.name) !== null && _c !== void 0 ? _c : secret.displayName) !== null && _d !== void 0 ? _d : ""), _a)));
930
+ });
931
+ } }); }, createUrl: "/admin/core/solid-core/secret/form/new", onRemove: function (id) { return toggle(setSecretIds, id); }, compact: true, renderSettings: function () { return errors.secrets ? _jsx("small", { className: "agent-editor__error", children: errors.secrets }) : null; }, render: function (item) {
922
932
  var _a, _b, _c, _d, _e;
923
933
  return _jsxs("div", { className: "agent-editor__secret", children: [_jsx("strong", { title: (_b = (_a = item.displayName) !== null && _a !== void 0 ? _a : item.name) !== null && _b !== void 0 ? _b : item.key, children: (_d = (_c = item.displayName) !== null && _c !== void 0 ? _c : item.name) !== null && _d !== void 0 ? _d : item.key }), _jsx("button", { type: "button", "aria-label": "Edit environment variable name for ".concat((_e = item.displayName) !== null && _e !== void 0 ? _e : item.key), onClick: function () { return beginSecretEnvVarEdit(item); }, children: _jsx(Pencil, { size: 16 }) })] });
924
934
  } }) }