@datatechsolutions/ui 3.7.5 → 3.8.0

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 (91) hide show
  1. package/dist/astrlabe/index.js +108 -108
  2. package/dist/astrlabe/index.mjs +4 -4
  3. package/dist/astrlabe/workflow-canvas.js +4 -4
  4. package/dist/astrlabe/workflow-canvas.mjs +3 -3
  5. package/dist/{chunk-GAN7AKZ2.mjs → chunk-32DHEVOH.mjs} +3 -3
  6. package/dist/{chunk-GAN7AKZ2.mjs.map → chunk-32DHEVOH.mjs.map} +1 -1
  7. package/dist/{chunk-IYDGO7RW.js → chunk-3H5CFLVK.js} +135 -135
  8. package/dist/{chunk-IYDGO7RW.js.map → chunk-3H5CFLVK.js.map} +1 -1
  9. package/dist/{chunk-QL2JYRBN.js → chunk-3X3IYDG6.js} +68 -68
  10. package/dist/{chunk-QL2JYRBN.js.map → chunk-3X3IYDG6.js.map} +1 -1
  11. package/dist/{chunk-N5365CGD.mjs → chunk-57E4TCB2.mjs} +3 -3
  12. package/dist/{chunk-N5365CGD.mjs.map → chunk-57E4TCB2.mjs.map} +1 -1
  13. package/dist/{chunk-4HP7XS5I.mjs → chunk-5W6LMDXV.mjs} +4 -4
  14. package/dist/{chunk-4HP7XS5I.mjs.map → chunk-5W6LMDXV.mjs.map} +1 -1
  15. package/dist/{chunk-EIZM2EQA.mjs → chunk-5YVOLHSW.mjs} +4 -4
  16. package/dist/{chunk-EIZM2EQA.mjs.map → chunk-5YVOLHSW.mjs.map} +1 -1
  17. package/dist/{chunk-KZSL7AXW.mjs → chunk-74BU2EBZ.mjs} +6 -6
  18. package/dist/{chunk-KZSL7AXW.mjs.map → chunk-74BU2EBZ.mjs.map} +1 -1
  19. package/dist/{chunk-7WIWDSF6.js → chunk-7JZFNKJD.js} +36 -36
  20. package/dist/{chunk-7WIWDSF6.js.map → chunk-7JZFNKJD.js.map} +1 -1
  21. package/dist/{chunk-DCBRGVD3.mjs → chunk-A4A3SQTV.mjs} +3 -3
  22. package/dist/{chunk-DCBRGVD3.mjs.map → chunk-A4A3SQTV.mjs.map} +1 -1
  23. package/dist/{chunk-JUDQX6MP.mjs → chunk-CZZOCKEA.mjs} +3 -3
  24. package/dist/{chunk-JUDQX6MP.mjs.map → chunk-CZZOCKEA.mjs.map} +1 -1
  25. package/dist/{chunk-DWIBK7GV.js → chunk-E57RZXOR.js} +25 -25
  26. package/dist/{chunk-DWIBK7GV.js.map → chunk-E57RZXOR.js.map} +1 -1
  27. package/dist/{chunk-Z3BMHKKH.mjs → chunk-E6C7MFHJ.mjs} +3 -3
  28. package/dist/{chunk-Z3BMHKKH.mjs.map → chunk-E6C7MFHJ.mjs.map} +1 -1
  29. package/dist/{chunk-P7GVXI7Y.mjs → chunk-EWYAM4WJ.mjs} +3 -3
  30. package/dist/{chunk-P7GVXI7Y.mjs.map → chunk-EWYAM4WJ.mjs.map} +1 -1
  31. package/dist/{chunk-Y2FR242F.js → chunk-F35GFICG.js} +13 -13
  32. package/dist/{chunk-Y2FR242F.js.map → chunk-F35GFICG.js.map} +1 -1
  33. package/dist/{chunk-BEUPW5WS.js → chunk-FKUIVS6I.js} +28 -28
  34. package/dist/{chunk-BEUPW5WS.js.map → chunk-FKUIVS6I.js.map} +1 -1
  35. package/dist/{chunk-GD6FHRHV.js → chunk-FNA66TT4.js} +3 -3
  36. package/dist/{chunk-GD6FHRHV.js.map → chunk-FNA66TT4.js.map} +1 -1
  37. package/dist/{chunk-RBB5YGWH.js → chunk-H37VDL7Y.js} +4 -4
  38. package/dist/{chunk-RBB5YGWH.js.map → chunk-H37VDL7Y.js.map} +1 -1
  39. package/dist/{chunk-KI4UPW4Z.js → chunk-HBOORO52.js} +4 -4
  40. package/dist/{chunk-KI4UPW4Z.js.map → chunk-HBOORO52.js.map} +1 -1
  41. package/dist/{chunk-MGZTZELL.mjs → chunk-KKXI7CPF.mjs} +3 -3
  42. package/dist/{chunk-MGZTZELL.mjs.map → chunk-KKXI7CPF.mjs.map} +1 -1
  43. package/dist/{chunk-IKH5IRDK.mjs → chunk-PCUINUIC.mjs} +3 -3
  44. package/dist/{chunk-IKH5IRDK.mjs.map → chunk-PCUINUIC.mjs.map} +1 -1
  45. package/dist/{chunk-CTCO2YI5.mjs → chunk-PYNXIDG3.mjs} +3 -3
  46. package/dist/{chunk-CTCO2YI5.mjs.map → chunk-PYNXIDG3.mjs.map} +1 -1
  47. package/dist/{chunk-MFAVWJWE.js → chunk-Q4QORAMH.js} +10 -10
  48. package/dist/{chunk-MFAVWJWE.js.map → chunk-Q4QORAMH.js.map} +1 -1
  49. package/dist/{chunk-ZF7RJNPD.js → chunk-Q7HRCCFT.js} +45 -45
  50. package/dist/{chunk-ZF7RJNPD.js.map → chunk-Q7HRCCFT.js.map} +1 -1
  51. package/dist/{chunk-R2RPRRB4.js → chunk-RCHTRG7R.js} +55 -55
  52. package/dist/{chunk-R2RPRRB4.js.map → chunk-RCHTRG7R.js.map} +1 -1
  53. package/dist/{chunk-FIB2CFJK.js → chunk-TCP45Q4B.js} +9 -9
  54. package/dist/{chunk-FIB2CFJK.js.map → chunk-TCP45Q4B.js.map} +1 -1
  55. package/dist/{chunk-SUU7XPRX.js → chunk-TJPPZU77.js} +34 -34
  56. package/dist/{chunk-SUU7XPRX.js.map → chunk-TJPPZU77.js.map} +1 -1
  57. package/dist/{chunk-XT76DMP5.js → chunk-VPFVW7ZF.js} +35 -35
  58. package/dist/{chunk-XT76DMP5.js.map → chunk-VPFVW7ZF.js.map} +1 -1
  59. package/dist/{chunk-IKHWYYZC.mjs → chunk-VS6PTRQ7.mjs} +3 -3
  60. package/dist/{chunk-IKHWYYZC.mjs.map → chunk-VS6PTRQ7.mjs.map} +1 -1
  61. package/dist/{chunk-YNHQ36UU.mjs → chunk-WDBVIU7W.mjs} +3 -3
  62. package/dist/{chunk-YNHQ36UU.mjs.map → chunk-WDBVIU7W.mjs.map} +1 -1
  63. package/dist/{chunk-MRLEINJN.mjs → chunk-ZP37M2QK.mjs} +7 -7
  64. package/dist/{chunk-MRLEINJN.mjs.map → chunk-ZP37M2QK.mjs.map} +1 -1
  65. package/dist/index.js +665 -665
  66. package/dist/index.mjs +2 -2
  67. package/dist/platform/admin/index.js +10 -10
  68. package/dist/platform/admin/index.mjs +4 -4
  69. package/dist/platform/agents-workspace.js +7 -7
  70. package/dist/platform/agents-workspace.mjs +6 -6
  71. package/dist/platform/app-shell.js +4 -4
  72. package/dist/platform/app-shell.mjs +3 -3
  73. package/dist/platform/auth/index.js +22 -22
  74. package/dist/platform/auth/index.mjs +4 -4
  75. package/dist/platform/billing/index.js +4 -4
  76. package/dist/platform/billing/index.mjs +3 -3
  77. package/dist/platform/impersonation/index.js +4 -4
  78. package/dist/platform/impersonation/index.mjs +3 -3
  79. package/dist/platform/index.js +78 -78
  80. package/dist/platform/index.mjs +18 -18
  81. package/dist/platform/pages/index.d.mts +36 -0
  82. package/dist/platform/pages/index.d.ts +36 -0
  83. package/dist/platform/pages/index.js +457 -260
  84. package/dist/platform/pages/index.js.map +1 -1
  85. package/dist/platform/pages/index.mjs +224 -27
  86. package/dist/platform/pages/index.mjs.map +1 -1
  87. package/dist/platform/settings/index.js +7 -7
  88. package/dist/platform/settings/index.mjs +6 -6
  89. package/dist/platform/workflow-canvas-shell.js +5 -5
  90. package/dist/platform/workflow-canvas-shell.mjs +4 -4
  91. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import { adaptWorkflowGraphToUi, formatDurationMs } from '../../chunk-UQXVCVAN.mjs';
3
- import { WorkflowWorkspace } from '../../chunk-4HP7XS5I.mjs';
4
- export { RolesPageView, UsersPageView } from '../../chunk-4HP7XS5I.mjs';
5
- import { DatasourceModal, findCategory, DIALECT_CATEGORIES } from '../../chunk-DCBRGVD3.mjs';
6
- export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-DCBRGVD3.mjs';
7
- import { defaultRuleForm, RuleForm, ExecutionTimelinePanel } from '../../chunk-EIZM2EQA.mjs';
3
+ import { WorkflowWorkspace } from '../../chunk-5W6LMDXV.mjs';
4
+ export { RolesPageView, UsersPageView } from '../../chunk-5W6LMDXV.mjs';
5
+ import { DatasourceModal, findCategory, DIALECT_CATEGORIES } from '../../chunk-A4A3SQTV.mjs';
6
+ export { DIALECT_CATEGORIES, DatasourceFormModal, DatasourceModal, findCategory, findDialect } from '../../chunk-A4A3SQTV.mjs';
7
+ import { defaultRuleForm, RuleForm, ExecutionTimelinePanel } from '../../chunk-5YVOLHSW.mjs';
8
8
  import '../../chunk-JB6RNAD2.mjs';
9
9
  import '../../chunk-LEXBTVGM.mjs';
10
- import '../../chunk-N5365CGD.mjs';
11
- import { HeroSection, PageLoadingState, PageEmptyState, SearchBar, EntityCard, ManagementPageLayout, CreateActionButton, GlassModal, FormGrid, FormSelect, FormInput, FormTextarea, SectionHeader, Text, Form, FormActionsRow, Table, TableHead, TableRow, TableHeader, TableBody, TableCell, InlineForm, CopyableId, ListCard, ListCardItem, Avatar, SectionCard, Tabs, TabsList, TabsTrigger, TabsContent } from '../../chunk-Z3BMHKKH.mjs';
10
+ import '../../chunk-57E4TCB2.mjs';
11
+ import { HeroSection, PageLoadingState, PageEmptyState, SearchBar, EntityCard, ManagementPageLayout, CreateActionButton, GlassModal, FormGrid, FormSelect, FormInput, FormTextarea, SectionHeader, Text, Form, FormActionsRow, Table, TableHead, TableRow, TableHeader, TableBody, TableCell, InlineForm, CopyableId, ListCard, ListCardItem, Avatar, SectionCard, Tabs, TabsList, TabsTrigger, TabsContent } from '../../chunk-E6C7MFHJ.mjs';
12
+ import '../../chunk-7VJ7CMMT.mjs';
12
13
  import '../../chunk-RHRJXK5R.mjs';
13
14
  import '../../chunk-3AY5HIQ6.mjs';
14
- import '../../chunk-7VJ7CMMT.mjs';
15
15
  import '../../chunk-PLTLRL2V.mjs';
16
16
  import { Badge, Button } from '../../chunk-WR55H7DH.mjs';
17
17
  import '../../chunk-D2JF6C3E.mjs';
@@ -2342,6 +2342,7 @@ function AgentsWorkspacePageView({
2342
2342
  {
2343
2343
  labels,
2344
2344
  models,
2345
+ connections,
2345
2346
  onClose: () => setCreateOpen(false),
2346
2347
  onSubmit: async (input) => {
2347
2348
  await onCreateAgent(input);
@@ -2770,30 +2771,74 @@ function ModelTab({
2770
2771
  );
2771
2772
  }
2772
2773
  var AGENT_PRESETS = [
2773
- { id: "sales", emoji: "\u{1F4BC}", name: "Sales Specialist", role: "Lead qualification & CRM", systemPrompt: "You are a sales assistant. Help qualify leads, manage CRM entries, and schedule follow-ups. Always be professional and proactive.", temperature: 0.7, maxTokens: 2048, accent: "from-emerald-500 to-teal-600" },
2774
- { id: "support", emoji: "\u{1F3A7}", name: "Customer Support", role: "Ticket resolution & escalation", systemPrompt: "You are a customer support agent. Resolve tickets, answer questions, and escalate complex issues. Prioritize customer satisfaction.", temperature: 0.3, maxTokens: 2048, accent: "from-sky-500 to-indigo-600" },
2775
- { id: "finance", emoji: "\u{1F4CA}", name: "Financial Analyst", role: "Revenue, margins, reports", systemPrompt: "You are a financial analyst. Analyze revenue, calculate margins, generate performance reports, and identify trends. Use data-driven insights for recommendations.", temperature: 0.4, maxTokens: 4096, accent: "from-amber-500 to-orange-600" },
2776
- { id: "security", emoji: "\u{1F6E1}\uFE0F", name: "Security Analyst", role: "Threat monitoring & compliance", systemPrompt: "You are a security analyst. Monitor for threats, audit data access, ensure compliance with privacy regulations, and manage incident response.", temperature: 0.3, maxTokens: 2048, accent: "from-rose-500 to-red-600" },
2777
- { id: "data", emoji: "\u{1F52C}", name: "Data Analyst", role: "Pattern detection & cleaning", systemPrompt: "You are a data analyst. Process raw data inputs, identify patterns, clean datasets, and prepare structured analysis for downstream agents.", temperature: 0.5, maxTokens: 4096, accent: "from-violet-500 to-purple-600" },
2774
+ { id: "sales", emoji: "\u{1F4BC}", name: "Sales Specialist", role: "Lead qualification & CRM", systemPrompt: "You are a sales assistant. Help qualify leads, manage CRM entries, and schedule follow-ups. Always be professional and proactive.", temperature: 0.7, maxTokens: 2048, accent: "from-emerald-500 to-teal-600", framework: "anthropic" },
2775
+ { id: "support", emoji: "\u{1F3A7}", name: "Customer Support", role: "Ticket resolution & escalation", systemPrompt: "You are a customer support agent. Resolve tickets, answer questions, and escalate complex issues. Prioritize customer satisfaction.", temperature: 0.3, maxTokens: 2048, accent: "from-sky-500 to-indigo-600", framework: "crewai" },
2776
+ { id: "finance", emoji: "\u{1F4CA}", name: "Financial Analyst", role: "Revenue, margins, reports", systemPrompt: "You are a financial analyst. Analyze revenue, calculate margins, generate performance reports, and identify trends. Use data-driven insights for recommendations.", temperature: 0.4, maxTokens: 4096, accent: "from-amber-500 to-orange-600", framework: "langchain" },
2777
+ { id: "security", emoji: "\u{1F6E1}\uFE0F", name: "Security Analyst", role: "Threat monitoring & compliance", systemPrompt: "You are a security analyst. Monitor for threats, audit data access, ensure compliance with privacy regulations, and manage incident response.", temperature: 0.3, maxTokens: 2048, accent: "from-rose-500 to-red-600", framework: "anthropic" },
2778
+ { id: "data", emoji: "\u{1F52C}", name: "Data Analyst", role: "Pattern detection & cleaning", systemPrompt: "You are a data analyst. Process raw data inputs, identify patterns, clean datasets, and prepare structured analysis for downstream agents.", temperature: 0.5, maxTokens: 4096, accent: "from-violet-500 to-purple-600", framework: "google-adk" },
2778
2779
  { id: "custom", emoji: "\u2728", name: "", role: "", systemPrompt: "", temperature: 0.2, maxTokens: 2048, accent: "from-slate-500 to-slate-700" }
2779
2780
  ];
2781
+ var DIFFICULTY_OPTIONS = [
2782
+ { id: "beginner", emoji: "\u{1F331}", accent: "from-emerald-500 to-teal-600" },
2783
+ { id: "intermediate", emoji: "\u26A1", accent: "from-sky-500 to-indigo-600" },
2784
+ { id: "advanced", emoji: "\u{1F680}", accent: "from-amber-500 to-orange-600" },
2785
+ { id: "expert", emoji: "\u{1F9E0}", accent: "from-rose-500 to-purple-600" }
2786
+ ];
2780
2787
  var EMOJI_PALETTE = ["\u{1F4BC}", "\u{1F3A7}", "\u{1F4CA}", "\u{1F6E1}\uFE0F", "\u{1F52C}", "\u2728", "\u{1F916}", "\u26A1", "\u{1F3AF}", "\u{1F680}", "\u{1F9E0}", "\u{1F9BE}", "\u{1F4E1}", "\u{1F52E}", "\u{1F310}", "\u{1F5C2}\uFE0F"];
2781
2788
  function CreateAgentDialog({
2782
2789
  labels,
2783
2790
  models,
2791
+ connections,
2784
2792
  onClose,
2785
2793
  onSubmit
2786
2794
  }) {
2787
- const modelOptions = models.map((m) => ({ value: m.id, label: `${m.name} (${m.provider})` }));
2788
2795
  const [presetId, setPresetId] = useState("custom");
2789
2796
  const [emoji, setEmoji] = useState("\u2728");
2790
2797
  const [name, setName] = useState("");
2791
2798
  const [role, setRole] = useState("");
2799
+ const [description, setDescription] = useState("");
2792
2800
  const [systemPrompt, setSystemPrompt] = useState("");
2801
+ const [userPrompt, setUserPrompt] = useState("");
2793
2802
  const [temperature, setTemperature] = useState(0.2);
2794
2803
  const [maxTokens, setMaxTokens] = useState(2048);
2795
- const [modelId, setModelId] = useState(modelOptions[0]?.value ?? "");
2804
+ const [topP, setTopP] = useState(1);
2805
+ const [topK, setTopK] = useState(0);
2806
+ const [connectionId, setConnectionId] = useState("");
2807
+ const [framework, setFramework] = useState("");
2808
+ const [difficulty, setDifficulty] = useState("intermediate");
2809
+ const [tagsInput, setTagsInput] = useState("");
2810
+ const [outputSchema, setOutputSchema] = useState("");
2811
+ const [modelId, setModelId] = useState(models[0]?.id ?? "");
2796
2812
  const activePreset = AGENT_PRESETS.find((p) => p.id === presetId) ?? AGENT_PRESETS[AGENT_PRESETS.length - 1];
2813
+ const matchingModels = useMemo(() => {
2814
+ if (!connectionId) return models;
2815
+ const conn = connections.find((c) => c.id === connectionId);
2816
+ const slug = conn?.providerSlug;
2817
+ if (!slug) return models;
2818
+ const matches = models.filter(
2819
+ (m) => (m.provider ?? "") === slug || String(m.provider ?? "").startsWith(slug)
2820
+ );
2821
+ return matches.length > 0 ? matches : models;
2822
+ }, [models, connections, connectionId]);
2823
+ const modelOptions = matchingModels.map((m) => ({ value: m.id, label: `${m.name} (${m.provider})` }));
2824
+ const connectionOptions = useMemo(() => {
2825
+ const inline = { value: "", label: labels.connectionInline ?? "Inline model (no connection)" };
2826
+ return [
2827
+ inline,
2828
+ ...connections.map((c) => ({
2829
+ value: c.id,
2830
+ label: `${c.name}${c.providerSlug ? " \xB7 " + c.providerSlug : ""}`
2831
+ }))
2832
+ ];
2833
+ }, [connections, labels.connectionInline]);
2834
+ const frameworkOptions = useMemo(() => [
2835
+ { value: "", label: labels.connectionInline ?? "\u2014" },
2836
+ { value: "anthropic", label: labels.frameworkAnthropic ?? "Anthropic" },
2837
+ { value: "langchain", label: labels.frameworkLangChain ?? "LangChain" },
2838
+ { value: "crewai", label: labels.frameworkCrewAI ?? "CrewAI" },
2839
+ { value: "google-adk", label: labels.frameworkGoogleADK ?? "Google ADK" },
2840
+ { value: "openai", label: labels.frameworkOpenAI ?? "OpenAI" }
2841
+ ], [labels]);
2797
2842
  function applyPreset(preset) {
2798
2843
  setPresetId(preset.id);
2799
2844
  setEmoji(preset.emoji);
@@ -2803,6 +2848,7 @@ function CreateAgentDialog({
2803
2848
  setSystemPrompt(preset.systemPrompt);
2804
2849
  setTemperature(preset.temperature);
2805
2850
  setMaxTokens(preset.maxTokens);
2851
+ if (preset.framework) setFramework(preset.framework);
2806
2852
  }
2807
2853
  }
2808
2854
  return /* @__PURE__ */ jsx(
@@ -2826,12 +2872,24 @@ function CreateAgentDialog({
2826
2872
  submitLabel: labels.save,
2827
2873
  onSubmit: async (event) => {
2828
2874
  event.preventDefault();
2875
+ const parsedTags = tagsInput.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
2829
2876
  await onSubmit({
2830
2877
  name: name.trim() || activePreset.name || "Untitled Agent",
2878
+ role: role.trim() || void 0,
2879
+ description: description.trim() || void 0,
2880
+ avatar: emoji,
2831
2881
  modelId,
2882
+ connectionId: connectionId || void 0,
2883
+ framework: framework || void 0,
2832
2884
  systemPrompt,
2885
+ userPrompt: userPrompt.trim() || void 0,
2833
2886
  maxTokens,
2834
- temperature
2887
+ temperature,
2888
+ topP,
2889
+ topK,
2890
+ difficulty: difficulty || void 0,
2891
+ tags: parsedTags.length > 0 ? parsedTags : void 0,
2892
+ outputSchema: outputSchema.trim() || void 0
2835
2893
  });
2836
2894
  },
2837
2895
  children: /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
@@ -2921,7 +2979,69 @@ function CreateAgentDialog({
2921
2979
  placeholder: labels.rolePlaceholder
2922
2980
  }
2923
2981
  )
2924
- ] })
2982
+ ] }),
2983
+ /* @__PURE__ */ jsx(
2984
+ FormTextarea,
2985
+ {
2986
+ label: labels.descriptionLabel ?? labels.description,
2987
+ value: description,
2988
+ onValueChange: setDescription,
2989
+ rows: 2,
2990
+ placeholder: labels.descriptionPlaceholder ?? "A short summary of what this agent does."
2991
+ }
2992
+ )
2993
+ ] })
2994
+ }
2995
+ ),
2996
+ /* @__PURE__ */ jsx(
2997
+ SectionCard,
2998
+ {
2999
+ variant: "glass",
3000
+ header: {
3001
+ title: labels.modelSection ?? "Model and connection",
3002
+ subtitle: labels.connectionPickPrompt ?? "Pick the provider connection or use an inline model"
3003
+ },
3004
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
3005
+ /* @__PURE__ */ jsxs(FormGrid, { children: [
3006
+ /* @__PURE__ */ jsx(
3007
+ FormSelect,
3008
+ {
3009
+ label: labels.connectionLabel ?? labels.connection,
3010
+ value: connectionId,
3011
+ onValueChange: setConnectionId,
3012
+ options: connectionOptions,
3013
+ icon: /* @__PURE__ */ jsx(LinkIcon, { className: "h-4 w-4" })
3014
+ }
3015
+ ),
3016
+ /* @__PURE__ */ jsx(
3017
+ FormSelect,
3018
+ {
3019
+ label: labels.frameworkLabel ?? "Framework",
3020
+ value: framework,
3021
+ onValueChange: setFramework,
3022
+ options: frameworkOptions
3023
+ }
3024
+ ),
3025
+ /* @__PURE__ */ jsx(
3026
+ FormSelect,
3027
+ {
3028
+ label: labels.model,
3029
+ value: modelId,
3030
+ onValueChange: setModelId,
3031
+ options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
3032
+ }
3033
+ )
3034
+ ] }),
3035
+ /* @__PURE__ */ jsx(
3036
+ FormTextarea,
3037
+ {
3038
+ label: labels.outputSchemaLabel ?? "Output schema (JSON)",
3039
+ value: outputSchema,
3040
+ onValueChange: setOutputSchema,
3041
+ rows: 4,
3042
+ placeholder: labels.outputSchemaPlaceholder ?? '{\n "type": "object",\n "properties": { "summary": { "type": "string" } }\n}'
3043
+ }
3044
+ )
2925
3045
  ] })
2926
3046
  }
2927
3047
  ),
@@ -2944,14 +3064,27 @@ function CreateAgentDialog({
2944
3064
  placeholder: labels.promptPlaceholder ?? "You are a helpful assistant\u2026"
2945
3065
  }
2946
3066
  ),
3067
+ /* @__PURE__ */ jsx(
3068
+ FormTextarea,
3069
+ {
3070
+ label: labels.userPromptLabel ?? "User prompt template",
3071
+ value: userPrompt,
3072
+ onValueChange: setUserPrompt,
3073
+ rows: 4,
3074
+ placeholder: labels.userPromptPlaceholder ?? "Analyze {{ nodeId.path }} and produce a summary."
3075
+ }
3076
+ ),
2947
3077
  /* @__PURE__ */ jsxs(FormGrid, { children: [
2948
3078
  /* @__PURE__ */ jsx(
2949
- FormSelect,
3079
+ FormInput,
2950
3080
  {
2951
- label: labels.model,
2952
- value: modelId,
2953
- onValueChange: setModelId,
2954
- options: modelOptions.length > 0 ? modelOptions : [{ value: "", label: labels.modelEmpty }]
3081
+ label: `${labels.temperature} (${temperature.toFixed(2)})`,
3082
+ type: "number",
3083
+ value: String(temperature),
3084
+ onValueChange: (v) => setTemperature(Number(v) || 0),
3085
+ step: 0.1,
3086
+ min: 0,
3087
+ max: 2
2955
3088
  }
2956
3089
  ),
2957
3090
  /* @__PURE__ */ jsx(
@@ -2968,18 +3101,82 @@ function CreateAgentDialog({
2968
3101
  /* @__PURE__ */ jsx(
2969
3102
  FormInput,
2970
3103
  {
2971
- label: `${labels.temperature} (${temperature.toFixed(2)})`,
3104
+ label: `${labels.topPLabel ?? "Top-P"} (${topP.toFixed(2)})`,
2972
3105
  type: "number",
2973
- value: String(temperature),
2974
- onValueChange: (v) => setTemperature(Number(v) || 0),
2975
- step: 0.1,
3106
+ value: String(topP),
3107
+ onValueChange: (v) => setTopP(Number(v) || 0),
3108
+ step: 0.05,
2976
3109
  min: 0,
2977
- max: 2
3110
+ max: 1
3111
+ }
3112
+ ),
3113
+ /* @__PURE__ */ jsx(
3114
+ FormInput,
3115
+ {
3116
+ label: labels.topKLabel ?? "Top-K",
3117
+ type: "number",
3118
+ value: String(topK),
3119
+ onValueChange: (v) => setTopK(Math.max(0, Math.floor(Number(v) || 0))),
3120
+ step: 1,
3121
+ min: 0,
3122
+ max: 500
2978
3123
  }
2979
3124
  )
2980
3125
  ] })
2981
3126
  ] })
2982
3127
  }
3128
+ ),
3129
+ /* @__PURE__ */ jsx(
3130
+ SectionCard,
3131
+ {
3132
+ variant: "glass",
3133
+ header: {
3134
+ title: labels.metadataSection ?? "Metadata",
3135
+ subtitle: labels.metadataSubtitle ?? "Difficulty tier and free-form tags"
3136
+ },
3137
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
3138
+ /* @__PURE__ */ jsxs("div", { children: [
3139
+ /* @__PURE__ */ jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.difficultyLabel ?? "Difficulty" }),
3140
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-4", children: DIFFICULTY_OPTIONS.map((opt) => {
3141
+ const selected = difficulty === opt.id;
3142
+ const label = opt.id === "beginner" ? labels.difficultyBeginner ?? "Beginner" : opt.id === "intermediate" ? labels.difficultyIntermediate ?? "Intermediate" : opt.id === "advanced" ? labels.difficultyAdvanced ?? "Advanced" : labels.difficultyExpert ?? "Expert";
3143
+ return /* @__PURE__ */ jsxs(
3144
+ "button",
3145
+ {
3146
+ type: "button",
3147
+ onClick: () => setDifficulty(opt.id),
3148
+ "aria-pressed": selected,
3149
+ className: [
3150
+ "liquid-surface flex items-center gap-2 rounded-xl px-3 py-2 text-left transition-all",
3151
+ selected ? "ring-2 ring-indigo-500/70 ring-offset-1 ring-offset-transparent" : "hover:border-indigo-400/40 focus-visible:ring-2 focus-visible:ring-indigo-500/70 focus-visible:ring-offset-1"
3152
+ ].join(" "),
3153
+ children: [
3154
+ /* @__PURE__ */ jsx(
3155
+ "span",
3156
+ {
3157
+ "aria-hidden": "true",
3158
+ className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br ${opt.accent} text-base shadow-sm`,
3159
+ children: opt.emoji
3160
+ }
3161
+ ),
3162
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-slate-900 dark:text-white", children: label })
3163
+ ]
3164
+ },
3165
+ opt.id
3166
+ );
3167
+ }) })
3168
+ ] }),
3169
+ /* @__PURE__ */ jsx(
3170
+ FormInput,
3171
+ {
3172
+ label: labels.tagsLabel ?? "Tags",
3173
+ value: tagsInput,
3174
+ onValueChange: setTagsInput,
3175
+ placeholder: labels.tagsPlaceholder ?? "comma, separated, tags"
3176
+ }
3177
+ )
3178
+ ] })
3179
+ }
2983
3180
  )
2984
3181
  ] })
2985
3182
  }