@datatechsolutions/ui 2.11.76 → 2.11.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrlabe/contracts.d.mts +67 -1
- package/dist/astrlabe/contracts.d.ts +67 -1
- package/dist/astrlabe/index.d.mts +111 -3
- package/dist/astrlabe/index.d.ts +111 -3
- package/dist/astrlabe/index.js +1071 -166
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +920 -23
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/{chunk-JIQSAUYC.mjs → chunk-3VHSRL3N.mjs} +37 -6
- package/dist/chunk-3VHSRL3N.mjs.map +1 -0
- package/dist/{chunk-EAGAWIIC.js → chunk-BCE3FQVS.js} +98 -67
- package/dist/chunk-BCE3FQVS.js.map +1 -0
- package/dist/{chunk-ZJQ5RLGK.mjs → chunk-LLFU42KC.mjs} +3 -3
- package/dist/{chunk-ZJQ5RLGK.mjs.map → chunk-LLFU42KC.mjs.map} +1 -1
- package/dist/{chunk-KNXAOJAK.js → chunk-TUEYBNWL.js} +3 -3
- package/dist/{chunk-KNXAOJAK.js.map → chunk-TUEYBNWL.js.map} +1 -1
- package/dist/index.js +753 -753
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-EAGAWIIC.js.map +0 -1
- package/dist/chunk-JIQSAUYC.mjs.map +0 -1
package/dist/astrlabe/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
4
|
+
require('../chunk-55H6WZQP.js');
|
|
5
|
+
var chunk5UU3RQRB_js = require('../chunk-5UU3RQRB.js');
|
|
6
|
+
var chunkBCE3FQVS_js = require('../chunk-BCE3FQVS.js');
|
|
7
|
+
var chunkTUEYBNWL_js = require('../chunk-TUEYBNWL.js');
|
|
7
8
|
var chunkYXN2K77G_js = require('../chunk-YXN2K77G.js');
|
|
8
9
|
require('../chunk-S7KHTUHA.js');
|
|
9
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-UZ3CMNUJ.js');
|
|
10
11
|
var chunkP4YYEM4B_js = require('../chunk-P4YYEM4B.js');
|
|
11
|
-
var chunk5UU3RQRB_js = require('../chunk-5UU3RQRB.js');
|
|
12
12
|
var chunkC7BI5LQ6_js = require('../chunk-C7BI5LQ6.js');
|
|
13
13
|
var react = require('react');
|
|
14
14
|
var outline = require('@heroicons/react/24/outline');
|
|
@@ -83,7 +83,7 @@ function OutputCard({ label, value }) {
|
|
|
83
83
|
function AgentProfileHeader({ agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged }) {
|
|
84
84
|
const modelName = models.find((model) => model.id === selectedModelId)?.name ?? selectedModelId ?? "\u2014";
|
|
85
85
|
const avatarUrl = agent.avatar;
|
|
86
|
-
const frameworkMeta =
|
|
86
|
+
const frameworkMeta = chunkBCE3FQVS_js.getFrameworkMeta(selectedFramework);
|
|
87
87
|
const tierInfo = getEloTier(elo);
|
|
88
88
|
const difficultyConfig = {
|
|
89
89
|
beginner: { color: "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400", labelKey: "agentDrawer.tierBeginner" },
|
|
@@ -359,13 +359,13 @@ function AgentCapabilityCard({ elo, setElo, models, selectedModelId, setSelected
|
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
361
|
function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework, markDirty, connectedProviderTypes }) {
|
|
362
|
-
const frameworkKeys = Object.keys(
|
|
362
|
+
const frameworkKeys = Object.keys(chunkBCE3FQVS_js.FRAMEWORK_META);
|
|
363
363
|
const hasProviderConstraints = connectedProviderTypes.length > 0;
|
|
364
|
-
const compatibleModels =
|
|
364
|
+
const compatibleModels = chunkBCE3FQVS_js.getCompatibleModels(models, selectedFramework);
|
|
365
365
|
const handleFrameworkChange = react.useCallback((newFramework) => {
|
|
366
366
|
setSelectedFramework(newFramework);
|
|
367
|
-
if (!
|
|
368
|
-
const compatible =
|
|
367
|
+
if (!chunkBCE3FQVS_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
|
|
368
|
+
const compatible = chunkBCE3FQVS_js.getCompatibleModels(models, newFramework);
|
|
369
369
|
if (compatible.length > 0) {
|
|
370
370
|
setSelectedModelId(compatible[0].id);
|
|
371
371
|
}
|
|
@@ -376,10 +376,10 @@ function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFra
|
|
|
376
376
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
377
377
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.framework") }),
|
|
378
378
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: frameworkKeys.map((key) => {
|
|
379
|
-
const meta =
|
|
379
|
+
const meta = chunkBCE3FQVS_js.FRAMEWORK_META[key];
|
|
380
380
|
const isSelected = key === selectedFramework;
|
|
381
|
-
const compatCount =
|
|
382
|
-
const isCompatibleWithProviders = !hasProviderConstraints ||
|
|
381
|
+
const compatCount = chunkBCE3FQVS_js.getCompatibleModels(models, key).length;
|
|
382
|
+
const isCompatibleWithProviders = !hasProviderConstraints || chunkBCE3FQVS_js.isFrameworkCompatibleWithProviders(key, connectedProviderTypes);
|
|
383
383
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
384
384
|
"button",
|
|
385
385
|
{
|
|
@@ -411,7 +411,7 @@ function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFra
|
|
|
411
411
|
] }),
|
|
412
412
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2", children: models.map((model) => {
|
|
413
413
|
const isSelected = model.id === selectedModelId;
|
|
414
|
-
const isCompatible =
|
|
414
|
+
const isCompatible = chunkBCE3FQVS_js.isModelCompatibleWithFramework(model.id, selectedFramework);
|
|
415
415
|
const { IconComponent, color, providerLabel } = getModelIcon(model.id);
|
|
416
416
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
417
417
|
"button",
|
|
@@ -437,8 +437,7 @@ function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFra
|
|
|
437
437
|
] })
|
|
438
438
|
] });
|
|
439
439
|
}
|
|
440
|
-
function PromptTab({ agent, temperature, setTemperature, markDirty, t }) {
|
|
441
|
-
const [promptText, setPromptText] = react.useState(agent.systemPrompt ?? "");
|
|
440
|
+
function PromptTab({ agent, temperature, setTemperature, markDirty, t, promptText, setPromptText }) {
|
|
442
441
|
const handleTemperatureChange = react.useCallback((event) => {
|
|
443
442
|
setTemperature(parseFloat(event.target.value));
|
|
444
443
|
markDirty();
|
|
@@ -510,7 +509,7 @@ function PromptTab({ agent, temperature, setTemperature, markDirty, t }) {
|
|
|
510
509
|
] });
|
|
511
510
|
}
|
|
512
511
|
function ResultsTab({ agentId, t }) {
|
|
513
|
-
const nodeResults =
|
|
512
|
+
const nodeResults = chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodeResults);
|
|
514
513
|
const agentResult = react.useMemo(() => {
|
|
515
514
|
return nodeResults[agentId] ?? null;
|
|
516
515
|
}, [nodeResults, agentId]);
|
|
@@ -600,10 +599,10 @@ function ModelsTab({ modelProviders, selectedProviderId, onSelectProvider, model
|
|
|
600
599
|
const providerModels = modelsByProvider.find((p) => p.provider.id === selectedProviderId);
|
|
601
600
|
if (!providerModels || providerModels.models.length === 0) return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.noModelsForProvider") });
|
|
602
601
|
const compatibleModels = providerModels.models.filter(
|
|
603
|
-
(m) =>
|
|
602
|
+
(m) => chunkBCE3FQVS_js.isModelCompatibleWithFramework(m.id, agentFramework)
|
|
604
603
|
);
|
|
605
604
|
const incompatibleModels = providerModels.models.filter(
|
|
606
|
-
(m) => !
|
|
605
|
+
(m) => !chunkBCE3FQVS_js.isModelCompatibleWithFramework(m.id, agentFramework)
|
|
607
606
|
);
|
|
608
607
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
609
608
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.selectModel") }),
|
|
@@ -676,7 +675,7 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
|
676
675
|
] }),
|
|
677
676
|
tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.description }),
|
|
678
677
|
tool.compatibleFrameworks && tool.compatibleFrameworks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap gap-0.5", children: tool.compatibleFrameworks.map((framework) => {
|
|
679
|
-
const meta =
|
|
678
|
+
const meta = chunkBCE3FQVS_js.getFrameworkMeta(framework);
|
|
680
679
|
const isCurrentFw = framework === agentFramework;
|
|
681
680
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[8px] font-medium ${isCurrentFw ? meta.badgeColor : "bg-gray-100 text-gray-500 dark:bg-white/5 dark:text-gray-400"}`, children: [
|
|
682
681
|
/* @__PURE__ */ jsxRuntime.jsx(meta.IconComponent, { className: "h-2.5 w-2.5" }),
|
|
@@ -693,7 +692,7 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
|
693
692
|
event.stopPropagation();
|
|
694
693
|
},
|
|
695
694
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
696
|
-
|
|
695
|
+
chunkTUEYBNWL_js.ToggleSwitch,
|
|
697
696
|
{
|
|
698
697
|
checked: isEnabled,
|
|
699
698
|
onChange: () => onToggle(tool.agentToolId),
|
|
@@ -712,11 +711,149 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
|
712
711
|
})
|
|
713
712
|
] });
|
|
714
713
|
}
|
|
715
|
-
function
|
|
714
|
+
function AdvancedTab({
|
|
715
|
+
displayName,
|
|
716
|
+
setDisplayName,
|
|
717
|
+
description,
|
|
718
|
+
setDescription,
|
|
719
|
+
maxOutputTokens,
|
|
720
|
+
setMaxOutputTokens,
|
|
721
|
+
topP,
|
|
722
|
+
setTopP,
|
|
723
|
+
topK,
|
|
724
|
+
setTopK,
|
|
725
|
+
tags,
|
|
726
|
+
setTags,
|
|
727
|
+
status,
|
|
728
|
+
setStatus,
|
|
729
|
+
avatarUrl,
|
|
730
|
+
setAvatarUrl,
|
|
731
|
+
markDirty,
|
|
732
|
+
t
|
|
733
|
+
}) {
|
|
734
|
+
const wrap = "w-full rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2 text-sm text-gray-800 outline-none transition-colors focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 dark:border-white/10 dark:bg-white/5 dark:text-gray-200";
|
|
735
|
+
const labelCls = "mb-1 block text-xs font-medium text-gray-500 dark:text-gray-400";
|
|
736
|
+
const touch = () => markDirty();
|
|
737
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4", children: [
|
|
738
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
739
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
|
|
740
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.displayName", { _: "Display name" }) }),
|
|
741
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { className: wrap, value: displayName, onChange: (e) => {
|
|
742
|
+
setDisplayName(e.target.value);
|
|
743
|
+
touch();
|
|
744
|
+
} })
|
|
745
|
+
] }),
|
|
746
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
|
|
747
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.status", { _: "Status" }) }),
|
|
748
|
+
/* @__PURE__ */ jsxRuntime.jsxs("select", { className: wrap, value: status, onChange: (e) => {
|
|
749
|
+
setStatus(e.target.value);
|
|
750
|
+
touch();
|
|
751
|
+
}, children: [
|
|
752
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "draft", children: "draft" }),
|
|
753
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "active", children: "active" }),
|
|
754
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "archived", children: "archived" })
|
|
755
|
+
] })
|
|
756
|
+
] })
|
|
757
|
+
] }),
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "block", children: [
|
|
759
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.description", { _: "Description" }) }),
|
|
760
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
761
|
+
"textarea",
|
|
762
|
+
{
|
|
763
|
+
className: wrap,
|
|
764
|
+
rows: 3,
|
|
765
|
+
value: description,
|
|
766
|
+
onChange: (e) => {
|
|
767
|
+
setDescription(e.target.value);
|
|
768
|
+
touch();
|
|
769
|
+
},
|
|
770
|
+
placeholder: t("agentDrawer.descriptionPlaceholder", { _: "What this agent does, which tasks it's good at" })
|
|
771
|
+
}
|
|
772
|
+
)
|
|
773
|
+
] }),
|
|
774
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "block", children: [
|
|
775
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.avatarUrl", { _: "Avatar URL" }) }),
|
|
776
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { className: wrap, value: avatarUrl, onChange: (e) => {
|
|
777
|
+
setAvatarUrl(e.target.value);
|
|
778
|
+
touch();
|
|
779
|
+
}, placeholder: "https://\u2026" })
|
|
780
|
+
] }),
|
|
781
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-3", children: [
|
|
782
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
|
|
783
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.maxOutputTokens", { _: "Max output tokens" }) }),
|
|
784
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
785
|
+
"input",
|
|
786
|
+
{
|
|
787
|
+
type: "number",
|
|
788
|
+
min: 1,
|
|
789
|
+
max: 32768,
|
|
790
|
+
className: wrap,
|
|
791
|
+
value: maxOutputTokens,
|
|
792
|
+
onChange: (e) => {
|
|
793
|
+
setMaxOutputTokens(Number(e.target.value) || 0);
|
|
794
|
+
touch();
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
)
|
|
798
|
+
] }),
|
|
799
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
|
|
800
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.topP", { _: "Top-p" }) }),
|
|
801
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
802
|
+
"input",
|
|
803
|
+
{
|
|
804
|
+
type: "number",
|
|
805
|
+
step: 0.05,
|
|
806
|
+
min: 0,
|
|
807
|
+
max: 1,
|
|
808
|
+
className: wrap,
|
|
809
|
+
value: topP,
|
|
810
|
+
onChange: (e) => {
|
|
811
|
+
setTopP(Number(e.target.value) || 0);
|
|
812
|
+
touch();
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
)
|
|
816
|
+
] }),
|
|
817
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
|
|
818
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.topK", { _: "Top-k" }) }),
|
|
819
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
820
|
+
"input",
|
|
821
|
+
{
|
|
822
|
+
type: "number",
|
|
823
|
+
min: 0,
|
|
824
|
+
max: 500,
|
|
825
|
+
className: wrap,
|
|
826
|
+
value: topK,
|
|
827
|
+
onChange: (e) => {
|
|
828
|
+
setTopK(Number(e.target.value) || 0);
|
|
829
|
+
touch();
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
)
|
|
833
|
+
] })
|
|
834
|
+
] }),
|
|
835
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "block", children: [
|
|
836
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelCls, children: t("agentDrawer.tags", { _: "Tags (comma-separated)" }) }),
|
|
837
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
838
|
+
"input",
|
|
839
|
+
{
|
|
840
|
+
className: wrap,
|
|
841
|
+
value: tags,
|
|
842
|
+
onChange: (e) => {
|
|
843
|
+
setTags(e.target.value);
|
|
844
|
+
touch();
|
|
845
|
+
},
|
|
846
|
+
placeholder: "pricing, research, internal"
|
|
847
|
+
}
|
|
848
|
+
)
|
|
849
|
+
] })
|
|
850
|
+
] });
|
|
851
|
+
}
|
|
852
|
+
function AgentModal({ onSaved, onPersist }) {
|
|
716
853
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
717
|
-
const activeModal =
|
|
718
|
-
const agentData =
|
|
719
|
-
const closeModal =
|
|
854
|
+
const activeModal = chunkBCE3FQVS_js.useModalStore((s) => s.activeModal);
|
|
855
|
+
const agentData = chunkBCE3FQVS_js.useModalStore((s) => s.agentData);
|
|
856
|
+
const closeModal = chunkBCE3FQVS_js.useModalStore((s) => s.closeModal);
|
|
720
857
|
const open = activeModal === "agent";
|
|
721
858
|
const agent = agentData?.agent ?? null;
|
|
722
859
|
const models = agentData?.models ?? [];
|
|
@@ -730,6 +867,16 @@ function AgentModal({ onSaved }) {
|
|
|
730
867
|
const [saved, setSaved] = react.useState(true);
|
|
731
868
|
const [enabledToolIds, setEnabledToolIds] = react.useState(/* @__PURE__ */ new Set());
|
|
732
869
|
const [selectedProviderId, setSelectedProviderId] = react.useState("");
|
|
870
|
+
const [systemPrompt, setSystemPrompt] = react.useState("");
|
|
871
|
+
const [displayName, setDisplayName] = react.useState("");
|
|
872
|
+
const [description, setDescription] = react.useState("");
|
|
873
|
+
const [avatarUrl, setAvatarUrlState] = react.useState("");
|
|
874
|
+
const [maxOutputTokens, setMaxOutputTokens] = react.useState(1024);
|
|
875
|
+
const [topP, setTopP] = react.useState(0.95);
|
|
876
|
+
const [topK, setTopK] = react.useState(40);
|
|
877
|
+
const [tagsText, setTagsText] = react.useState("");
|
|
878
|
+
const [status, setStatus] = react.useState("active");
|
|
879
|
+
const [persisting, setPersisting] = react.useState(false);
|
|
733
880
|
const availableModelProviders = agentData?.modelProviders ?? [];
|
|
734
881
|
const agentId = agent?.agentId ?? agent?.id ?? "";
|
|
735
882
|
react.useEffect(() => {
|
|
@@ -743,6 +890,22 @@ function AgentModal({ onSaved }) {
|
|
|
743
890
|
const agentToolIds = agent.agentToolIds;
|
|
744
891
|
setEnabledToolIds(new Set(agentToolIds ?? availableAgentTools.filter((t2) => t2.enabled).map((t2) => t2.agentToolId)));
|
|
745
892
|
setSelectedProviderId(agent.modelProviderId ?? "");
|
|
893
|
+
const agentRecord = agent;
|
|
894
|
+
setSystemPrompt(
|
|
895
|
+
agentRecord.systemPrompt ?? agentRecord.instruction ?? ""
|
|
896
|
+
);
|
|
897
|
+
setDisplayName(agentRecord.displayName ?? agent.name ?? "");
|
|
898
|
+
setDescription(agentRecord.description ?? "");
|
|
899
|
+
setAvatarUrlState(agentRecord.avatar ?? "");
|
|
900
|
+
const agentMaxOut = agentRecord.maxOutputTokens ?? agent.maxTokens ?? 1024;
|
|
901
|
+
setMaxOutputTokens(Number(agentMaxOut) || 1024);
|
|
902
|
+
setTopP(Number(agentRecord.topP ?? 0.95));
|
|
903
|
+
setTopK(Number(agentRecord.topK ?? 40));
|
|
904
|
+
const existingTags = agentRecord.tags;
|
|
905
|
+
setTagsText(
|
|
906
|
+
Array.isArray(existingTags) ? existingTags.filter((v) => typeof v === "string").join(", ") : ""
|
|
907
|
+
);
|
|
908
|
+
setStatus(agentRecord.status ?? "active");
|
|
746
909
|
}, [agentId]);
|
|
747
910
|
const dirty = !saved;
|
|
748
911
|
const markDirty = react.useCallback(() => setSaved(false), []);
|
|
@@ -763,10 +926,58 @@ function AgentModal({ onSaved }) {
|
|
|
763
926
|
});
|
|
764
927
|
markDirty();
|
|
765
928
|
}, [markDirty]);
|
|
766
|
-
const handleMarkSaved = react.useCallback(() => {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
929
|
+
const handleMarkSaved = react.useCallback(async () => {
|
|
930
|
+
if (!agent) return;
|
|
931
|
+
const payload = {
|
|
932
|
+
agentId: agent.agentId,
|
|
933
|
+
name: agent.name,
|
|
934
|
+
displayName: displayName.trim() || void 0,
|
|
935
|
+
description: description.trim() || void 0,
|
|
936
|
+
avatar: avatarUrl.trim() || void 0,
|
|
937
|
+
modelId: selectedModelId || void 0,
|
|
938
|
+
connectionId: selectedProviderId || void 0,
|
|
939
|
+
framework: selectedFramework,
|
|
940
|
+
systemPrompt,
|
|
941
|
+
temperature,
|
|
942
|
+
maxOutputTokens,
|
|
943
|
+
topP,
|
|
944
|
+
topK,
|
|
945
|
+
elo,
|
|
946
|
+
status: status || void 0,
|
|
947
|
+
enabledToolIds: Array.from(enabledToolIds),
|
|
948
|
+
tags: tagsText.split(",").map((tag) => tag.trim()).filter((tag) => tag.length > 0)
|
|
949
|
+
};
|
|
950
|
+
try {
|
|
951
|
+
setPersisting(true);
|
|
952
|
+
if (onPersist) await onPersist(payload);
|
|
953
|
+
markSaved();
|
|
954
|
+
onSaved?.();
|
|
955
|
+
} catch (error) {
|
|
956
|
+
console.error("[AgentModal] onPersist failed", error);
|
|
957
|
+
} finally {
|
|
958
|
+
setPersisting(false);
|
|
959
|
+
}
|
|
960
|
+
}, [
|
|
961
|
+
agent,
|
|
962
|
+
displayName,
|
|
963
|
+
description,
|
|
964
|
+
avatarUrl,
|
|
965
|
+
selectedModelId,
|
|
966
|
+
selectedProviderId,
|
|
967
|
+
selectedFramework,
|
|
968
|
+
systemPrompt,
|
|
969
|
+
temperature,
|
|
970
|
+
maxOutputTokens,
|
|
971
|
+
topP,
|
|
972
|
+
topK,
|
|
973
|
+
elo,
|
|
974
|
+
status,
|
|
975
|
+
enabledToolIds,
|
|
976
|
+
tagsText,
|
|
977
|
+
markSaved,
|
|
978
|
+
onSaved,
|
|
979
|
+
onPersist
|
|
980
|
+
]);
|
|
770
981
|
if (!agent) return null;
|
|
771
982
|
const sections = [
|
|
772
983
|
{ id: "profile", label: t("agentDrawer.profileSection"), icon: outline.UserCircleIcon, group: t("agentDrawer.agentGroup") },
|
|
@@ -774,24 +985,27 @@ function AgentModal({ onSaved }) {
|
|
|
774
985
|
{ id: "prompt", label: t("agentDrawer.promptSection"), icon: outline.SparklesIcon, group: t("agentDrawer.agentGroup") },
|
|
775
986
|
{ id: "tools", label: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`, icon: outline.CommandLineIcon, group: t("agentDrawer.configGroup") },
|
|
776
987
|
{ id: "models", label: `${t("agentDrawer.modelsTab")}${selectedProviderId ? " \u2713" : ""}`, icon: outline.KeyIcon, group: t("agentDrawer.configGroup") },
|
|
988
|
+
{ id: "advanced", label: t("agentDrawer.advancedTab", { _: "Advanced" }), icon: outline.Cog6ToothIcon, group: t("agentDrawer.configGroup") },
|
|
777
989
|
{ id: "results", label: t("agentDrawer.resultsTab"), icon: outline.PlayCircleIcon, group: t("agentDrawer.executionGroup") }
|
|
778
990
|
];
|
|
779
|
-
const
|
|
991
|
+
const effectiveAvatarUrl = avatarUrl || agent.avatar;
|
|
780
992
|
const sidebarFooter = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
|
|
781
993
|
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", className: "flex-1 text-xs", children: dirty ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-amber-500 dark:text-amber-400", children: t("agentDrawer.unsavedChanges") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-emerald-500 dark:text-emerald-400", children: t("agentDrawer.saved") }) }),
|
|
782
994
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
783
995
|
"button",
|
|
784
996
|
{
|
|
785
997
|
type: "button",
|
|
786
|
-
onClick:
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
998
|
+
onClick: () => {
|
|
999
|
+
void handleMarkSaved();
|
|
1000
|
+
},
|
|
1001
|
+
disabled: !dirty || persisting,
|
|
1002
|
+
className: `rounded-lg px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition-all ${dirty && !persisting ? "bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
|
|
1003
|
+
children: persisting ? "\u2026" : t("agentDrawer.save")
|
|
790
1004
|
}
|
|
791
1005
|
)
|
|
792
1006
|
] });
|
|
793
1007
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
794
|
-
|
|
1008
|
+
chunkTUEYBNWL_js.GlassModal,
|
|
795
1009
|
{
|
|
796
1010
|
open,
|
|
797
1011
|
onClose: handleClose,
|
|
@@ -805,9 +1019,9 @@ function AgentModal({ onSaved }) {
|
|
|
805
1019
|
activeSectionId: activeTab,
|
|
806
1020
|
onSectionChange: (sectionId) => setActiveTab(sectionId),
|
|
807
1021
|
identity: {
|
|
808
|
-
displayName: agent.name,
|
|
809
|
-
profileInitial: agent.name.charAt(0).toUpperCase(),
|
|
810
|
-
avatarUrl,
|
|
1022
|
+
displayName: displayName || agent.name,
|
|
1023
|
+
profileInitial: (displayName || agent.name).charAt(0).toUpperCase(),
|
|
1024
|
+
avatarUrl: effectiveAvatarUrl,
|
|
811
1025
|
role: agent.role
|
|
812
1026
|
},
|
|
813
1027
|
footer: sidebarFooter
|
|
@@ -815,7 +1029,41 @@ function AgentModal({ onSaved }) {
|
|
|
815
1029
|
children: [
|
|
816
1030
|
activeTab === "profile" && /* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
|
|
817
1031
|
activeTab === "framework" && /* @__PURE__ */ jsxRuntime.jsx(ConfigTab, { models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework: (fw) => setSelectedFramework(fw), markDirty, connectedProviderTypes: availableModelProviders.map((p) => p.provider) }),
|
|
818
|
-
activeTab === "prompt" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1032
|
+
activeTab === "prompt" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1033
|
+
PromptTab,
|
|
1034
|
+
{
|
|
1035
|
+
agent,
|
|
1036
|
+
temperature,
|
|
1037
|
+
setTemperature,
|
|
1038
|
+
markDirty,
|
|
1039
|
+
t,
|
|
1040
|
+
promptText: systemPrompt,
|
|
1041
|
+
setPromptText: setSystemPrompt
|
|
1042
|
+
}
|
|
1043
|
+
),
|
|
1044
|
+
activeTab === "advanced" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1045
|
+
AdvancedTab,
|
|
1046
|
+
{
|
|
1047
|
+
displayName,
|
|
1048
|
+
setDisplayName,
|
|
1049
|
+
description,
|
|
1050
|
+
setDescription,
|
|
1051
|
+
maxOutputTokens,
|
|
1052
|
+
setMaxOutputTokens,
|
|
1053
|
+
topP,
|
|
1054
|
+
setTopP,
|
|
1055
|
+
topK,
|
|
1056
|
+
setTopK,
|
|
1057
|
+
tags: tagsText,
|
|
1058
|
+
setTags: setTagsText,
|
|
1059
|
+
status,
|
|
1060
|
+
setStatus,
|
|
1061
|
+
avatarUrl,
|
|
1062
|
+
setAvatarUrl: setAvatarUrlState,
|
|
1063
|
+
markDirty,
|
|
1064
|
+
t
|
|
1065
|
+
}
|
|
1066
|
+
),
|
|
819
1067
|
activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
|
|
820
1068
|
activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
821
1069
|
ModelsTab,
|
|
@@ -943,7 +1191,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
943
1191
|
const markDirty = useSubworkflowStore((s) => s.markDirty);
|
|
944
1192
|
const markSaved = useSubworkflowStore((s) => s.markSaved);
|
|
945
1193
|
const closeModal = useSubworkflowStore((s) => s.closeModal);
|
|
946
|
-
const agentBehind =
|
|
1194
|
+
const agentBehind = chunkBCE3FQVS_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
|
|
947
1195
|
const isCreateMode = !tool?.toolId;
|
|
948
1196
|
const initialGraph = react.useMemo(() => {
|
|
949
1197
|
const config = tool?.config;
|
|
@@ -972,9 +1220,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
972
1220
|
}, [tool, onSaved, name, category, description, timeoutMs, latestGraphRef, markSaved]);
|
|
973
1221
|
if (!tool) return null;
|
|
974
1222
|
const categoryKey = category ?? "external";
|
|
975
|
-
const gradient = tool.color ??
|
|
976
|
-
const categoryPill =
|
|
977
|
-
const IconComponent =
|
|
1223
|
+
const gradient = tool.color ?? chunkBCE3FQVS_js.CATEGORY_COLORS[categoryKey] ?? chunkBCE3FQVS_js.CATEGORY_COLORS.external;
|
|
1224
|
+
const categoryPill = chunkBCE3FQVS_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkBCE3FQVS_js.CATEGORY_PILL_COLORS.external;
|
|
1225
|
+
const IconComponent = chunkBCE3FQVS_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
|
|
978
1226
|
const graph = latestGraphRef.current;
|
|
979
1227
|
const startNode = graph.nodes.find((n) => n.type === "start");
|
|
980
1228
|
const endNode = graph.nodes.find((n) => n.type === "end");
|
|
@@ -1007,7 +1255,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
1007
1255
|
] })
|
|
1008
1256
|
] });
|
|
1009
1257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1010
|
-
|
|
1258
|
+
chunkTUEYBNWL_js.GlassModal,
|
|
1011
1259
|
{
|
|
1012
1260
|
open,
|
|
1013
1261
|
onClose: closeModal,
|
|
@@ -1039,7 +1287,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
1039
1287
|
{
|
|
1040
1288
|
type: "button",
|
|
1041
1289
|
onClick: () => setCategory(cat),
|
|
1042
|
-
className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${
|
|
1290
|
+
className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkBCE3FQVS_js.CATEGORY_PILL_COLORS[cat] ?? chunkBCE3FQVS_js.CATEGORY_PILL_COLORS.external} ring-1 ring-current/20` : "bg-white/30 text-gray-500 hover:bg-white/50 dark:bg-white/5 dark:text-gray-400"}`,
|
|
1043
1291
|
children: cat
|
|
1044
1292
|
},
|
|
1045
1293
|
cat
|
|
@@ -1126,7 +1374,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
1126
1374
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto" })
|
|
1127
1375
|
] }),
|
|
1128
1376
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1129
|
-
|
|
1377
|
+
chunkBCE3FQVS_js.WorkflowCanvas,
|
|
1130
1378
|
{
|
|
1131
1379
|
initialGraph,
|
|
1132
1380
|
agents: [],
|
|
@@ -1142,9 +1390,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
1142
1390
|
}
|
|
1143
1391
|
function PipelineSettingsModal({ onSave }) {
|
|
1144
1392
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
1145
|
-
const activeModal =
|
|
1146
|
-
const data =
|
|
1147
|
-
const closeModal =
|
|
1393
|
+
const activeModal = chunkBCE3FQVS_js.useModalStore((s) => s.activeModal);
|
|
1394
|
+
const data = chunkBCE3FQVS_js.useModalStore((s) => s.pipelineSettingsData);
|
|
1395
|
+
const closeModal = chunkBCE3FQVS_js.useModalStore((s) => s.closeModal);
|
|
1148
1396
|
const open = activeModal === "pipeline-settings";
|
|
1149
1397
|
const [nameValue, setNameValue] = react.useState("");
|
|
1150
1398
|
const [descriptionValue, setDescriptionValue] = react.useState("");
|
|
@@ -1179,7 +1427,7 @@ function PipelineSettingsModal({ onSave }) {
|
|
|
1179
1427
|
}
|
|
1180
1428
|
),
|
|
1181
1429
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1182
|
-
|
|
1430
|
+
chunkTUEYBNWL_js.Button,
|
|
1183
1431
|
{
|
|
1184
1432
|
type: "submit",
|
|
1185
1433
|
form: "pipeline-settings-form",
|
|
@@ -1194,7 +1442,7 @@ function PipelineSettingsModal({ onSave }) {
|
|
|
1194
1442
|
)
|
|
1195
1443
|
] });
|
|
1196
1444
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1197
|
-
|
|
1445
|
+
chunkTUEYBNWL_js.GlassModal,
|
|
1198
1446
|
{
|
|
1199
1447
|
open,
|
|
1200
1448
|
onClose: closeModal,
|
|
@@ -1208,7 +1456,7 @@ function PipelineSettingsModal({ onSave }) {
|
|
|
1208
1456
|
onSubmit: handleSubmit,
|
|
1209
1457
|
children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: "pipeline-settings-form", onSubmit: handleSubmit, className: "space-y-6", children: [
|
|
1210
1458
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1211
|
-
|
|
1459
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1212
1460
|
{
|
|
1213
1461
|
label: t("pipelineName"),
|
|
1214
1462
|
value: nameValue,
|
|
@@ -1218,7 +1466,7 @@ function PipelineSettingsModal({ onSave }) {
|
|
|
1218
1466
|
}
|
|
1219
1467
|
),
|
|
1220
1468
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1221
|
-
|
|
1469
|
+
chunkTUEYBNWL_js.FormTextarea,
|
|
1222
1470
|
{
|
|
1223
1471
|
label: t("pipelineDescription"),
|
|
1224
1472
|
value: descriptionValue,
|
|
@@ -1231,6 +1479,655 @@ function PipelineSettingsModal({ onSave }) {
|
|
|
1231
1479
|
}
|
|
1232
1480
|
);
|
|
1233
1481
|
}
|
|
1482
|
+
|
|
1483
|
+
// src/astrlabe/components/rules/types.ts
|
|
1484
|
+
var RULE_STATUS_OPTIONS = ["draft", "active", "archived"];
|
|
1485
|
+
var TIMEZONE_OPTIONS = [
|
|
1486
|
+
"UTC",
|
|
1487
|
+
"America/Sao_Paulo",
|
|
1488
|
+
"America/New_York",
|
|
1489
|
+
"America/Los_Angeles",
|
|
1490
|
+
"Europe/London",
|
|
1491
|
+
"Europe/Lisbon"
|
|
1492
|
+
];
|
|
1493
|
+
var OPERATOR_OPTIONS = [
|
|
1494
|
+
{ value: "truthy", label: "Field is set (truthy)" },
|
|
1495
|
+
{ value: "eq", label: "Equals" },
|
|
1496
|
+
{ value: "neq", label: "Not equal to" },
|
|
1497
|
+
{ value: "gt", label: "Greater than" },
|
|
1498
|
+
{ value: "gte", label: "Greater than or equal" },
|
|
1499
|
+
{ value: "lt", label: "Less than" },
|
|
1500
|
+
{ value: "lte", label: "Less than or equal" },
|
|
1501
|
+
{ value: "contains", label: "Contains (string)" },
|
|
1502
|
+
{ value: "threshold", label: "Threshold" },
|
|
1503
|
+
{ value: "regex_match", label: "Regex match" },
|
|
1504
|
+
{ value: "time_window", label: "Time window" },
|
|
1505
|
+
{ value: "boolean_expression", label: "And/Or group" }
|
|
1506
|
+
];
|
|
1507
|
+
var SIMPLE_COMPARISON_OPERATORS = [
|
|
1508
|
+
"truthy",
|
|
1509
|
+
"eq",
|
|
1510
|
+
"neq",
|
|
1511
|
+
"gt",
|
|
1512
|
+
"gte",
|
|
1513
|
+
"lt",
|
|
1514
|
+
"lte",
|
|
1515
|
+
"contains"
|
|
1516
|
+
];
|
|
1517
|
+
function RuleConditionBuilder({ value, onChange, depth = 0 }) {
|
|
1518
|
+
const handleOperatorChange = (op) => {
|
|
1519
|
+
const base = { operator: op };
|
|
1520
|
+
switch (op) {
|
|
1521
|
+
case "truthy":
|
|
1522
|
+
onChange({ ...base, field: value.field ?? "" });
|
|
1523
|
+
break;
|
|
1524
|
+
case "eq":
|
|
1525
|
+
case "neq":
|
|
1526
|
+
case "gt":
|
|
1527
|
+
case "gte":
|
|
1528
|
+
case "lt":
|
|
1529
|
+
case "lte":
|
|
1530
|
+
case "contains":
|
|
1531
|
+
onChange({ ...base, field: value.field ?? "", value: value.value ?? "" });
|
|
1532
|
+
break;
|
|
1533
|
+
case "threshold":
|
|
1534
|
+
onChange({
|
|
1535
|
+
...base,
|
|
1536
|
+
field: value.field ?? "",
|
|
1537
|
+
comparison: value.comparison ?? "gte",
|
|
1538
|
+
value: typeof value.value === "number" ? value.value : 0
|
|
1539
|
+
});
|
|
1540
|
+
break;
|
|
1541
|
+
case "regex_match":
|
|
1542
|
+
onChange({ ...base, field: value.field ?? "", pattern: value.pattern ?? "" });
|
|
1543
|
+
break;
|
|
1544
|
+
case "time_window":
|
|
1545
|
+
onChange({
|
|
1546
|
+
...base,
|
|
1547
|
+
field: value.field ?? "",
|
|
1548
|
+
timezone: value.timezone ?? "UTC",
|
|
1549
|
+
windows: value.windows && value.windows.length > 0 ? value.windows : [{ startHour: 6, endHour: 9 }]
|
|
1550
|
+
});
|
|
1551
|
+
break;
|
|
1552
|
+
case "boolean_expression":
|
|
1553
|
+
onChange({
|
|
1554
|
+
...base,
|
|
1555
|
+
combinator: value.combinator ?? "and",
|
|
1556
|
+
operands: value.operands && value.operands.length > 0 ? value.operands : [{ operator: "gt", field: "", value: 0 }, { operator: "gt", field: "", value: 0 }]
|
|
1557
|
+
});
|
|
1558
|
+
break;
|
|
1559
|
+
}
|
|
1560
|
+
};
|
|
1561
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
1562
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1563
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
1564
|
+
{
|
|
1565
|
+
label: "Operator",
|
|
1566
|
+
value: value.operator,
|
|
1567
|
+
options: OPERATOR_OPTIONS,
|
|
1568
|
+
onValueChange: (v) => handleOperatorChange(v)
|
|
1569
|
+
}
|
|
1570
|
+
),
|
|
1571
|
+
SIMPLE_COMPARISON_OPERATORS.includes(value.operator) && /* @__PURE__ */ jsxRuntime.jsx(SimpleEditor, { value, onChange }),
|
|
1572
|
+
value.operator === "threshold" && /* @__PURE__ */ jsxRuntime.jsx(ThresholdEditor, { value, onChange }),
|
|
1573
|
+
value.operator === "regex_match" && /* @__PURE__ */ jsxRuntime.jsx(RegexEditor, { value, onChange }),
|
|
1574
|
+
value.operator === "time_window" && /* @__PURE__ */ jsxRuntime.jsx(TimeWindowEditor, { value, onChange }),
|
|
1575
|
+
value.operator === "boolean_expression" && depth < 1 && /* @__PURE__ */ jsxRuntime.jsx(BooleanGroupEditor, { value, onChange, depth: depth + 1 }),
|
|
1576
|
+
value.operator === "boolean_expression" && depth >= 1 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs italic text-slate-500", children: "Nested boolean groups are supported by the engine but not in this builder \u2014 edit the JSON directly for deeper trees." })
|
|
1577
|
+
] });
|
|
1578
|
+
}
|
|
1579
|
+
function SimpleEditor({
|
|
1580
|
+
value,
|
|
1581
|
+
onChange
|
|
1582
|
+
}) {
|
|
1583
|
+
const isTruthy = value.operator === "truthy";
|
|
1584
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
1585
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1586
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1587
|
+
{
|
|
1588
|
+
label: "Field",
|
|
1589
|
+
hint: "Dotted reference into the variable pool \u2014 e.g. `parse-pricing.margin`, `inputs.fuelType`",
|
|
1590
|
+
value: value.field ?? "",
|
|
1591
|
+
onValueChange: (field) => onChange({ ...value, field }),
|
|
1592
|
+
placeholder: "node.path"
|
|
1593
|
+
}
|
|
1594
|
+
),
|
|
1595
|
+
!isTruthy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1596
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1597
|
+
{
|
|
1598
|
+
label: "Value",
|
|
1599
|
+
hint: "Literal. Numeric operators coerce via `as f64`.",
|
|
1600
|
+
value: value.value === null || value.value === void 0 ? "" : String(value.value),
|
|
1601
|
+
onValueChange: (raw) => onChange({ ...value, value: coerceScalar(raw) })
|
|
1602
|
+
}
|
|
1603
|
+
)
|
|
1604
|
+
] });
|
|
1605
|
+
}
|
|
1606
|
+
function ThresholdEditor({
|
|
1607
|
+
value,
|
|
1608
|
+
onChange
|
|
1609
|
+
}) {
|
|
1610
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-3", children: [
|
|
1611
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1612
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1613
|
+
{
|
|
1614
|
+
label: "Field",
|
|
1615
|
+
value: value.field ?? "",
|
|
1616
|
+
onValueChange: (field) => onChange({ ...value, field }),
|
|
1617
|
+
placeholder: "parse-pricing.margin"
|
|
1618
|
+
}
|
|
1619
|
+
),
|
|
1620
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1621
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
1622
|
+
{
|
|
1623
|
+
label: "Direction",
|
|
1624
|
+
value: value.comparison ?? "gte",
|
|
1625
|
+
options: [
|
|
1626
|
+
{ value: "gt", label: "Greater than (>)" },
|
|
1627
|
+
{ value: "gte", label: "At least (\u2265)" },
|
|
1628
|
+
{ value: "lt", label: "Less than (<)" },
|
|
1629
|
+
{ value: "lte", label: "At most (\u2264)" }
|
|
1630
|
+
],
|
|
1631
|
+
onValueChange: (comparison) => onChange({ ...value, comparison })
|
|
1632
|
+
}
|
|
1633
|
+
),
|
|
1634
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1635
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1636
|
+
{
|
|
1637
|
+
label: "Threshold",
|
|
1638
|
+
type: "number",
|
|
1639
|
+
value: value.value === null || value.value === void 0 ? "" : String(value.value),
|
|
1640
|
+
onValueChange: (raw) => onChange({ ...value, value: Number(raw) }),
|
|
1641
|
+
placeholder: "0.08"
|
|
1642
|
+
}
|
|
1643
|
+
)
|
|
1644
|
+
] });
|
|
1645
|
+
}
|
|
1646
|
+
function RegexEditor({
|
|
1647
|
+
value,
|
|
1648
|
+
onChange
|
|
1649
|
+
}) {
|
|
1650
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
1651
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1652
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1653
|
+
{
|
|
1654
|
+
label: "Field",
|
|
1655
|
+
value: value.field ?? "",
|
|
1656
|
+
onValueChange: (field) => onChange({ ...value, field }),
|
|
1657
|
+
placeholder: "agent.text"
|
|
1658
|
+
}
|
|
1659
|
+
),
|
|
1660
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1661
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1662
|
+
{
|
|
1663
|
+
label: "Pattern",
|
|
1664
|
+
hint: "Rust regex syntax \u2014 `(?i)` etc. supported.",
|
|
1665
|
+
value: value.pattern ?? "",
|
|
1666
|
+
onValueChange: (pattern) => onChange({ ...value, pattern }),
|
|
1667
|
+
placeholder: "diesel-s10"
|
|
1668
|
+
}
|
|
1669
|
+
)
|
|
1670
|
+
] });
|
|
1671
|
+
}
|
|
1672
|
+
function TimeWindowEditor({
|
|
1673
|
+
value,
|
|
1674
|
+
onChange
|
|
1675
|
+
}) {
|
|
1676
|
+
const windows = value.windows ?? [];
|
|
1677
|
+
const update = (index, patch) => {
|
|
1678
|
+
const next = windows.map((win, i) => i === index ? { ...win, ...patch } : win);
|
|
1679
|
+
onChange({ ...value, windows: next });
|
|
1680
|
+
};
|
|
1681
|
+
const remove = (index) => {
|
|
1682
|
+
const next = windows.filter((_, i) => i !== index);
|
|
1683
|
+
onChange({ ...value, windows: next });
|
|
1684
|
+
};
|
|
1685
|
+
const add = () => onChange({ ...value, windows: [...windows, { startHour: 8, endHour: 17 }] });
|
|
1686
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
1687
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
1688
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1689
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
1690
|
+
{
|
|
1691
|
+
label: "Timezone",
|
|
1692
|
+
value: value.timezone ?? "UTC",
|
|
1693
|
+
options: TIMEZONE_OPTIONS.map((tz) => ({ value: tz, label: tz })),
|
|
1694
|
+
onValueChange: (timezone) => onChange({ ...value, timezone })
|
|
1695
|
+
}
|
|
1696
|
+
),
|
|
1697
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1698
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1699
|
+
{
|
|
1700
|
+
label: "Timestamp field (optional)",
|
|
1701
|
+
hint: "Pulls a timestamp from the pool. Leave blank to use the run's wall-clock.",
|
|
1702
|
+
value: value.field ?? "",
|
|
1703
|
+
onValueChange: (field) => onChange({ ...value, field }),
|
|
1704
|
+
placeholder: "clock.ts"
|
|
1705
|
+
}
|
|
1706
|
+
)
|
|
1707
|
+
] }),
|
|
1708
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1709
|
+
windows.map((win, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto] items-end gap-2 rounded-lg border border-slate-200 p-2 dark:border-slate-700", children: [
|
|
1710
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1711
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1712
|
+
{
|
|
1713
|
+
label: `Start (hour)`,
|
|
1714
|
+
type: "number",
|
|
1715
|
+
min: 0,
|
|
1716
|
+
max: 23,
|
|
1717
|
+
value: String(win.startHour),
|
|
1718
|
+
onValueChange: (raw) => update(index, { startHour: clampHour(raw) })
|
|
1719
|
+
}
|
|
1720
|
+
),
|
|
1721
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1722
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1723
|
+
{
|
|
1724
|
+
label: `End (hour)`,
|
|
1725
|
+
type: "number",
|
|
1726
|
+
min: 0,
|
|
1727
|
+
max: 24,
|
|
1728
|
+
value: String(win.endHour),
|
|
1729
|
+
onValueChange: (raw) => update(index, { endHour: clampHour(raw, 24) })
|
|
1730
|
+
}
|
|
1731
|
+
),
|
|
1732
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
|
|
1733
|
+
] }, index)),
|
|
1734
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add window" })
|
|
1735
|
+
] })
|
|
1736
|
+
] });
|
|
1737
|
+
}
|
|
1738
|
+
function BooleanGroupEditor({
|
|
1739
|
+
value,
|
|
1740
|
+
onChange,
|
|
1741
|
+
depth
|
|
1742
|
+
}) {
|
|
1743
|
+
const operands = value.operands ?? [];
|
|
1744
|
+
const update = (index, next) => {
|
|
1745
|
+
const arr = operands.map((op, i) => i === index ? next : op);
|
|
1746
|
+
onChange({ ...value, operands: arr });
|
|
1747
|
+
};
|
|
1748
|
+
const remove = (index) => {
|
|
1749
|
+
onChange({ ...value, operands: operands.filter((_, i) => i !== index) });
|
|
1750
|
+
};
|
|
1751
|
+
const add = () => onChange({
|
|
1752
|
+
...value,
|
|
1753
|
+
operands: [...operands, { operator: "gt", field: "", value: 0 }]
|
|
1754
|
+
});
|
|
1755
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
1756
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1757
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
1758
|
+
{
|
|
1759
|
+
label: "Combinator",
|
|
1760
|
+
value: value.combinator ?? "and",
|
|
1761
|
+
options: [{ value: "and", label: "All of (AND)" }, { value: "or", label: "Any of (OR)" }],
|
|
1762
|
+
onValueChange: (combinator) => onChange({ ...value, combinator })
|
|
1763
|
+
}
|
|
1764
|
+
),
|
|
1765
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1766
|
+
operands.map((child, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative rounded-lg border border-dashed border-slate-300 p-2 dark:border-slate-700", children: [
|
|
1767
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1768
|
+
RuleConditionBuilder,
|
|
1769
|
+
{
|
|
1770
|
+
value: child,
|
|
1771
|
+
onChange: (next) => update(index, next),
|
|
1772
|
+
depth
|
|
1773
|
+
}
|
|
1774
|
+
),
|
|
1775
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-right", children: /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove operand" }) })
|
|
1776
|
+
] }, index)),
|
|
1777
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add operand" })
|
|
1778
|
+
] })
|
|
1779
|
+
] });
|
|
1780
|
+
}
|
|
1781
|
+
function coerceScalar(raw) {
|
|
1782
|
+
const trimmed = raw.trim();
|
|
1783
|
+
if (trimmed === "true") return true;
|
|
1784
|
+
if (trimmed === "false") return false;
|
|
1785
|
+
if (trimmed !== "" && !Number.isNaN(Number(trimmed))) return Number(trimmed);
|
|
1786
|
+
return raw;
|
|
1787
|
+
}
|
|
1788
|
+
function clampHour(raw, max = 23) {
|
|
1789
|
+
const n = Number(raw);
|
|
1790
|
+
if (!Number.isFinite(n)) return 0;
|
|
1791
|
+
return Math.max(0, Math.min(max, Math.trunc(n)));
|
|
1792
|
+
}
|
|
1793
|
+
function defaultRuleCondition() {
|
|
1794
|
+
return { operator: "truthy", field: "" };
|
|
1795
|
+
}
|
|
1796
|
+
var ACTION_TYPE_OPTIONS = [
|
|
1797
|
+
{ value: "adjust_price", label: "Adjust price (multiplier)" },
|
|
1798
|
+
{ value: "enforce_min_margin", label: "Enforce minimum margin" },
|
|
1799
|
+
{ value: "realign_to_competitor", label: "Realign to competitor" },
|
|
1800
|
+
{ value: "request_manager_approval", label: "Request manager approval" },
|
|
1801
|
+
{ value: "round_to", label: "Round to step" },
|
|
1802
|
+
{ value: "alert", label: "Emit alert" },
|
|
1803
|
+
{ value: "custom", label: "Custom action" }
|
|
1804
|
+
];
|
|
1805
|
+
function RuleActionBuilder({ value, onChange }) {
|
|
1806
|
+
const type = value.type || "adjust_price";
|
|
1807
|
+
const params = value.params ?? {};
|
|
1808
|
+
const setParam = (key, newValue) => {
|
|
1809
|
+
onChange({ ...value, type, params: { ...params, [key]: newValue } });
|
|
1810
|
+
};
|
|
1811
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
1812
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1813
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
1814
|
+
{
|
|
1815
|
+
label: "Action type",
|
|
1816
|
+
value: type,
|
|
1817
|
+
options: ACTION_TYPE_OPTIONS,
|
|
1818
|
+
onValueChange: (t) => onChange({ type: t, params: {} })
|
|
1819
|
+
}
|
|
1820
|
+
),
|
|
1821
|
+
type === "adjust_price" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
1822
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1823
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1824
|
+
{
|
|
1825
|
+
label: "Multiplier",
|
|
1826
|
+
type: "number",
|
|
1827
|
+
step: 0.01,
|
|
1828
|
+
value: numberParam(params.multiplier, 1),
|
|
1829
|
+
onValueChange: (raw) => setParam("multiplier", Number(raw))
|
|
1830
|
+
}
|
|
1831
|
+
),
|
|
1832
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1833
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1834
|
+
{
|
|
1835
|
+
label: "Reason code",
|
|
1836
|
+
value: stringParam(params.reason),
|
|
1837
|
+
onValueChange: (raw) => setParam("reason", raw),
|
|
1838
|
+
placeholder: "peak_demand_window"
|
|
1839
|
+
}
|
|
1840
|
+
)
|
|
1841
|
+
] }),
|
|
1842
|
+
type === "enforce_min_margin" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1843
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1844
|
+
{
|
|
1845
|
+
label: "Floor (fraction, e.g. 0.08)",
|
|
1846
|
+
type: "number",
|
|
1847
|
+
step: 0.01,
|
|
1848
|
+
value: numberParam(params.floor, 0.08),
|
|
1849
|
+
onValueChange: (raw) => setParam("floor", Number(raw))
|
|
1850
|
+
}
|
|
1851
|
+
),
|
|
1852
|
+
type === "realign_to_competitor" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1853
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1854
|
+
{
|
|
1855
|
+
label: "Tolerance (fraction)",
|
|
1856
|
+
type: "number",
|
|
1857
|
+
step: 0.01,
|
|
1858
|
+
value: numberParam(params.tolerance, 0.03),
|
|
1859
|
+
onValueChange: (raw) => setParam("tolerance", Number(raw))
|
|
1860
|
+
}
|
|
1861
|
+
),
|
|
1862
|
+
type === "request_manager_approval" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1863
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1864
|
+
{
|
|
1865
|
+
label: "Approval limit (fraction)",
|
|
1866
|
+
type: "number",
|
|
1867
|
+
step: 0.01,
|
|
1868
|
+
value: numberParam(params.limit, 0.05),
|
|
1869
|
+
onValueChange: (raw) => setParam("limit", Number(raw))
|
|
1870
|
+
}
|
|
1871
|
+
),
|
|
1872
|
+
type === "round_to" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1873
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1874
|
+
{
|
|
1875
|
+
label: "Step (e.g. 0.009)",
|
|
1876
|
+
type: "number",
|
|
1877
|
+
step: 1e-3,
|
|
1878
|
+
value: numberParam(params.step, 9e-3),
|
|
1879
|
+
onValueChange: (raw) => setParam("step", Number(raw))
|
|
1880
|
+
}
|
|
1881
|
+
),
|
|
1882
|
+
type === "alert" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
1883
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1884
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1885
|
+
{
|
|
1886
|
+
label: "Channel",
|
|
1887
|
+
value: stringParam(params.channel),
|
|
1888
|
+
onValueChange: (raw) => setParam("channel", raw),
|
|
1889
|
+
placeholder: "slack"
|
|
1890
|
+
}
|
|
1891
|
+
),
|
|
1892
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1893
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1894
|
+
{
|
|
1895
|
+
label: "Severity",
|
|
1896
|
+
value: stringParam(params.severity),
|
|
1897
|
+
onValueChange: (raw) => setParam("severity", raw),
|
|
1898
|
+
placeholder: "warning"
|
|
1899
|
+
}
|
|
1900
|
+
)
|
|
1901
|
+
] }),
|
|
1902
|
+
type === "custom" && /* @__PURE__ */ jsxRuntime.jsx(CustomParamsEditor, { params, onChange: (p) => onChange({ ...value, type, params: p }) })
|
|
1903
|
+
] });
|
|
1904
|
+
}
|
|
1905
|
+
function CustomParamsEditor({
|
|
1906
|
+
params,
|
|
1907
|
+
onChange
|
|
1908
|
+
}) {
|
|
1909
|
+
const entries = Object.entries(params);
|
|
1910
|
+
const update = (index, key, raw) => {
|
|
1911
|
+
const next = {};
|
|
1912
|
+
entries.forEach(([k, v], i) => {
|
|
1913
|
+
if (i === index) next[key] = coerce(raw);
|
|
1914
|
+
else next[k] = v;
|
|
1915
|
+
});
|
|
1916
|
+
onChange(next);
|
|
1917
|
+
};
|
|
1918
|
+
const remove = (index) => {
|
|
1919
|
+
const next = {};
|
|
1920
|
+
entries.forEach(([k, v], i) => {
|
|
1921
|
+
if (i !== index) next[k] = v;
|
|
1922
|
+
});
|
|
1923
|
+
onChange(next);
|
|
1924
|
+
};
|
|
1925
|
+
const add = () => {
|
|
1926
|
+
onChange({ ...params, [""]: "" });
|
|
1927
|
+
};
|
|
1928
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1929
|
+
entries.map(([key, value], index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto] items-end gap-2", children: [
|
|
1930
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1931
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1932
|
+
{
|
|
1933
|
+
label: "Key",
|
|
1934
|
+
value: key,
|
|
1935
|
+
onValueChange: (raw) => update(index, raw, String(value ?? ""))
|
|
1936
|
+
}
|
|
1937
|
+
),
|
|
1938
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1939
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1940
|
+
{
|
|
1941
|
+
label: "Value",
|
|
1942
|
+
value: String(value ?? ""),
|
|
1943
|
+
onValueChange: (raw) => update(index, key, raw)
|
|
1944
|
+
}
|
|
1945
|
+
),
|
|
1946
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", plain: true, onClick: () => remove(index), children: "Remove" })
|
|
1947
|
+
] }, index)),
|
|
1948
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", outline: true, onClick: add, children: "+ Add param" })
|
|
1949
|
+
] });
|
|
1950
|
+
}
|
|
1951
|
+
function numberParam(value, fallback) {
|
|
1952
|
+
if (typeof value === "number" && Number.isFinite(value)) return String(value);
|
|
1953
|
+
return String(fallback);
|
|
1954
|
+
}
|
|
1955
|
+
function stringParam(value) {
|
|
1956
|
+
if (typeof value === "string") return value;
|
|
1957
|
+
if (value === null || value === void 0) return "";
|
|
1958
|
+
return String(value);
|
|
1959
|
+
}
|
|
1960
|
+
function coerce(raw) {
|
|
1961
|
+
const trimmed = raw.trim();
|
|
1962
|
+
if (trimmed === "true") return true;
|
|
1963
|
+
if (trimmed === "false") return false;
|
|
1964
|
+
if (trimmed !== "" && !Number.isNaN(Number(trimmed))) return Number(trimmed);
|
|
1965
|
+
return raw;
|
|
1966
|
+
}
|
|
1967
|
+
function defaultRuleAction() {
|
|
1968
|
+
return { type: "adjust_price", params: { multiplier: 1, reason: "" } };
|
|
1969
|
+
}
|
|
1970
|
+
function RuleForm({ value, onChange }) {
|
|
1971
|
+
const [showAdvanced, setShowAdvanced] = react.useState(
|
|
1972
|
+
Boolean(
|
|
1973
|
+
value.validFrom || value.validUntil || value.tags && value.tags.length > 0 || value.status
|
|
1974
|
+
)
|
|
1975
|
+
);
|
|
1976
|
+
const update = (key, v) => onChange({ ...value, [key]: v });
|
|
1977
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
1978
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.FormGrid, { children: [
|
|
1979
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1980
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1981
|
+
{
|
|
1982
|
+
label: "Name",
|
|
1983
|
+
required: true,
|
|
1984
|
+
value: value.name,
|
|
1985
|
+
onValueChange: (v) => update("name", v)
|
|
1986
|
+
}
|
|
1987
|
+
),
|
|
1988
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1989
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1990
|
+
{
|
|
1991
|
+
label: "Priority",
|
|
1992
|
+
type: "number",
|
|
1993
|
+
min: 0,
|
|
1994
|
+
value: String(value.priority),
|
|
1995
|
+
onValueChange: (v) => update("priority", Number(v) || 0)
|
|
1996
|
+
}
|
|
1997
|
+
),
|
|
1998
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1999
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
2000
|
+
{
|
|
2001
|
+
label: "Enabled",
|
|
2002
|
+
value: value.enabled ? "true" : "false",
|
|
2003
|
+
options: [
|
|
2004
|
+
{ value: "true", label: "Enabled" },
|
|
2005
|
+
{ value: "false", label: "Disabled" }
|
|
2006
|
+
],
|
|
2007
|
+
onValueChange: (v) => update("enabled", v === "true")
|
|
2008
|
+
}
|
|
2009
|
+
),
|
|
2010
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2011
|
+
chunkTUEYBNWL_js.FormTextarea,
|
|
2012
|
+
{
|
|
2013
|
+
label: "Description",
|
|
2014
|
+
rows: 2,
|
|
2015
|
+
value: value.description ?? "",
|
|
2016
|
+
onValueChange: (v) => update("description", v)
|
|
2017
|
+
}
|
|
2018
|
+
)
|
|
2019
|
+
] }),
|
|
2020
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
2021
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
2022
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Condition" }),
|
|
2023
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Badge, { color: "indigo", children: value.condition.operator })
|
|
2024
|
+
] }),
|
|
2025
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2026
|
+
RuleConditionBuilder,
|
|
2027
|
+
{
|
|
2028
|
+
value: value.condition,
|
|
2029
|
+
onChange: (condition) => update("condition", condition)
|
|
2030
|
+
}
|
|
2031
|
+
)
|
|
2032
|
+
] }),
|
|
2033
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
2034
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
2035
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Action on match" }),
|
|
2036
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Badge, { color: "fuchsia", children: value.action.type })
|
|
2037
|
+
] }),
|
|
2038
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2039
|
+
RuleActionBuilder,
|
|
2040
|
+
{
|
|
2041
|
+
value: value.action,
|
|
2042
|
+
onChange: (action) => update("action", action)
|
|
2043
|
+
}
|
|
2044
|
+
)
|
|
2045
|
+
] }),
|
|
2046
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
2047
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2048
|
+
"button",
|
|
2049
|
+
{
|
|
2050
|
+
type: "button",
|
|
2051
|
+
onClick: () => setShowAdvanced((s) => !s),
|
|
2052
|
+
className: "text-xs font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",
|
|
2053
|
+
children: showAdvanced ? "\u2212 Hide schedule & tagging" : "+ Schedule, tagging, lifecycle"
|
|
2054
|
+
}
|
|
2055
|
+
),
|
|
2056
|
+
showAdvanced && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
2057
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2058
|
+
chunkTUEYBNWL_js.FormInput,
|
|
2059
|
+
{
|
|
2060
|
+
label: "Valid from (ISO 8601)",
|
|
2061
|
+
type: "datetime-local",
|
|
2062
|
+
value: toDatetimeLocal(value.validFrom),
|
|
2063
|
+
onValueChange: (v) => update("validFrom", fromDatetimeLocal(v))
|
|
2064
|
+
}
|
|
2065
|
+
),
|
|
2066
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2067
|
+
chunkTUEYBNWL_js.FormInput,
|
|
2068
|
+
{
|
|
2069
|
+
label: "Valid until (ISO 8601)",
|
|
2070
|
+
type: "datetime-local",
|
|
2071
|
+
value: toDatetimeLocal(value.validUntil),
|
|
2072
|
+
onValueChange: (v) => update("validUntil", fromDatetimeLocal(v))
|
|
2073
|
+
}
|
|
2074
|
+
),
|
|
2075
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2076
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
2077
|
+
{
|
|
2078
|
+
label: "Status",
|
|
2079
|
+
value: value.status ?? "active",
|
|
2080
|
+
options: RULE_STATUS_OPTIONS.map((s) => ({ value: s, label: s })),
|
|
2081
|
+
onValueChange: (v) => update("status", v)
|
|
2082
|
+
}
|
|
2083
|
+
),
|
|
2084
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2085
|
+
chunkTUEYBNWL_js.FormInput,
|
|
2086
|
+
{
|
|
2087
|
+
label: "Tags (comma-separated)",
|
|
2088
|
+
value: (value.tags ?? []).join(", "),
|
|
2089
|
+
onValueChange: (v) => update("tags", parseTags(v)),
|
|
2090
|
+
placeholder: "pricing, peak-hours"
|
|
2091
|
+
}
|
|
2092
|
+
)
|
|
2093
|
+
] })
|
|
2094
|
+
] })
|
|
2095
|
+
] });
|
|
2096
|
+
}
|
|
2097
|
+
function defaultRuleForm() {
|
|
2098
|
+
return {
|
|
2099
|
+
name: "",
|
|
2100
|
+
description: "",
|
|
2101
|
+
enabled: true,
|
|
2102
|
+
priority: 0,
|
|
2103
|
+
status: "active",
|
|
2104
|
+
validFrom: null,
|
|
2105
|
+
validUntil: null,
|
|
2106
|
+
tags: [],
|
|
2107
|
+
condition: defaultRuleCondition(),
|
|
2108
|
+
action: defaultRuleAction()
|
|
2109
|
+
};
|
|
2110
|
+
}
|
|
2111
|
+
function parseTags(raw) {
|
|
2112
|
+
return raw.split(",").map((tag) => tag.trim()).filter((tag) => tag.length > 0);
|
|
2113
|
+
}
|
|
2114
|
+
function toDatetimeLocal(iso) {
|
|
2115
|
+
if (!iso) return "";
|
|
2116
|
+
try {
|
|
2117
|
+
const d = new Date(iso);
|
|
2118
|
+
if (Number.isNaN(d.getTime())) return "";
|
|
2119
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
2120
|
+
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
2121
|
+
} catch {
|
|
2122
|
+
return "";
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
function fromDatetimeLocal(raw) {
|
|
2126
|
+
if (!raw) return null;
|
|
2127
|
+
const d = new Date(raw);
|
|
2128
|
+
if (Number.isNaN(d.getTime())) return null;
|
|
2129
|
+
return d.toISOString();
|
|
2130
|
+
}
|
|
1234
2131
|
var DATASOURCE_LOGOS = {
|
|
1235
2132
|
bigquery: "/logos/datasources/bigquery.svg",
|
|
1236
2133
|
postgres: "/logos/datasources/postgres.svg",
|
|
@@ -1369,8 +2266,8 @@ function CollapsibleSection({ title, icon, colorClass, defaultOpen = true, count
|
|
|
1369
2266
|
] });
|
|
1370
2267
|
}
|
|
1371
2268
|
function LogicNodeItemCard({ item, translationFunction }) {
|
|
1372
|
-
const IconComponent =
|
|
1373
|
-
const gradient =
|
|
2269
|
+
const IconComponent = chunkBCE3FQVS_js.LOGIC_ICON_MAP[item.nodeType];
|
|
2270
|
+
const gradient = chunkBCE3FQVS_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
|
|
1374
2271
|
const defaultConfig = chunkC7BI5LQ6_js.createDefaultLogicNodeConfig(item.nodeType);
|
|
1375
2272
|
const configJson = defaultConfig ? JSON.stringify(defaultConfig) : void 0;
|
|
1376
2273
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1551,7 +2448,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1551
2448
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.category })
|
|
1552
2449
|
] }),
|
|
1553
2450
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1554
|
-
|
|
2451
|
+
chunkTUEYBNWL_js.ToggleSwitch,
|
|
1555
2452
|
{
|
|
1556
2453
|
checked: Boolean(tool.enabled),
|
|
1557
2454
|
onChange: () => {
|
|
@@ -1592,7 +2489,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1592
2489
|
] })
|
|
1593
2490
|
] }),
|
|
1594
2491
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1595
|
-
|
|
2492
|
+
chunkTUEYBNWL_js.ToggleSwitch,
|
|
1596
2493
|
{
|
|
1597
2494
|
checked: Boolean(rule.enabled),
|
|
1598
2495
|
onChange: () => {
|
|
@@ -1628,8 +2525,8 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1628
2525
|
limit: entity.defaultLimit
|
|
1629
2526
|
});
|
|
1630
2527
|
const dsLogo = getDatasourceLogo(entity.id);
|
|
1631
|
-
const EntityIcon =
|
|
1632
|
-
const entityGradient =
|
|
2528
|
+
const EntityIcon = chunkBCE3FQVS_js.getEntityIcon(entity.id);
|
|
2529
|
+
const entityGradient = chunkBCE3FQVS_js.getEntityGradient(entity.id);
|
|
1633
2530
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1634
2531
|
"div",
|
|
1635
2532
|
{
|
|
@@ -1649,7 +2546,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1649
2546
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1650
2547
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-slate-100 px-1.5 py-0.5 text-[9px] font-medium text-slate-600 dark:bg-white/10 dark:text-slate-300", children: "Read only" }),
|
|
1651
2548
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1652
|
-
|
|
2549
|
+
chunkTUEYBNWL_js.ToggleSwitch,
|
|
1653
2550
|
{
|
|
1654
2551
|
checked: true,
|
|
1655
2552
|
onChange: () => {
|
|
@@ -2027,9 +2924,9 @@ function formatDuration2(durationMs) {
|
|
|
2027
2924
|
}
|
|
2028
2925
|
function RunPanel({ open, onClose, onRun, onStop }) {
|
|
2029
2926
|
const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.runPanel");
|
|
2030
|
-
const nodes =
|
|
2031
|
-
const isRunning =
|
|
2032
|
-
const nodeResults =
|
|
2927
|
+
const nodes = chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodes);
|
|
2928
|
+
const isRunning = chunkBCE3FQVS_js.useWorkflowStore((state) => state.isRunning);
|
|
2929
|
+
const nodeResults = chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodeResults);
|
|
2033
2930
|
const startNode = nodes.find((node) => node.type === "start");
|
|
2034
2931
|
const hasEndNode = nodes.some((node) => node.type === "end");
|
|
2035
2932
|
const hasValidStartConfig = Boolean(
|
|
@@ -2317,8 +3214,8 @@ function inferVariables(config, nodeType) {
|
|
|
2317
3214
|
}
|
|
2318
3215
|
function VariableInspector({ open, onClose }) {
|
|
2319
3216
|
const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.variableInspector");
|
|
2320
|
-
const nodes =
|
|
2321
|
-
const edges =
|
|
3217
|
+
const nodes = chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodes);
|
|
3218
|
+
const edges = chunkBCE3FQVS_js.useWorkflowStore((state) => state.edges);
|
|
2322
3219
|
const [expandedNodes, setExpandedNodes] = react.useState(/* @__PURE__ */ new Set());
|
|
2323
3220
|
const toggleNodeExpansion = react.useCallback((nodeId) => {
|
|
2324
3221
|
setExpandedNodes((current) => {
|
|
@@ -2380,8 +3277,8 @@ function VariableInspector({ open, onClose }) {
|
|
|
2380
3277
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: translations("noNodes") })
|
|
2381
3278
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: nodeVariableEntries.map((entry) => {
|
|
2382
3279
|
const isExpanded = expandedNodes.has(entry.nodeId);
|
|
2383
|
-
const IconComponent =
|
|
2384
|
-
const gradient =
|
|
3280
|
+
const IconComponent = chunkBCE3FQVS_js.LOGIC_ICON_MAP[entry.nodeType];
|
|
3281
|
+
const gradient = chunkBCE3FQVS_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
|
|
2385
3282
|
const inputVariables = entry.variables.filter((variable) => variable.direction === "input");
|
|
2386
3283
|
const outputVariables = entry.variables.filter((variable) => variable.direction === "output");
|
|
2387
3284
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `variable-node-${entry.nodeId}`, children: [
|
|
@@ -2447,7 +3344,7 @@ function RunInputDialog({
|
|
|
2447
3344
|
onRun
|
|
2448
3345
|
}) {
|
|
2449
3346
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow.runInputDialog");
|
|
2450
|
-
const nodes =
|
|
3347
|
+
const nodes = chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodes);
|
|
2451
3348
|
const [values, setValues] = react.useState({});
|
|
2452
3349
|
const inputVariableNames = react.useMemo(() => {
|
|
2453
3350
|
const storeStartNode = nodes.find((node) => node.type === "start");
|
|
@@ -2474,7 +3371,7 @@ function RunInputDialog({
|
|
|
2474
3371
|
}, [onClose]);
|
|
2475
3372
|
if (!open) return null;
|
|
2476
3373
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2477
|
-
|
|
3374
|
+
chunkTUEYBNWL_js.GlassModal,
|
|
2478
3375
|
{
|
|
2479
3376
|
open,
|
|
2480
3377
|
onClose: handleClose,
|
|
@@ -2485,7 +3382,7 @@ function RunInputDialog({
|
|
|
2485
3382
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: inputVariableNames.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: t("noInputs") }) : inputVariableNames.map((variableName) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2486
3383
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300", children: variableName }),
|
|
2487
3384
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2488
|
-
|
|
3385
|
+
chunkTUEYBNWL_js.Input,
|
|
2489
3386
|
{
|
|
2490
3387
|
value: values[variableName] ?? "",
|
|
2491
3388
|
onChange: (event) => handleValueChange(variableName, event.target.value),
|
|
@@ -2494,8 +3391,8 @@ function RunInputDialog({
|
|
|
2494
3391
|
)
|
|
2495
3392
|
] }, variableName)) }),
|
|
2496
3393
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex items-center justify-end gap-2", children: [
|
|
2497
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2498
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3394
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
|
|
3395
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTUEYBNWL_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
|
|
2499
3396
|
/* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-3.5 w-3.5", "data-slot": "icon" }),
|
|
2500
3397
|
t("run")
|
|
2501
3398
|
] })
|
|
@@ -2528,8 +3425,8 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
2528
3425
|
const [isLoadingRuns, setIsLoadingRuns] = react.useState(false);
|
|
2529
3426
|
const [selectedRun, setSelectedRun] = react.useState(null);
|
|
2530
3427
|
const [selectedNode, setSelectedNode] = react.useState(null);
|
|
2531
|
-
const isRunning =
|
|
2532
|
-
const nodeResults =
|
|
3428
|
+
const isRunning = chunkBCE3FQVS_js.useWorkflowStore((state) => state.isRunning);
|
|
3429
|
+
const nodeResults = chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodeResults);
|
|
2533
3430
|
const refreshRuns = react.useCallback(async () => {
|
|
2534
3431
|
setIsLoadingRuns(true);
|
|
2535
3432
|
try {
|
|
@@ -2685,7 +3582,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
|
|
|
2685
3582
|
onAutoSaveGraph(graph);
|
|
2686
3583
|
}, [onAutoSaveGraph, onGraphSnapshot]);
|
|
2687
3584
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2688
|
-
|
|
3585
|
+
chunkBCE3FQVS_js.Workspace,
|
|
2689
3586
|
{
|
|
2690
3587
|
...workspaceProps,
|
|
2691
3588
|
onGraphChange: handleGraphChange
|
|
@@ -2693,7 +3590,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
|
|
|
2693
3590
|
);
|
|
2694
3591
|
});
|
|
2695
3592
|
function DynamicIslandConfirm2(props) {
|
|
2696
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3593
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.DynamicIslandConfirm, { ...props });
|
|
2697
3594
|
}
|
|
2698
3595
|
var JSON_PREVIEW_LINE_LIMIT = 50;
|
|
2699
3596
|
function DslExportModal({ open, onClose, workflow, graph }) {
|
|
@@ -2747,7 +3644,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
|
|
|
2747
3644
|
}, [jsonString, workflow.name, workflow.version]);
|
|
2748
3645
|
if (!open) return null;
|
|
2749
3646
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2750
|
-
|
|
3647
|
+
chunkTUEYBNWL_js.GlassModal,
|
|
2751
3648
|
{
|
|
2752
3649
|
open,
|
|
2753
3650
|
onClose,
|
|
@@ -2789,7 +3686,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
|
|
|
2789
3686
|
] }),
|
|
2790
3687
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
|
|
2791
3688
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2792
|
-
|
|
3689
|
+
chunkTUEYBNWL_js.Button,
|
|
2793
3690
|
{
|
|
2794
3691
|
type: "button",
|
|
2795
3692
|
onClick: handleCopyToClipboard,
|
|
@@ -2806,7 +3703,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
|
|
|
2806
3703
|
}
|
|
2807
3704
|
),
|
|
2808
3705
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2809
|
-
|
|
3706
|
+
chunkTUEYBNWL_js.Button,
|
|
2810
3707
|
{
|
|
2811
3708
|
type: "button",
|
|
2812
3709
|
onClick: handleDownloadJson,
|
|
@@ -2965,7 +3862,7 @@ function DslImportModal({ open, onClose, onImport }) {
|
|
|
2965
3862
|
}, []);
|
|
2966
3863
|
if (!open) return null;
|
|
2967
3864
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2968
|
-
|
|
3865
|
+
chunkTUEYBNWL_js.GlassModal,
|
|
2969
3866
|
{
|
|
2970
3867
|
open,
|
|
2971
3868
|
onClose,
|
|
@@ -3005,7 +3902,7 @@ function DslImportModal({ open, onClose, onImport }) {
|
|
|
3005
3902
|
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "import-validation-result", children: [
|
|
3006
3903
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3007
3904
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: fileName }),
|
|
3008
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3905
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
|
|
3009
3906
|
] }),
|
|
3010
3907
|
validationResult.isValid ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20", children: [
|
|
3011
3908
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -3033,9 +3930,9 @@ function DslImportModal({ open, onClose, onImport }) {
|
|
|
3033
3930
|
] })
|
|
3034
3931
|
] }) }),
|
|
3035
3932
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
|
|
3036
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3933
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
|
|
3037
3934
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3038
|
-
|
|
3935
|
+
chunkTUEYBNWL_js.Button,
|
|
3039
3936
|
{
|
|
3040
3937
|
type: "button",
|
|
3041
3938
|
onClick: handleImport,
|
|
@@ -3056,14 +3953,14 @@ function DslImportModal({ open, onClose, onImport }) {
|
|
|
3056
3953
|
}
|
|
3057
3954
|
|
|
3058
3955
|
// src/astrlabe/store/selectors.ts
|
|
3059
|
-
var useCanUndo = () =>
|
|
3060
|
-
var useCanRedo = () =>
|
|
3061
|
-
var useHasCopied = () =>
|
|
3062
|
-
var useContextMenu = () =>
|
|
3063
|
-
var useEditingNodeId = () =>
|
|
3064
|
-
var useSelectedNodeCount = () =>
|
|
3065
|
-
var useIsRunning = () =>
|
|
3066
|
-
var useNodeResults = () =>
|
|
3956
|
+
var useCanUndo = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.past.length > 0);
|
|
3957
|
+
var useCanRedo = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.future.length > 0);
|
|
3958
|
+
var useHasCopied = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.clipboard !== null);
|
|
3959
|
+
var useContextMenu = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.contextMenu);
|
|
3960
|
+
var useEditingNodeId = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.editingNodeId);
|
|
3961
|
+
var useSelectedNodeCount = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
|
|
3962
|
+
var useIsRunning = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.isRunning);
|
|
3963
|
+
var useNodeResults = () => chunkBCE3FQVS_js.useWorkflowStore((state) => state.nodeResults);
|
|
3067
3964
|
var DEFAULT_MAX_HISTORY = 50;
|
|
3068
3965
|
function useUndoRedo(nodes, edges, setNodes, setEdges, maxHistory = DEFAULT_MAX_HISTORY) {
|
|
3069
3966
|
const pastRef = react.useRef([]);
|
|
@@ -3341,241 +4238,257 @@ function useHelpLines() {
|
|
|
3341
4238
|
};
|
|
3342
4239
|
}
|
|
3343
4240
|
|
|
4241
|
+
Object.defineProperty(exports, "topologicalSortAgents", {
|
|
4242
|
+
enumerable: true,
|
|
4243
|
+
get: function () { return chunk5UU3RQRB_js.topologicalSortAgents; }
|
|
4244
|
+
});
|
|
4245
|
+
Object.defineProperty(exports, "validateGraphNodeConfigs", {
|
|
4246
|
+
enumerable: true,
|
|
4247
|
+
get: function () { return chunk5UU3RQRB_js.validateGraphNodeConfigs; }
|
|
4248
|
+
});
|
|
4249
|
+
Object.defineProperty(exports, "validateNodeConfig", {
|
|
4250
|
+
enumerable: true,
|
|
4251
|
+
get: function () { return chunk5UU3RQRB_js.validateNodeConfig; }
|
|
4252
|
+
});
|
|
4253
|
+
Object.defineProperty(exports, "validateWorkflowGraph", {
|
|
4254
|
+
enumerable: true,
|
|
4255
|
+
get: function () { return chunk5UU3RQRB_js.validateWorkflowGraph; }
|
|
4256
|
+
});
|
|
3344
4257
|
Object.defineProperty(exports, "AgentFlowNode", {
|
|
3345
4258
|
enumerable: true,
|
|
3346
|
-
get: function () { return
|
|
4259
|
+
get: function () { return chunkBCE3FQVS_js.AgentFlowNode; }
|
|
3347
4260
|
});
|
|
3348
4261
|
Object.defineProperty(exports, "AgentToolFlowNode", {
|
|
3349
4262
|
enumerable: true,
|
|
3350
|
-
get: function () { return
|
|
4263
|
+
get: function () { return chunkBCE3FQVS_js.AgentToolFlowNode; }
|
|
3351
4264
|
});
|
|
3352
4265
|
Object.defineProperty(exports, "AnswerFlowNode", {
|
|
3353
4266
|
enumerable: true,
|
|
3354
|
-
get: function () { return
|
|
4267
|
+
get: function () { return chunkBCE3FQVS_js.AnswerFlowNode; }
|
|
3355
4268
|
});
|
|
3356
4269
|
Object.defineProperty(exports, "AnthropicIcon", {
|
|
3357
4270
|
enumerable: true,
|
|
3358
|
-
get: function () { return
|
|
4271
|
+
get: function () { return chunkBCE3FQVS_js.AnthropicIcon; }
|
|
3359
4272
|
});
|
|
3360
4273
|
Object.defineProperty(exports, "CodeFlowNode", {
|
|
3361
4274
|
enumerable: true,
|
|
3362
|
-
get: function () { return
|
|
4275
|
+
get: function () { return chunkBCE3FQVS_js.CodeFlowNode; }
|
|
3363
4276
|
});
|
|
3364
4277
|
Object.defineProperty(exports, "CrewAIIcon", {
|
|
3365
4278
|
enumerable: true,
|
|
3366
|
-
get: function () { return
|
|
4279
|
+
get: function () { return chunkBCE3FQVS_js.CrewAIIcon; }
|
|
3367
4280
|
});
|
|
3368
4281
|
Object.defineProperty(exports, "DocumentExtractorFlowNode", {
|
|
3369
4282
|
enumerable: true,
|
|
3370
|
-
get: function () { return
|
|
4283
|
+
get: function () { return chunkBCE3FQVS_js.DocumentExtractorFlowNode; }
|
|
3371
4284
|
});
|
|
3372
4285
|
Object.defineProperty(exports, "EndFlowNode", {
|
|
3373
4286
|
enumerable: true,
|
|
3374
|
-
get: function () { return
|
|
4287
|
+
get: function () { return chunkBCE3FQVS_js.EndFlowNode; }
|
|
3375
4288
|
});
|
|
3376
4289
|
Object.defineProperty(exports, "EntityFlowNode", {
|
|
3377
4290
|
enumerable: true,
|
|
3378
|
-
get: function () { return
|
|
4291
|
+
get: function () { return chunkBCE3FQVS_js.EntityFlowNode; }
|
|
3379
4292
|
});
|
|
3380
4293
|
Object.defineProperty(exports, "FRAMEWORK_META", {
|
|
3381
4294
|
enumerable: true,
|
|
3382
|
-
get: function () { return
|
|
4295
|
+
get: function () { return chunkBCE3FQVS_js.FRAMEWORK_META; }
|
|
3383
4296
|
});
|
|
3384
4297
|
Object.defineProperty(exports, "GoogleADKIcon", {
|
|
3385
4298
|
enumerable: true,
|
|
3386
|
-
get: function () { return
|
|
4299
|
+
get: function () { return chunkBCE3FQVS_js.GoogleADKIcon; }
|
|
3387
4300
|
});
|
|
3388
4301
|
Object.defineProperty(exports, "GroupFlowNode", {
|
|
3389
4302
|
enumerable: true,
|
|
3390
|
-
get: function () { return
|
|
4303
|
+
get: function () { return chunkBCE3FQVS_js.GroupFlowNode; }
|
|
3391
4304
|
});
|
|
3392
4305
|
Object.defineProperty(exports, "HttpRequestFlowNode", {
|
|
3393
4306
|
enumerable: true,
|
|
3394
|
-
get: function () { return
|
|
4307
|
+
get: function () { return chunkBCE3FQVS_js.HttpRequestFlowNode; }
|
|
3395
4308
|
});
|
|
3396
4309
|
Object.defineProperty(exports, "IfElseFlowNode", {
|
|
3397
4310
|
enumerable: true,
|
|
3398
|
-
get: function () { return
|
|
4311
|
+
get: function () { return chunkBCE3FQVS_js.IfElseFlowNode; }
|
|
3399
4312
|
});
|
|
3400
4313
|
Object.defineProperty(exports, "IterationFlowNode", {
|
|
3401
4314
|
enumerable: true,
|
|
3402
|
-
get: function () { return
|
|
4315
|
+
get: function () { return chunkBCE3FQVS_js.IterationFlowNode; }
|
|
3403
4316
|
});
|
|
3404
4317
|
Object.defineProperty(exports, "IterationStartFlowNode", {
|
|
3405
4318
|
enumerable: true,
|
|
3406
|
-
get: function () { return
|
|
4319
|
+
get: function () { return chunkBCE3FQVS_js.IterationStartFlowNode; }
|
|
3407
4320
|
});
|
|
3408
4321
|
Object.defineProperty(exports, "KnowledgeBaseFlowNode", {
|
|
3409
4322
|
enumerable: true,
|
|
3410
|
-
get: function () { return
|
|
4323
|
+
get: function () { return chunkBCE3FQVS_js.KnowledgeBaseFlowNode; }
|
|
3411
4324
|
});
|
|
3412
4325
|
Object.defineProperty(exports, "LOGIC_ICON_MAP", {
|
|
3413
4326
|
enumerable: true,
|
|
3414
|
-
get: function () { return
|
|
4327
|
+
get: function () { return chunkBCE3FQVS_js.LOGIC_ICON_MAP; }
|
|
3415
4328
|
});
|
|
3416
4329
|
Object.defineProperty(exports, "LOGIC_NODE_BADGE_COLORS", {
|
|
3417
4330
|
enumerable: true,
|
|
3418
|
-
get: function () { return
|
|
4331
|
+
get: function () { return chunkBCE3FQVS_js.LOGIC_NODE_BADGE_COLORS; }
|
|
3419
4332
|
});
|
|
3420
4333
|
Object.defineProperty(exports, "LOGIC_NODE_GRADIENTS", {
|
|
3421
4334
|
enumerable: true,
|
|
3422
|
-
get: function () { return
|
|
4335
|
+
get: function () { return chunkBCE3FQVS_js.LOGIC_NODE_GRADIENTS; }
|
|
3423
4336
|
});
|
|
3424
4337
|
Object.defineProperty(exports, "LOGIC_NODE_HANDLE_COLORS", {
|
|
3425
4338
|
enumerable: true,
|
|
3426
|
-
get: function () { return
|
|
4339
|
+
get: function () { return chunkBCE3FQVS_js.LOGIC_NODE_HANDLE_COLORS; }
|
|
3427
4340
|
});
|
|
3428
4341
|
Object.defineProperty(exports, "LangChainIcon", {
|
|
3429
4342
|
enumerable: true,
|
|
3430
|
-
get: function () { return
|
|
4343
|
+
get: function () { return chunkBCE3FQVS_js.LangChainIcon; }
|
|
3431
4344
|
});
|
|
3432
4345
|
Object.defineProperty(exports, "ListOperatorFlowNode", {
|
|
3433
4346
|
enumerable: true,
|
|
3434
|
-
get: function () { return
|
|
4347
|
+
get: function () { return chunkBCE3FQVS_js.ListOperatorFlowNode; }
|
|
3435
4348
|
});
|
|
3436
4349
|
Object.defineProperty(exports, "LogicNodeModal", {
|
|
3437
4350
|
enumerable: true,
|
|
3438
|
-
get: function () { return
|
|
4351
|
+
get: function () { return chunkBCE3FQVS_js.LogicNodeModal; }
|
|
3439
4352
|
});
|
|
3440
4353
|
Object.defineProperty(exports, "MINIMAP_NODE_COLORS", {
|
|
3441
4354
|
enumerable: true,
|
|
3442
|
-
get: function () { return
|
|
4355
|
+
get: function () { return chunkBCE3FQVS_js.MINIMAP_NODE_COLORS; }
|
|
3443
4356
|
});
|
|
3444
4357
|
Object.defineProperty(exports, "ModelProviderFlowNode", {
|
|
3445
4358
|
enumerable: true,
|
|
3446
|
-
get: function () { return
|
|
4359
|
+
get: function () { return chunkBCE3FQVS_js.ModelProviderFlowNode; }
|
|
3447
4360
|
});
|
|
3448
4361
|
Object.defineProperty(exports, "NODE_EXECUTION_ACCENT_COLORS", {
|
|
3449
4362
|
enumerable: true,
|
|
3450
|
-
get: function () { return
|
|
4363
|
+
get: function () { return chunkBCE3FQVS_js.NODE_EXECUTION_ACCENT_COLORS; }
|
|
3451
4364
|
});
|
|
3452
4365
|
Object.defineProperty(exports, "NodeCard", {
|
|
3453
4366
|
enumerable: true,
|
|
3454
|
-
get: function () { return
|
|
4367
|
+
get: function () { return chunkBCE3FQVS_js.NodeCard; }
|
|
3455
4368
|
});
|
|
3456
4369
|
Object.defineProperty(exports, "NodeContextMenu", {
|
|
3457
4370
|
enumerable: true,
|
|
3458
|
-
get: function () { return
|
|
4371
|
+
get: function () { return chunkBCE3FQVS_js.NodeContextMenu; }
|
|
3459
4372
|
});
|
|
3460
4373
|
Object.defineProperty(exports, "NoteFlowNode", {
|
|
3461
4374
|
enumerable: true,
|
|
3462
|
-
get: function () { return
|
|
4375
|
+
get: function () { return chunkBCE3FQVS_js.NoteFlowNode; }
|
|
3463
4376
|
});
|
|
3464
4377
|
Object.defineProperty(exports, "OpenAIIcon", {
|
|
3465
4378
|
enumerable: true,
|
|
3466
|
-
get: function () { return
|
|
4379
|
+
get: function () { return chunkBCE3FQVS_js.OpenAIIcon; }
|
|
3467
4380
|
});
|
|
3468
4381
|
Object.defineProperty(exports, "PanelContextMenu", {
|
|
3469
4382
|
enumerable: true,
|
|
3470
|
-
get: function () { return
|
|
4383
|
+
get: function () { return chunkBCE3FQVS_js.PanelContextMenu; }
|
|
3471
4384
|
});
|
|
3472
4385
|
Object.defineProperty(exports, "ParameterExtractorFlowNode", {
|
|
3473
4386
|
enumerable: true,
|
|
3474
|
-
get: function () { return
|
|
4387
|
+
get: function () { return chunkBCE3FQVS_js.ParameterExtractorFlowNode; }
|
|
3475
4388
|
});
|
|
3476
4389
|
Object.defineProperty(exports, "QuestionClassifierFlowNode", {
|
|
3477
4390
|
enumerable: true,
|
|
3478
|
-
get: function () { return
|
|
4391
|
+
get: function () { return chunkBCE3FQVS_js.QuestionClassifierFlowNode; }
|
|
3479
4392
|
});
|
|
3480
4393
|
Object.defineProperty(exports, "RuleFlowNode", {
|
|
3481
4394
|
enumerable: true,
|
|
3482
|
-
get: function () { return
|
|
4395
|
+
get: function () { return chunkBCE3FQVS_js.RuleFlowNode; }
|
|
3483
4396
|
});
|
|
3484
4397
|
Object.defineProperty(exports, "SelectionContextMenu", {
|
|
3485
4398
|
enumerable: true,
|
|
3486
|
-
get: function () { return
|
|
4399
|
+
get: function () { return chunkBCE3FQVS_js.SelectionContextMenu; }
|
|
3487
4400
|
});
|
|
3488
4401
|
Object.defineProperty(exports, "StartFlowNode", {
|
|
3489
4402
|
enumerable: true,
|
|
3490
|
-
get: function () { return
|
|
4403
|
+
get: function () { return chunkBCE3FQVS_js.StartFlowNode; }
|
|
3491
4404
|
});
|
|
3492
4405
|
Object.defineProperty(exports, "StrandsIcon", {
|
|
3493
4406
|
enumerable: true,
|
|
3494
|
-
get: function () { return
|
|
4407
|
+
get: function () { return chunkBCE3FQVS_js.StrandsIcon; }
|
|
3495
4408
|
});
|
|
3496
4409
|
Object.defineProperty(exports, "TemplateTransformFlowNode", {
|
|
3497
4410
|
enumerable: true,
|
|
3498
|
-
get: function () { return
|
|
4411
|
+
get: function () { return chunkBCE3FQVS_js.TemplateTransformFlowNode; }
|
|
3499
4412
|
});
|
|
3500
4413
|
Object.defineProperty(exports, "ToolFlowNode", {
|
|
3501
4414
|
enumerable: true,
|
|
3502
|
-
get: function () { return
|
|
4415
|
+
get: function () { return chunkBCE3FQVS_js.ToolFlowNode; }
|
|
3503
4416
|
});
|
|
3504
4417
|
Object.defineProperty(exports, "VariableAggregatorFlowNode", {
|
|
3505
4418
|
enumerable: true,
|
|
3506
|
-
get: function () { return
|
|
4419
|
+
get: function () { return chunkBCE3FQVS_js.VariableAggregatorFlowNode; }
|
|
3507
4420
|
});
|
|
3508
4421
|
Object.defineProperty(exports, "VariableAssignerFlowNode", {
|
|
3509
4422
|
enumerable: true,
|
|
3510
|
-
get: function () { return
|
|
4423
|
+
get: function () { return chunkBCE3FQVS_js.VariableAssignerFlowNode; }
|
|
3511
4424
|
});
|
|
3512
4425
|
Object.defineProperty(exports, "WorkflowBuilderProvider", {
|
|
3513
4426
|
enumerable: true,
|
|
3514
|
-
get: function () { return
|
|
4427
|
+
get: function () { return chunkBCE3FQVS_js.WorkflowBuilderProvider; }
|
|
3515
4428
|
});
|
|
3516
4429
|
Object.defineProperty(exports, "Workspace", {
|
|
3517
4430
|
enumerable: true,
|
|
3518
|
-
get: function () { return
|
|
4431
|
+
get: function () { return chunkBCE3FQVS_js.Workspace; }
|
|
3519
4432
|
});
|
|
3520
4433
|
Object.defineProperty(exports, "getCompatibleModels", {
|
|
3521
4434
|
enumerable: true,
|
|
3522
|
-
get: function () { return
|
|
4435
|
+
get: function () { return chunkBCE3FQVS_js.getCompatibleModels; }
|
|
3523
4436
|
});
|
|
3524
4437
|
Object.defineProperty(exports, "getDefaultFrameworkForModel", {
|
|
3525
4438
|
enumerable: true,
|
|
3526
|
-
get: function () { return
|
|
4439
|
+
get: function () { return chunkBCE3FQVS_js.getDefaultFrameworkForModel; }
|
|
3527
4440
|
});
|
|
3528
4441
|
Object.defineProperty(exports, "getEntityBadgeColor", {
|
|
3529
4442
|
enumerable: true,
|
|
3530
|
-
get: function () { return
|
|
4443
|
+
get: function () { return chunkBCE3FQVS_js.getEntityBadgeColor; }
|
|
3531
4444
|
});
|
|
3532
4445
|
Object.defineProperty(exports, "getEntityGradient", {
|
|
3533
4446
|
enumerable: true,
|
|
3534
|
-
get: function () { return
|
|
4447
|
+
get: function () { return chunkBCE3FQVS_js.getEntityGradient; }
|
|
3535
4448
|
});
|
|
3536
4449
|
Object.defineProperty(exports, "getEntityHandleColor", {
|
|
3537
4450
|
enumerable: true,
|
|
3538
|
-
get: function () { return
|
|
4451
|
+
get: function () { return chunkBCE3FQVS_js.getEntityHandleColor; }
|
|
3539
4452
|
});
|
|
3540
4453
|
Object.defineProperty(exports, "getEntityIcon", {
|
|
3541
4454
|
enumerable: true,
|
|
3542
|
-
get: function () { return
|
|
4455
|
+
get: function () { return chunkBCE3FQVS_js.getEntityIcon; }
|
|
3543
4456
|
});
|
|
3544
4457
|
Object.defineProperty(exports, "getEntityMinimapColor", {
|
|
3545
4458
|
enumerable: true,
|
|
3546
|
-
get: function () { return
|
|
4459
|
+
get: function () { return chunkBCE3FQVS_js.getEntityMinimapColor; }
|
|
3547
4460
|
});
|
|
3548
4461
|
Object.defineProperty(exports, "getFrameworkMeta", {
|
|
3549
4462
|
enumerable: true,
|
|
3550
|
-
get: function () { return
|
|
4463
|
+
get: function () { return chunkBCE3FQVS_js.getFrameworkMeta; }
|
|
3551
4464
|
});
|
|
3552
4465
|
Object.defineProperty(exports, "getNodeExecutionAccent", {
|
|
3553
4466
|
enumerable: true,
|
|
3554
|
-
get: function () { return
|
|
4467
|
+
get: function () { return chunkBCE3FQVS_js.getNodeExecutionAccent; }
|
|
3555
4468
|
});
|
|
3556
4469
|
Object.defineProperty(exports, "getNodeExecutionAccentRgb", {
|
|
3557
4470
|
enumerable: true,
|
|
3558
|
-
get: function () { return
|
|
4471
|
+
get: function () { return chunkBCE3FQVS_js.getNodeExecutionAccentRgb; }
|
|
3559
4472
|
});
|
|
3560
4473
|
Object.defineProperty(exports, "isModelCompatibleWithFramework", {
|
|
3561
4474
|
enumerable: true,
|
|
3562
|
-
get: function () { return
|
|
4475
|
+
get: function () { return chunkBCE3FQVS_js.isModelCompatibleWithFramework; }
|
|
3563
4476
|
});
|
|
3564
4477
|
Object.defineProperty(exports, "useModalStore", {
|
|
3565
4478
|
enumerable: true,
|
|
3566
|
-
get: function () { return
|
|
4479
|
+
get: function () { return chunkBCE3FQVS_js.useModalStore; }
|
|
3567
4480
|
});
|
|
3568
4481
|
Object.defineProperty(exports, "useWorkflowBuilderClient", {
|
|
3569
4482
|
enumerable: true,
|
|
3570
|
-
get: function () { return
|
|
4483
|
+
get: function () { return chunkBCE3FQVS_js.useWorkflowBuilderClient; }
|
|
3571
4484
|
});
|
|
3572
4485
|
Object.defineProperty(exports, "useWorkflowBuilderClientOptional", {
|
|
3573
4486
|
enumerable: true,
|
|
3574
|
-
get: function () { return
|
|
4487
|
+
get: function () { return chunkBCE3FQVS_js.useWorkflowBuilderClientOptional; }
|
|
3575
4488
|
});
|
|
3576
4489
|
Object.defineProperty(exports, "useWorkflowStore", {
|
|
3577
4490
|
enumerable: true,
|
|
3578
|
-
get: function () { return
|
|
4491
|
+
get: function () { return chunkBCE3FQVS_js.useWorkflowStore; }
|
|
3579
4492
|
});
|
|
3580
4493
|
Object.defineProperty(exports, "GraphNodeBadge", {
|
|
3581
4494
|
enumerable: true,
|
|
@@ -3593,22 +4506,6 @@ Object.defineProperty(exports, "GraphNodeMeta", {
|
|
|
3593
4506
|
enumerable: true,
|
|
3594
4507
|
get: function () { return chunkP4YYEM4B_js.GraphNodeMeta; }
|
|
3595
4508
|
});
|
|
3596
|
-
Object.defineProperty(exports, "topologicalSortAgents", {
|
|
3597
|
-
enumerable: true,
|
|
3598
|
-
get: function () { return chunk5UU3RQRB_js.topologicalSortAgents; }
|
|
3599
|
-
});
|
|
3600
|
-
Object.defineProperty(exports, "validateGraphNodeConfigs", {
|
|
3601
|
-
enumerable: true,
|
|
3602
|
-
get: function () { return chunk5UU3RQRB_js.validateGraphNodeConfigs; }
|
|
3603
|
-
});
|
|
3604
|
-
Object.defineProperty(exports, "validateNodeConfig", {
|
|
3605
|
-
enumerable: true,
|
|
3606
|
-
get: function () { return chunk5UU3RQRB_js.validateNodeConfig; }
|
|
3607
|
-
});
|
|
3608
|
-
Object.defineProperty(exports, "validateWorkflowGraph", {
|
|
3609
|
-
enumerable: true,
|
|
3610
|
-
get: function () { return chunk5UU3RQRB_js.validateWorkflowGraph; }
|
|
3611
|
-
});
|
|
3612
4509
|
Object.defineProperty(exports, "applyDagreLayout", {
|
|
3613
4510
|
enumerable: true,
|
|
3614
4511
|
get: function () { return chunkC7BI5LQ6_js.applyDagreLayout; }
|
|
@@ -3632,13 +4529,21 @@ exports.MetaLlamaIcon = MetaLlamaIcon;
|
|
|
3632
4529
|
exports.NodePalette = NodePalette;
|
|
3633
4530
|
exports.PipelineSettingsModal = PipelineSettingsModal;
|
|
3634
4531
|
exports.PreviewPanel = PreviewPanel;
|
|
4532
|
+
exports.RULE_STATUS_OPTIONS = RULE_STATUS_OPTIONS;
|
|
4533
|
+
exports.RuleActionBuilder = RuleActionBuilder;
|
|
4534
|
+
exports.RuleConditionBuilder = RuleConditionBuilder;
|
|
4535
|
+
exports.RuleForm = RuleForm;
|
|
3635
4536
|
exports.RunInputDialog = RunInputDialog;
|
|
3636
4537
|
exports.RunPanel = RunPanel;
|
|
3637
4538
|
exports.SaveStatusBadge = SaveStatusBadge;
|
|
3638
4539
|
exports.SubworkflowModal = SubworkflowModal;
|
|
4540
|
+
exports.TIMEZONE_OPTIONS = TIMEZONE_OPTIONS;
|
|
3639
4541
|
exports.VariableInspector = VariableInspector;
|
|
3640
4542
|
exports.VersionHistoryPanel = VersionHistoryPanel;
|
|
3641
4543
|
exports.WorkflowListBar = WorkflowListBar;
|
|
4544
|
+
exports.defaultRuleAction = defaultRuleAction;
|
|
4545
|
+
exports.defaultRuleCondition = defaultRuleCondition;
|
|
4546
|
+
exports.defaultRuleForm = defaultRuleForm;
|
|
3642
4547
|
exports.getModelIcon = getModelIcon;
|
|
3643
4548
|
exports.useCanRedo = useCanRedo;
|
|
3644
4549
|
exports.useCanUndo = useCanUndo;
|