@solidxai/core-ui 0.1.22-beta.4 → 0.1.22-beta.5

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 (77) hide show
  1. package/dist/adapters/auth/adminEmbedSession.d.ts +16 -0
  2. package/dist/adapters/auth/adminEmbedSession.d.ts.map +1 -0
  3. package/dist/adapters/auth/adminEmbedSession.js +72 -0
  4. package/dist/adapters/auth/adminEmbedSession.js.map +1 -0
  5. package/dist/adapters/auth/adminEmbedSession.ts +67 -0
  6. package/dist/adapters/auth/getSession.d.ts.map +1 -1
  7. package/dist/adapters/auth/getSession.js +4 -1
  8. package/dist/adapters/auth/getSession.js.map +1 -1
  9. package/dist/adapters/auth/getSession.ts +4 -1
  10. package/dist/adapters/auth/storage.d.ts +1 -0
  11. package/dist/adapters/auth/storage.d.ts.map +1 -1
  12. package/dist/adapters/auth/storage.js +9 -3
  13. package/dist/adapters/auth/storage.js.map +1 -1
  14. package/dist/adapters/auth/storage.ts +10 -2
  15. package/dist/components/common/Link.d.ts.map +1 -1
  16. package/dist/components/common/Link.js +3 -2
  17. package/dist/components/common/Link.js.map +1 -1
  18. package/dist/components/common/Link.tsx +3 -2
  19. package/dist/components/core/form/SolidFormFooter.js +2 -2
  20. package/dist/components/core/form/SolidFormFooter.js.map +1 -1
  21. package/dist/components/core/form/SolidFormFooter.tsx +2 -2
  22. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
  23. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +17 -15
  24. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
  25. package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +7 -5
  26. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
  27. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +13 -11
  28. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
  29. package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +8 -6
  30. package/dist/components/core/solid-agent/widgets/SolidQuestionChatWidget.d.ts.map +1 -1
  31. package/dist/components/core/solid-agent/widgets/SolidQuestionChatWidget.js +3 -2
  32. package/dist/components/core/solid-agent/widgets/SolidQuestionChatWidget.js.map +1 -1
  33. package/dist/components/core/solid-agent/widgets/SolidQuestionChatWidget.tsx +3 -2
  34. package/dist/dummy.d.ts +2 -0
  35. package/dist/dummy.d.ts.map +1 -0
  36. package/dist/dummy.js +3 -0
  37. package/dist/dummy.js.map +1 -0
  38. package/dist/dummy.ts +2 -0
  39. package/dist/helpers/modelViewPersistence.d.ts +1 -1
  40. package/dist/helpers/modelViewPersistence.d.ts.map +1 -1
  41. package/dist/helpers/modelViewPersistence.js +5 -4
  42. package/dist/helpers/modelViewPersistence.js.map +1 -1
  43. package/dist/helpers/modelViewPersistence.ts +6 -4
  44. package/dist/hooks/useRouter.d.ts.map +1 -1
  45. package/dist/hooks/useRouter.js +5 -3
  46. package/dist/hooks/useRouter.js.map +1 -1
  47. package/dist/hooks/useRouter.ts +5 -3
  48. package/dist/resources/solid-custom.css +14 -1
  49. package/dist/routes/AppEventListener.js +1 -1
  50. package/dist/routes/AppEventListener.js.map +1 -1
  51. package/dist/routes/AppEventListener.tsx +1 -1
  52. package/dist/routes/pages/admin/core/AgentDeploymentPanel.d.ts +3 -4
  53. package/dist/routes/pages/admin/core/AgentDeploymentPanel.d.ts.map +1 -1
  54. package/dist/routes/pages/admin/core/AgentDeploymentPanel.js +13 -83
  55. package/dist/routes/pages/admin/core/AgentDeploymentPanel.js.map +1 -1
  56. package/dist/routes/pages/admin/core/AgentDeploymentPanel.tsx +22 -43
  57. package/dist/routes/pages/admin/core/AgentJobsInboxPage.d.ts.map +1 -1
  58. package/dist/routes/pages/admin/core/AgentJobsInboxPage.js +157 -34
  59. package/dist/routes/pages/admin/core/AgentJobsInboxPage.js.map +1 -1
  60. package/dist/routes/pages/admin/core/AgentJobsInboxPage.module.css +88 -12
  61. package/dist/routes/pages/admin/core/AgentJobsInboxPage.tsx +238 -26
  62. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.css +6 -0
  63. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.d.ts.map +1 -1
  64. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js +56 -49
  65. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.js.map +1 -1
  66. package/dist/routes/pages/admin/core/AgentRegistryEditorPage.tsx +13 -6
  67. package/dist/routes/pages/embed/AdminEmbedPage.d.ts +7 -0
  68. package/dist/routes/pages/embed/AdminEmbedPage.d.ts.map +1 -0
  69. package/dist/routes/pages/embed/AdminEmbedPage.js +104 -0
  70. package/dist/routes/pages/embed/AdminEmbedPage.js.map +1 -0
  71. package/dist/routes/pages/embed/AdminEmbedPage.module.css +9 -0
  72. package/dist/routes/pages/embed/AdminEmbedPage.tsx +128 -0
  73. package/dist/routes/solidRoutes.d.ts.map +1 -1
  74. package/dist/routes/solidRoutes.js +2 -0
  75. package/dist/routes/solidRoutes.js.map +1 -1
  76. package/dist/routes/solidRoutes.tsx +2 -0
  77. package/package.json +1 -1
@@ -215,15 +215,17 @@ function recordFrom(value) {
215
215
  }
216
216
  function items(value) { return Array.isArray(value) ? value : value ? [value] : []; }
217
217
  function agentFormFromRecord(record) {
218
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
218
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
219
219
  var skills = items(record.agentSkills);
220
220
  var tools = items(record.agentTools);
221
221
  var secrets = items(record.agentSecrets);
222
222
  return {
223
223
  name: (_a = record.name) !== null && _a !== void 0 ? _a : "", title: (_b = record.title) !== null && _b !== void 0 ? _b : "", description: (_c = record.description) !== null && _c !== void 0 ? _c : "", iconName: (_d = record.iconName) !== null && _d !== void 0 ? _d : "",
224
224
  inputs: parseInputs(record.requiredInputs), reasoningModelKey: (_e = record.reasoningModelKey) !== null && _e !== void 0 ? _e : "", fastModelKey: (_f = record.fastModelKey) !== null && _f !== void 0 ? _f : "",
225
- systemPrompt: (_g = record.systemPrompt) !== null && _g !== void 0 ? _g : "", stepLimit: (_h = record.stepLimit) !== null && _h !== void 0 ? _h : 100, turnStepLimit: (_j = record.turnStepLimit) !== null && _j !== void 0 ? _j : 20,
226
- costLimit: Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3), tags: agentHubTagsFrom(record.tags), moduleId: (_m = (_l = agentHubModuleFrom(record.module)) === null || _l === void 0 ? void 0 : _l.id) !== null && _m !== void 0 ? _m : null, skillIds: skills.map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
225
+ systemPrompt: (_g = record.systemPrompt) !== null && _g !== void 0 ? _g : "", runner: (_h = record.runner) !== null && _h !== void 0 ? _h : null, minProcesses: (_j = record.minProcesses) !== null && _j !== void 0 ? _j : 0,
226
+ maxProcesses: (_k = record.maxProcesses) !== null && _k !== void 0 ? _k : null, processCpu: (_l = record.processCpu) !== null && _l !== void 0 ? _l : null, processMemory: (_m = record.processMemory) !== null && _m !== void 0 ? _m : null,
227
+ stepLimit: (_o = record.stepLimit) !== null && _o !== void 0 ? _o : 100, turnStepLimit: (_p = record.turnStepLimit) !== null && _p !== void 0 ? _p : 20,
228
+ costLimit: Number((_q = record.costLimit) !== null && _q !== void 0 ? _q : 3), tags: agentHubTagsFrom(record.tags), moduleId: (_s = (_r = agentHubModuleFrom(record.module)) === null || _r === void 0 ? void 0 : _r.id) !== null && _s !== void 0 ? _s : null, skillIds: skills.map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
227
229
  toolIds: tools.map(function (link) { var _a; return (_a = link.agentToolRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
228
230
  roleIds: items(record.agentRoles).map(function (link) { var _a; return (_a = link.roleMetadata) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
229
231
  secretIds: secrets.map(function (link) { var _a; return (_a = link.secret) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean),
@@ -478,30 +480,31 @@ export function AgentRegistryEditorPage() {
478
480
  var _11 = React.useState(100), stepLimit = _11[0], setStepLimit = _11[1];
479
481
  var _12 = React.useState(20), turnStepLimit = _12[0], setTurnStepLimit = _12[1];
480
482
  var _13 = React.useState(3), costLimit = _13[0], setCostLimit = _13[1];
481
- var _14 = React.useState([]), tags = _14[0], setTags = _14[1];
482
- var _15 = React.useState(null), module = _15[0], setModule = _15[1];
483
- var _16 = React.useState(false), creatingTag = _16[0], setCreatingTag = _16[1];
484
- var _17 = React.useState([]), skillIds = _17[0], setSkillIds = _17[1];
485
- var _18 = React.useState([]), toolIds = _18[0], setToolIds = _18[1];
486
- var _19 = React.useState([]), roleIds = _19[0], setRoleIds = _19[1];
487
- var _20 = React.useState([]), secretIds = _20[0], setSecretIds = _20[1];
488
- var _21 = React.useState({}), alwaysIncludeValues = _21[0], setAlwaysIncludeValues = _21[1];
489
- var _22 = React.useState({}), requiresApprovalValues = _22[0], setRequiresApprovalValues = _22[1];
490
- var _23 = React.useState({}), secretEnvVarNames = _23[0], setSecretEnvVarNames = _23[1];
491
- var _24 = React.useState("list"), resourceView = _24[0], setResourceView = _24[1];
492
- var _25 = React.useState(null), pendingSecret = _25[0], setPendingSecret = _25[1];
493
- var _26 = React.useState(""), secretEnvVarDraft = _26[0], setSecretEnvVarDraft = _26[1];
494
- var _27 = React.useState(""), secretEnvVarError = _27[0], setSecretEnvVarError = _27[1];
495
- var _28 = React.useState({}), errors = _28[0], setErrors = _28[1];
496
- var _29 = React.useState(0), auditVersion = _29[0], setAuditVersion = _29[1];
497
- var _30 = React.useState(false), confirmRefresh = _30[0], setConfirmRefresh = _30[1];
498
- var _31 = React.useState(false), activateDialogOpen = _31[0], setActivateDialogOpen = _31[1];
499
- var _32 = React.useState(false), includeVersionDetails = _32[0], setIncludeVersionDetails = _32[1];
500
- var _33 = React.useState(""), versionName = _33[0], setVersionName = _33[1];
501
- var _34 = React.useState(""), versionDescription = _34[0], setVersionDescription = _34[1];
502
- var _35 = React.useState(false), activating = _35[0], setActivating = _35[1];
503
- var _36 = React.useState(function () { return id === "new" ? null : savedActivationReadyAt(id); }), activationReadyAt = _36[0], setActivationReadyAt = _36[1];
504
- var _37 = React.useState(Date.now()), countdownNow = _37[0], setCountdownNow = _37[1];
483
+ var _14 = React.useState({ runner: null, minProcesses: 0, maxProcesses: null, processCpu: null, processMemory: null }), deployment = _14[0], setDeployment = _14[1];
484
+ var _15 = React.useState([]), tags = _15[0], setTags = _15[1];
485
+ var _16 = React.useState(null), module = _16[0], setModule = _16[1];
486
+ var _17 = React.useState(false), creatingTag = _17[0], setCreatingTag = _17[1];
487
+ var _18 = React.useState([]), skillIds = _18[0], setSkillIds = _18[1];
488
+ var _19 = React.useState([]), toolIds = _19[0], setToolIds = _19[1];
489
+ var _20 = React.useState([]), roleIds = _20[0], setRoleIds = _20[1];
490
+ var _21 = React.useState([]), secretIds = _21[0], setSecretIds = _21[1];
491
+ var _22 = React.useState({}), alwaysIncludeValues = _22[0], setAlwaysIncludeValues = _22[1];
492
+ var _23 = React.useState({}), requiresApprovalValues = _23[0], setRequiresApprovalValues = _23[1];
493
+ var _24 = React.useState({}), secretEnvVarNames = _24[0], setSecretEnvVarNames = _24[1];
494
+ var _25 = React.useState("list"), resourceView = _25[0], setResourceView = _25[1];
495
+ var _26 = React.useState(null), pendingSecret = _26[0], setPendingSecret = _26[1];
496
+ var _27 = React.useState(""), secretEnvVarDraft = _27[0], setSecretEnvVarDraft = _27[1];
497
+ var _28 = React.useState(""), secretEnvVarError = _28[0], setSecretEnvVarError = _28[1];
498
+ var _29 = React.useState({}), errors = _29[0], setErrors = _29[1];
499
+ var _30 = React.useState(0), auditVersion = _30[0], setAuditVersion = _30[1];
500
+ var _31 = React.useState(false), confirmRefresh = _31[0], setConfirmRefresh = _31[1];
501
+ var _32 = React.useState(false), activateDialogOpen = _32[0], setActivateDialogOpen = _32[1];
502
+ var _33 = React.useState(false), includeVersionDetails = _33[0], setIncludeVersionDetails = _33[1];
503
+ var _34 = React.useState(""), versionName = _34[0], setVersionName = _34[1];
504
+ var _35 = React.useState(""), versionDescription = _35[0], setVersionDescription = _35[1];
505
+ var _36 = React.useState(false), activating = _36[0], setActivating = _36[1];
506
+ var _37 = React.useState(function () { return id === "new" ? null : savedActivationReadyAt(id); }), activationReadyAt = _37[0], setActivationReadyAt = _37[1];
507
+ var _38 = React.useState(Date.now()), countdownNow = _38[0], setCountdownNow = _38[1];
505
508
  var baseline = React.useRef("");
506
509
  React.useEffect(function () {
507
510
  if (id === "new") {
@@ -530,10 +533,10 @@ export function AgentRegistryEditorPage() {
530
533
  }, [activationReadyAt, id]);
531
534
  var currentForm = function () {
532
535
  var _a;
533
- return JSON.stringify({ name: name, title: title, description: description, iconName: iconName, inputs: inputs, reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), tags: tags, moduleId: (_a = module === null || module === void 0 ? void 0 : module.id) !== null && _a !== void 0 ? _a : null, skillIds: skillIds, toolIds: toolIds, roleIds: roleIds, secretIds: secretIds, alwaysIncludeValues: alwaysIncludeValues, requiresApprovalValues: requiresApprovalValues, secretEnvVarNames: secretEnvVarNames });
536
+ return JSON.stringify(__assign(__assign({ name: name, title: title, description: description, iconName: iconName, inputs: inputs, reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt }, deployment), { stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), tags: tags, moduleId: (_a = module === null || module === void 0 ? void 0 : module.id) !== null && _a !== void 0 ? _a : null, skillIds: skillIds, toolIds: toolIds, roleIds: roleIds, secretIds: secretIds, alwaysIncludeValues: alwaysIncludeValues, requiresApprovalValues: requiresApprovalValues, secretEnvVarNames: secretEnvVarNames }));
534
537
  };
535
538
  React.useEffect(function () {
536
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
539
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
537
540
  if (!record)
538
541
  return;
539
542
  baseline.current = JSON.stringify(agentFormFromRecord(record));
@@ -548,6 +551,8 @@ export function AgentRegistryEditorPage() {
548
551
  setStepLimit((_h = record.stepLimit) !== null && _h !== void 0 ? _h : 100);
549
552
  setTurnStepLimit((_j = record.turnStepLimit) !== null && _j !== void 0 ? _j : 20);
550
553
  setCostLimit(Number((_k = record.costLimit) !== null && _k !== void 0 ? _k : 3));
554
+ setDeployment({ runner: (_l = record.runner) !== null && _l !== void 0 ? _l : null, minProcesses: (_m = record.minProcesses) !== null && _m !== void 0 ? _m : 0, maxProcesses: (_o = record.maxProcesses) !== null && _o !== void 0 ? _o : null,
555
+ processCpu: (_p = record.processCpu) !== null && _p !== void 0 ? _p : null, processMemory: (_q = record.processMemory) !== null && _q !== void 0 ? _q : null });
551
556
  setTags(agentHubTagsFrom(record.tags));
552
557
  setModule(agentHubModuleFrom(record.module));
553
558
  setSkillIds(items(record.agentSkills).map(function (link) { var _a; return (_a = link.agentSkillRegistry) === null || _a === void 0 ? void 0 : _a.id; }).filter(Boolean));
@@ -595,7 +600,7 @@ export function AgentRegistryEditorPage() {
595
600
  try {
596
601
  aiConfig = (_b = (typeof configValue === "string" ? JSON.parse(configValue) : configValue)) !== null && _b !== void 0 ? _b : {};
597
602
  }
598
- catch ( /* Invalid configuration has no enabled providers. */_38) { /* Invalid configuration has no enabled providers. */ }
603
+ catch ( /* Invalid configuration has no enabled providers. */_39) { /* Invalid configuration has no enabled providers. */ }
599
604
  var modelsCatalog = useModelsDevCatalog().catalog;
600
605
  var savedModelKeys = [record === null || record === void 0 ? void 0 : record.reasoningModelKey, record === null || record === void 0 ? void 0 : record.fastModelKey].filter(function (key) { return !!key; });
601
606
  var modelOptions = buildModelOptions((_c = aiConfig.providers) !== null && _c !== void 0 ? _c : {}, { Reasoning: (_e = (_d = aiConfig.models) === null || _d === void 0 ? void 0 : _d.default) !== null && _e !== void 0 ? _e : (_f = aiConfig.models) === null || _f === void 0 ? void 0 : _f.main, Fast: (_g = aiConfig.models) === null || _g === void 0 ? void 0 : _g.fast }, modelsCatalog, savedModelKeys);
@@ -691,9 +696,9 @@ export function AgentRegistryEditorPage() {
691
696
  if (versionDetails === void 0) { versionDetails = {}; }
692
697
  return __awaiter(_this, void 0, void 0, function () {
693
698
  var next, normalizedInputs, payload, newlyCreatedId, scalarSaved, activationAttempted, result, _a, savedId, readyAt, error_1;
694
- var _b, _c, _d;
695
- return __generator(this, function (_e) {
696
- switch (_e.label) {
699
+ var _b, _c, _d, _e, _f, _g, _h, _j;
700
+ return __generator(this, function (_k) {
701
+ switch (_k.label) {
697
702
  case 0:
698
703
  if (nextStatus === "active" && activationReadyAt && Date.now() < activationReadyAt)
699
704
  return [2 /*return*/, false];
@@ -718,6 +723,8 @@ export function AgentRegistryEditorPage() {
718
723
  next.inputs = "Input names must be unique.";
719
724
  if (stepLimit < 1 || turnStepLimit < 1 || costLimit < 0)
720
725
  next.limits = "Step limits must be positive and cost limit cannot be negative.";
726
+ if (deployment.minProcesses != null && deployment.maxProcesses != null && deployment.minProcesses > deployment.maxProcesses)
727
+ next.deployment = "Minimum processes cannot exceed maximum processes.";
721
728
  setErrors(next);
722
729
  if (Object.keys(next).length) {
723
730
  setTab(next.systemPrompt ? "persona" : next.limits && isAdmin ? "policies" : "basics");
@@ -733,47 +740,47 @@ export function AgentRegistryEditorPage() {
733
740
  setTab("basics");
734
741
  return [2 /*return*/, false];
735
742
  }
736
- payload = __assign(__assign(__assign({ name: name.trim(), title: title.trim(), description: description.trim(), iconName: iconName, requiredInputs: JSON.stringify(normalizedInputs), reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit) }, agentHubTagsPayload(tags)), agentHubModulePayload(module)), { status: nextStatus === "active" ? (_b = record === null || record === void 0 ? void 0 : record.status) !== null && _b !== void 0 ? _b : "draft" : nextStatus !== null && nextStatus !== void 0 ? nextStatus : "draft" });
743
+ payload = __assign(__assign(__assign({ name: name.trim(), title: title.trim(), description: description.trim(), iconName: iconName, requiredInputs: JSON.stringify(normalizedInputs), reasoningModelKey: reasoningModelKey, fastModelKey: fastModelKey, systemPrompt: systemPrompt, stepLimit: Number(stepLimit), turnStepLimit: Number(turnStepLimit), costLimit: Number(costLimit), runner: (_b = deployment.runner) !== null && _b !== void 0 ? _b : null, minProcesses: Number((_c = deployment.minProcesses) !== null && _c !== void 0 ? _c : 0), maxProcesses: (_d = deployment.maxProcesses) !== null && _d !== void 0 ? _d : null, processCpu: (_e = deployment.processCpu) !== null && _e !== void 0 ? _e : null, processMemory: (_f = deployment.processMemory) !== null && _f !== void 0 ? _f : null }, agentHubTagsPayload(tags)), agentHubModulePayload(module)), { status: nextStatus === "active" ? (_g = record === null || record === void 0 ? void 0 : record.status) !== null && _g !== void 0 ? _g : "draft" : nextStatus !== null && nextStatus !== void 0 ? nextStatus : "draft" });
737
744
  scalarSaved = false;
738
745
  activationAttempted = false;
739
- _e.label = 1;
746
+ _k.label = 1;
740
747
  case 1:
741
- _e.trys.push([1, 12, , 13]);
748
+ _k.trys.push([1, 12, , 13]);
742
749
  if (!(record === null || record === void 0 ? void 0 : record.id)) return [3 /*break*/, 3];
743
750
  return [4 /*yield*/, updateAgent({ id: record.id, data: payload }).unwrap()];
744
751
  case 2:
745
- _a = _e.sent();
752
+ _a = _k.sent();
746
753
  return [3 /*break*/, 5];
747
754
  case 3: return [4 /*yield*/, createAgent(payload).unwrap()];
748
755
  case 4:
749
- _a = _e.sent();
750
- _e.label = 5;
756
+ _a = _k.sent();
757
+ _k.label = 5;
751
758
  case 5:
752
759
  result = _a;
753
760
  scalarSaved = true;
754
- savedId = Number((_c = record === null || record === void 0 ? void 0 : record.id) !== null && _c !== void 0 ? _c : (_d = recordFrom(result)) === null || _d === void 0 ? void 0 : _d.id);
761
+ savedId = Number((_h = record === null || record === void 0 ? void 0 : record.id) !== null && _h !== void 0 ? _h : (_j = recordFrom(result)) === null || _j === void 0 ? void 0 : _j.id);
755
762
  if (!savedId)
756
763
  throw new Error("Agent saved, but its ID was not returned.");
757
764
  if (!(record === null || record === void 0 ? void 0 : record.id))
758
765
  newlyCreatedId = savedId;
759
766
  return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentSkills, skillIds, "agentSkillRegistry", createSkillLink, deleteSkillLink, updateSkillLink, function (targetId) { var _a; return ({ alwaysInclude: (_a = alwaysIncludeValues[targetId]) !== null && _a !== void 0 ? _a : true }); })];
760
767
  case 6:
761
- _e.sent();
768
+ _k.sent();
762
769
  return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentTools, toolIds, "agentToolRegistry", createToolLink, deleteToolLink, updateToolLink, function (targetId) { var _a; return ({ requiresApproval: (_a = requiresApprovalValues[targetId]) !== null && _a !== void 0 ? _a : false }); })];
763
770
  case 7:
764
- _e.sent();
771
+ _k.sent();
765
772
  return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentRoles, roleIds, "roleMetadata", createRoleLink, deleteRoleLink, undefined)];
766
773
  case 8:
767
- _e.sent();
774
+ _k.sent();
768
775
  return [4 /*yield*/, syncLinks(savedId, record === null || record === void 0 ? void 0 : record.agentSecrets, secretIds, "secret", createSecretLink, deleteSecretLink, updateSecretLink, function (targetId) { var _a; return ({ envVarName: (_a = secretEnvVarNames[targetId]) !== null && _a !== void 0 ? _a : "" }); })];
769
776
  case 9:
770
- _e.sent();
777
+ _k.sent();
771
778
  if (!(nextStatus === "active")) return [3 /*break*/, 11];
772
779
  activationAttempted = true;
773
780
  return [4 /*yield*/, solidPost("/agent-registry/".concat(savedId, "/activate"), versionDetails)];
774
781
  case 10:
775
- _e.sent();
776
- _e.label = 11;
782
+ _k.sent();
783
+ _k.label = 11;
777
784
  case 11:
778
785
  if (!nextStatus || nextStatus === "draft") {
779
786
  readyAt = Date.now() + ACTIVATION_WAIT_MS;
@@ -793,7 +800,7 @@ export function AgentRegistryEditorPage() {
793
800
  navigate("/admin/core/solid-core/agent-registry/editor/".concat(savedId), { replace: true });
794
801
  return [2 /*return*/, true];
795
802
  case 12:
796
- error_1 = _e.sent();
803
+ error_1 = _k.sent();
797
804
  dispatch(showToast({ severity: "error", summary: activationAttempted ? "Agent saved; activation failed" : scalarSaved ? "Agent saved; links incomplete" : "Save failed", detail: apiError(error_1) }));
798
805
  if (record === null || record === void 0 ? void 0 : record.id)
799
806
  refetch();
@@ -886,7 +893,7 @@ export function AgentRegistryEditorPage() {
886
893
  else
887
894
  void save(value);
888
895
  }, children: [value === "active" && activationWaiting ? _jsxs("span", { className: "agent-editor__activation-countdown", "aria-label": "Active available in ".concat(activationRemainingSeconds, " seconds"), children: [_jsxs("svg", { viewBox: "0 0 36 36", "aria-hidden": "true", children: [_jsx("circle", { className: "agent-editor__activation-countdown-track", cx: "18", cy: "18", r: "15" }), _jsx("circle", { className: "agent-editor__activation-countdown-progress", cx: "18", cy: "18", r: "15", pathLength: "100", strokeDasharray: "100", strokeDashoffset: 100 - activationRemainingMs / ACTIVATION_WAIT_MS * 100 })] }), _jsx("span", { children: activationRemainingSeconds })] }) : _jsx("span", { className: "agent-editor__workflow-stage-mark", children: index + 1 }), _jsxs("div", { className: "agent-editor__workflow-stage-copy", children: [_jsx("strong", { children: label }), _jsx("small", { children: description }), _jsx("small", { className: "agent-editor__workflow-stage-cta", children: agentStatus === value ? "Current stage" : value === "active" && activationWaiting ? "Available in ".concat(activationRemainingSeconds, "s") : "Click to move to this stage" })] }), agentStatus === value && _jsx("span", { className: "agent-editor__workflow-current", children: "Current" })] })] }, value);
889
- }) }), _jsx("small", { className: "agent-editor__workflow-save-hint", children: "Changing stage saves the current form and its linked skills, tools, roles, and secrets." })] })] }) },
896
+ }) }), _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 })] }) },
890
897
  { 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." }) })
891
898
  : _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 })] }) },
892
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) {
@@ -915,7 +922,7 @@ export function AgentRegistryEditorPage() {
915
922
  var _a, _b, _c, _d, _e;
916
923
  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 }) })] });
917
924
  } }) }
918
- ], ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "processes", label: "Processes", content: _jsxs("div", { className: "agent-editor__stack", children: [_jsx(AgentDeploymentPanel, { agentId: record.id, current: record, onSaved: function () { return void agentResult.refetch(); } }, record.id), _jsx(AgentProcessesPanel, { agentId: record.id, agentLabel: (_l = record.name) !== null && _l !== void 0 ? _l : record.title })] }) }] : []), true), ((record === null || record === void 0 ? void 0 : record.id) ? [
925
+ ], ((record === null || record === void 0 ? void 0 : record.id) ? [{ value: "processes", label: "Processes", content: _jsx(AgentProcessesPanel, { agentId: record.id, agentLabel: (_l = record.name) !== null && _l !== void 0 ? _l : record.title }) }] : []), true), ((record === null || record === void 0 ? void 0 : record.id) ? [
919
926
  ["jobs", "Jobs", (_m = jobs.currentData) === null || _m === void 0 ? void 0 : _m.records],
920
927
  ] : []).map(function (_a) {
921
928
  var value = _a[0], label = _a[1], related = _a[2];