@loopstack/loopstack-studio 0.23.1 → 0.25.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 (147) hide show
  1. package/dist/api/config.js +3 -3
  2. package/dist/api/index.js +10 -12
  3. package/dist/api/processor.js +1 -1
  4. package/dist/api/secrets.js +16 -0
  5. package/dist/api/workflows.js +7 -1
  6. package/dist/components/dynamic-form/ArrayController.js +68 -64
  7. package/dist/components/dynamic-form/CodeContent.js +3 -3
  8. package/dist/components/dynamic-form/Form.js +46 -40
  9. package/dist/components/dynamic-form/FormElement.js +1 -1
  10. package/dist/components/dynamic-form/FormElementHeader.js +2 -2
  11. package/dist/components/dynamic-form/ObjectController.js +24 -21
  12. package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
  13. package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
  14. package/dist/components/dynamic-form/fields/InputField.js +20 -19
  15. package/dist/components/dynamic-form/fields/RadioField.js +18 -18
  16. package/dist/components/dynamic-form/fields/SelectField.js +19 -19
  17. package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
  18. package/dist/components/feedback/LoadingCentered.js +1 -1
  19. package/dist/components/layout/MainLayout.js +18 -31
  20. package/dist/components/layout/StudioSidebar.js +169 -109
  21. package/dist/components/loopstack-elements/link.js +77 -76
  22. package/dist/components/loopstack-elements/tool.js +171 -0
  23. package/dist/components/page/PageBreadcrumbs.js +79 -32
  24. package/dist/components/ui-widgets/UiActions.js +10 -4
  25. package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +8 -6
  26. package/dist/components/ui-widgets/widgets/SubmitButton.js +8 -6
  27. package/dist/features/code-explorer/components/FileContentViewer.js +92 -100
  28. package/dist/features/dashboard/RunItem.js +1 -1
  29. package/dist/features/debug/components/ConfigFlowViewer.js +2 -2
  30. package/dist/features/debug/components/{PipelineDebugHeader.js → WorkflowDebugHeader.js} +5 -5
  31. package/dist/features/debug/components/{PipelineDebugLegend.js → WorkflowDebugLegend.js} +2 -2
  32. package/dist/features/debug/components/{PipelineFlowViewer.js → WorkflowFlowViewer.js} +9 -9
  33. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +46 -0
  34. package/dist/features/debug/index.js +2 -2
  35. package/dist/features/debug/lib/flow-utils.js +142 -150
  36. package/dist/features/documents/DocumentRenderer.js +66 -30
  37. package/dist/features/documents/components/DocumentItem.js +2 -2
  38. package/dist/features/documents/components/DocumentList.js +18 -11
  39. package/dist/features/documents/document-details/DocumentDetails.js +4 -4
  40. package/dist/features/documents/renderers/AiMessage.js +12 -12
  41. package/dist/features/documents/renderers/ChoicesRenderer.js +92 -0
  42. package/dist/features/documents/renderers/ClaudeMessage.js +1 -1
  43. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +56 -0
  44. package/dist/features/documents/renderers/DocumentFormRenderer.js +95 -65
  45. package/dist/features/documents/renderers/LinkMessageRenderer.js +8 -10
  46. package/dist/features/documents/renderers/SecretInputRenderer.js +87 -0
  47. package/dist/features/documents/renderers/TextPromptRenderer.js +57 -0
  48. package/dist/features/documents/renderers/useDocumentTransition.js +30 -0
  49. package/dist/features/oauth/OAuthPromptRenderer.js +20 -20
  50. package/dist/features/runs/Runs.js +8 -8
  51. package/dist/features/workbench/Workbench.js +35 -35
  52. package/dist/features/workbench/WorkflowItem.js +10 -9
  53. package/dist/features/workbench/WorkflowList.js +56 -73
  54. package/dist/features/workbench/components/NewRunDialog.js +18 -18
  55. package/dist/features/workbench/components/WorkbenchFilesPanel.js +33 -26
  56. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +13 -44
  57. package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
  58. package/dist/features/workbench/components/WorkbenchIconSidebar.js +17 -17
  59. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
  60. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
  61. package/dist/features/workbench/components/WorkbenchSettingsModal.js +16 -41
  62. package/dist/features/workbench/components/WorkflowForms.js +14 -13
  63. package/dist/features/workbench/components/WorkflowHistoryItem.js +60 -81
  64. package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js} +5 -5
  65. package/dist/features/workbench/components/buttons/WorkflowButtons.js +56 -54
  66. package/dist/features/workbench/hooks/useWorkflowData.js +10 -10
  67. package/dist/features/workbench/hooks/useWorkflowListState.js +8 -45
  68. package/dist/features/workbench/index.js +2 -3
  69. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +132 -117
  70. package/dist/features/workbench/providers/ScrollProvider.js +2 -2
  71. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +4 -4
  72. package/dist/features/workspaces/Workspaces.js +1 -1
  73. package/dist/features/workspaces/components/CreateWorkspace.js +12 -12
  74. package/dist/features/workspaces/components/ExecutionTimeline.js +22 -21
  75. package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js} +6 -6
  76. package/dist/features/workspaces/components/{PipelineForm.js → WorkflowRunForm.js} +31 -31
  77. package/dist/features/workspaces/components/WorkspaceHomePage.js +11 -11
  78. package/dist/features/workspaces/components/{pipeline-form → workflow-form}/ArgumentsView.js +1 -1
  79. package/dist/features/workspaces/components/{pipeline-form → workflow-form}/SelectionView.js +16 -16
  80. package/dist/hooks/index.js +3 -3
  81. package/dist/hooks/query-keys.js +34 -68
  82. package/dist/hooks/useConfig.js +5 -5
  83. package/dist/hooks/useProcessor.js +5 -5
  84. package/dist/hooks/useSecrets.js +69 -0
  85. package/dist/hooks/useWorkflows.js +155 -68
  86. package/dist/index.d.ts +158 -116
  87. package/dist/index.js +5 -5
  88. package/dist/packages/contracts/dist/enums/index.js +11 -12
  89. package/dist/packages/contracts/dist/enums/workflow-state.enum.js +1 -1
  90. package/dist/pages/DashboardPage.js +87 -35
  91. package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
  92. package/dist/pages/DebugWorkflowsPage.js +10 -10
  93. package/dist/pages/EmbedWorkbenchPage.js +39 -45
  94. package/dist/pages/PreviewWorkbenchPage.js +130 -255
  95. package/dist/pages/RunsListPage.js +1 -1
  96. package/dist/pages/StudioLandingPage.js +13 -13
  97. package/dist/pages/WorkbenchPage.js +6 -6
  98. package/dist/pages/WorkflowDebugPage.js +114 -0
  99. package/dist/pages/WorkspacePage.js +4 -2
  100. package/dist/providers/InvalidationEventsProvider.js +19 -19
  101. package/dist/providers/SseProvider.js +0 -1
  102. package/dist/routing/LocalRouter.js +14 -17
  103. package/dist/types/ai.types.js +13 -0
  104. package/package.json +2 -3
  105. package/dist/api/namespaces.js +0 -7
  106. package/dist/api/pipelines.js +0 -13
  107. package/dist/components/ai-elements/tool.js +0 -158
  108. package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +0 -41
  109. package/dist/features/workbench/NavigationItems.js +0 -52
  110. package/dist/features/workbench/WorkbenchNavigation.js +0 -38
  111. package/dist/features/workbench/components/NavigationItem.js +0 -68
  112. package/dist/features/workbench/hooks/useIntersectionObserver.js +0 -44
  113. package/dist/hooks/useNamespaceTree.js +0 -27
  114. package/dist/hooks/useNamespaces.js +0 -25
  115. package/dist/hooks/usePipelines.js +0 -161
  116. package/dist/node_modules/@ai-sdk/provider/dist/index.js +0 -65
  117. package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
  118. package/dist/node_modules/ai/dist/index.js +0 -1083
  119. package/dist/node_modules/zod/v3/ZodError.js +0 -79
  120. package/dist/node_modules/zod/v3/errors.js +0 -6
  121. package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
  122. package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
  123. package/dist/node_modules/zod/v3/helpers/util.js +0 -72
  124. package/dist/node_modules/zod/v3/locales/en.js +0 -58
  125. package/dist/node_modules/zod/v3/types.js +0 -2425
  126. package/dist/node_modules/zod/v4/classic/errors.js +0 -21
  127. package/dist/node_modules/zod/v4/classic/iso.js +0 -29
  128. package/dist/node_modules/zod/v4/classic/parse.js +0 -4
  129. package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
  130. package/dist/node_modules/zod/v4/core/api.js +0 -532
  131. package/dist/node_modules/zod/v4/core/checks.js +0 -283
  132. package/dist/node_modules/zod/v4/core/core.js +0 -44
  133. package/dist/node_modules/zod/v4/core/doc.js +0 -21
  134. package/dist/node_modules/zod/v4/core/errors.js +0 -40
  135. package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
  136. package/dist/node_modules/zod/v4/core/parse.js +0 -66
  137. package/dist/node_modules/zod/v4/core/regexes.js +0 -28
  138. package/dist/node_modules/zod/v4/core/registries.js +0 -38
  139. package/dist/node_modules/zod/v4/core/schemas.js +0 -863
  140. package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
  141. package/dist/node_modules/zod/v4/core/util.js +0 -267
  142. package/dist/node_modules/zod/v4/core/versions.js +0 -6
  143. package/dist/packages/contracts/dist/enums/pipeline-state.js +0 -10
  144. package/dist/pages/PipelineDebugPage.js +0 -115
  145. /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/StateNode.js +0 -0
  146. /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/WorkflowTransitionEdge.js +0 -0
  147. /package/dist/features/workspaces/components/{pipeline-form → workflow-form}/HeaderSection.js +0 -0
@@ -1,71 +1,71 @@
1
1
  import { useStudio } from "../../../providers/StudioProvider.js";
2
- import { usePipelineConfig } from "../../../hooks/useConfig.js";
3
- import { useCreatePipeline } from "../../../hooks/usePipelines.js";
2
+ import { useWorkflowConfig } from "../../../hooks/useConfig.js";
3
+ import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
4
4
  import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
5
- import { useRunPipeline } from "../../../hooks/useProcessor.js";
6
- import ArgumentsView_default from "./pipeline-form/ArgumentsView.js";
7
- import SelectionView_default from "./pipeline-form/SelectionView.js";
5
+ import { useRunWorkflow } from "../../../hooks/useProcessor.js";
6
+ import ArgumentsView_default from "./workflow-form/ArgumentsView.js";
7
+ import SelectionView_default from "./workflow-form/SelectionView.js";
8
8
  import { c } from "react/compiler-runtime";
9
9
  import { useEffect, useMemo, useState } from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { Loader2 } from "lucide-react";
12
- var PipelineForm_default = (l) => {
13
- let u = c(63), { title: d, workspace: f } = l, { router: p } = useStudio(), m = useCreatePipeline(), h = useRunPipeline(), g = usePipelineConfig(f.blockName), [_, v] = useState("selection"), y;
12
+ var WorkflowRunForm_default = (l) => {
13
+ let u = c(63), { title: d, workspace: f } = l, { router: p } = useStudio(), m = useCreateWorkflow(), h = useRunWorkflow(), g = useWorkflowConfig(f.className), [_, v] = useState("selection"), y;
14
14
  u[0] === Symbol.for("react.memo_cache_sentinel") ? (y = {
15
15
  name: "",
16
- blockName: "",
16
+ alias: "",
17
17
  properties: {}
18
18
  }, u[0] = y) : y = u[0];
19
19
  let [b, x] = useState(y), S;
20
20
  u[1] === Symbol.for("react.memo_cache_sentinel") ? (S = {
21
21
  name: "",
22
- blockName: ""
22
+ alias: ""
23
23
  }, u[1] = S) : S = u[1];
24
24
  let [C, w] = useState(S), T;
25
25
  bb0: {
26
- if (!b.blockName || !g.data) {
26
+ if (!b.alias || !g.data) {
27
27
  T = void 0;
28
28
  break bb0;
29
29
  }
30
30
  let e;
31
- if (u[2] !== g.data || u[3] !== b.blockName) {
31
+ if (u[2] !== g.data || u[3] !== b.alias) {
32
32
  let o;
33
- u[5] === b.blockName ? o = u[6] : (o = (e) => e.blockName === b.blockName, u[5] = b.blockName, u[6] = o), e = g.data.find(o), u[2] = g.data, u[3] = b.blockName, u[4] = e;
33
+ u[5] === b.alias ? o = u[6] : (o = (e) => e.alias === b.alias, u[5] = b.alias, u[6] = o), e = g.data.find(o), u[2] = g.data, u[3] = b.alias, u[4] = e;
34
34
  } else e = u[4];
35
35
  T = e;
36
36
  }
37
37
  let E = T, D = !!E?.schema, O = m.isPending || h.isPending, k, A;
38
- u[7] !== g.data || u[8] !== b.blockName ? (k = () => {
39
- !b.blockName && g.data?.[0]?.blockName && x((e) => ({
38
+ u[7] !== g.data || u[8] !== b.alias ? (k = () => {
39
+ !b.alias && g.data?.[0]?.alias && x((e) => ({
40
40
  ...e,
41
- blockName: g.data[0].blockName
41
+ alias: g.data[0].alias
42
42
  }));
43
- }, A = [g.data, b.blockName], u[7] = g.data, u[8] = b.blockName, u[9] = k, u[10] = A) : (k = u[9], A = u[10]), useEffect(k, A);
43
+ }, A = [g.data, b.alias], u[7] = g.data, u[8] = b.alias, u[9] = k, u[10] = A) : (k = u[9], A = u[10]), useEffect(k, A);
44
44
  let j;
45
- u[11] === b.blockName ? j = u[12] : (j = () => b.blockName ? !0 : (w({
45
+ u[11] === b.alias ? j = u[12] : (j = () => b.alias ? !0 : (w({
46
46
  name: "",
47
- blockName: "Please select an automation type"
48
- }), !1), u[11] = b.blockName, u[12] = j);
47
+ alias: "Please select an automation type"
48
+ }), !1), u[11] = b.alias, u[12] = j);
49
49
  let M = j, N;
50
50
  u[13] === p ? N = u[14] : (N = (e) => {
51
- p.navigateToPipeline(e);
51
+ p.navigateToWorkflow(e);
52
52
  }, u[13] = p, u[14] = N);
53
53
  let P = N, F;
54
- u[15] !== m || u[16] !== b.blockName || u[17] !== b.name || u[18] !== P || u[19] !== h || u[20] !== f.id ? (F = (e, o) => {
55
- m.mutate({ pipelineCreateDto: {
56
- blockName: b.blockName,
54
+ u[15] !== m || u[16] !== b.alias || u[17] !== b.name || u[18] !== P || u[19] !== h || u[20] !== f.id ? (F = (e, o) => {
55
+ m.mutate({ workflowCreateDto: {
56
+ alias: b.alias,
57
57
  title: b.name || null,
58
58
  workspaceId: f.id,
59
59
  transition: e ?? null,
60
60
  args: o
61
61
  } }, { onSuccess: (e) => {
62
62
  h.mutate({
63
- pipelineId: e.id,
64
- runPipelinePayloadDto: {},
63
+ workflowId: e.id,
64
+ runWorkflowPayloadDto: {},
65
65
  force: !0
66
66
  }, { onSuccess: () => P(e.id) });
67
67
  } });
68
- }, u[15] = m, u[16] = b.blockName, u[17] = b.name, u[18] = P, u[19] = h, u[20] = f.id, u[21] = F) : F = u[21];
68
+ }, u[15] = m, u[16] = b.alias, u[17] = b.name, u[18] = P, u[19] = h, u[20] = f.id, u[21] = F) : F = u[21];
69
69
  let I = F, L;
70
70
  u[22] !== I || u[23] !== D || u[24] !== M ? (L = () => {
71
71
  M() && (D ? v("arguments") : I());
@@ -110,7 +110,7 @@ var PipelineForm_default = (l) => {
110
110
  className: "w-full shrink-0 px-1",
111
111
  children: /* @__PURE__ */ jsx(SelectionView_default, {
112
112
  title: d,
113
- pipelineTypes: g.data,
113
+ workflowTypes: g.data,
114
114
  formData: b,
115
115
  errors: C,
116
116
  isLoading: O,
@@ -119,7 +119,7 @@ var PipelineForm_default = (l) => {
119
119
  })
120
120
  }), u[40] = C, u[41] = g.data, u[42] = b, u[43] = W, u[44] = R, u[45] = O, u[46] = d, u[47] = X) : X = u[47];
121
121
  let Z;
122
- u[48] !== b.blockName || u[49] !== H || u[50] !== D || u[51] !== O || u[52] !== E ? (Z = /* @__PURE__ */ jsx("div", {
122
+ u[48] !== b.alias || u[49] !== H || u[50] !== D || u[51] !== O || u[52] !== E ? (Z = /* @__PURE__ */ jsx("div", {
123
123
  className: "w-full shrink-0 px-1",
124
124
  children: /* @__PURE__ */ jsx(ArgumentsView_default, {
125
125
  config: E,
@@ -127,8 +127,8 @@ var PipelineForm_default = (l) => {
127
127
  isLoading: O,
128
128
  onBack: B,
129
129
  onSubmit: H
130
- }, b.blockName)
131
- }), u[48] = b.blockName, u[49] = H, u[50] = D, u[51] = O, u[52] = E, u[53] = Z) : Z = u[53];
130
+ }, b.alias)
131
+ }), u[48] = b.alias, u[49] = H, u[50] = D, u[51] = O, u[52] = E, u[53] = Z) : Z = u[53];
132
132
  let Q;
133
133
  u[54] !== Y || u[55] !== X || u[56] !== Z ? (Q = /* @__PURE__ */ jsx("div", {
134
134
  className: "relative overflow-hidden",
@@ -149,4 +149,4 @@ var PipelineForm_default = (l) => {
149
149
  ]
150
150
  }), u[58] = G, u[59] = K, u[60] = q, u[61] = Q, u[62] = $) : $ = u[62], $;
151
151
  };
152
- export { PipelineForm_default as default };
152
+ export { WorkflowRunForm_default as default };
@@ -1,36 +1,36 @@
1
1
  import { useStudio } from "../../../providers/StudioProvider.js";
2
- import { useCreatePipeline } from "../../../hooks/usePipelines.js";
2
+ import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
3
3
  import { Button } from "../../../components/ui/button.js";
4
4
  import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
5
5
  import Form_default from "../../../components/dynamic-form/Form.js";
6
- import { useRunPipeline } from "../../../hooks/useProcessor.js";
6
+ import { useRunWorkflow } from "../../../hooks/useProcessor.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Loader2, Play } from "lucide-react";
10
10
  import { useForm } from "react-hook-form";
11
11
  var WorkspaceHomePage_default = (p) => {
12
- let m = c(39), { workspace: h, action: g } = p, { router: _ } = useStudio(), v = useCreatePipeline(), y = useRunPipeline(), b;
12
+ let m = c(39), { workspace: h, action: g } = p, { router: _ } = useStudio(), v = useCreateWorkflow(), y = useRunWorkflow(), b;
13
13
  m[0] === g.options ? b = m[1] : (b = g.options ?? {}, m[0] = g.options, m[1] = b);
14
- let x = b, S = x.workflow, C = x.title, w = x.subtitle, T = x.schema, E = x.pipelineUi, D;
14
+ let x = b, S = x.workflow, C = x.title, w = x.subtitle, T = x.schema, E = x.workflowUi, D;
15
15
  m[2] === Symbol.for("react.memo_cache_sentinel") ? (D = {
16
16
  defaultValues: {},
17
17
  mode: "onChange"
18
18
  }, m[2] = D) : D = m[2];
19
19
  let O = useForm(D), k = v.isPending || y.isPending, A = !!T, j;
20
20
  m[3] !== v || m[4] !== A || m[5] !== _ || m[6] !== y || m[7] !== S || m[8] !== h ? (j = (t) => {
21
- v.mutate({ pipelineCreateDto: {
22
- blockName: S,
21
+ v.mutate({ workflowCreateDto: {
22
+ alias: S,
23
23
  title: null,
24
24
  workspaceId: h.id,
25
25
  transition: null,
26
26
  args: A ? t : void 0
27
27
  } }, { onSuccess: (t) => {
28
28
  y.mutate({
29
- pipelineId: t.id,
30
- runPipelinePayloadDto: {},
29
+ workflowId: t.id,
30
+ runWorkflowPayloadDto: {},
31
31
  force: !0
32
32
  }, { onSuccess: () => {
33
- _.navigateToPipeline(t.id);
33
+ _.navigateToWorkflow(t.id);
34
34
  } });
35
35
  } });
36
36
  }, m[3] = v, m[4] = A, m[5] = _, m[6] = y, m[7] = S, m[8] = h, m[9] = j) : j = m[9];
@@ -53,7 +53,7 @@ var WorkspaceHomePage_default = (p) => {
53
53
  children: w
54
54
  }), m[19] = w, m[20] = R);
55
55
  let z;
56
- m[21] !== O || m[22] !== A || m[23] !== E || m[24] !== T ? (z = A ? /* @__PURE__ */ jsx("div", {
56
+ m[21] !== O || m[22] !== A || m[23] !== T || m[24] !== E ? (z = A ? /* @__PURE__ */ jsx("div", {
57
57
  className: "mb-6 w-full",
58
58
  children: /* @__PURE__ */ jsx(Form_default, {
59
59
  form: O,
@@ -62,7 +62,7 @@ var WorkspaceHomePage_default = (p) => {
62
62
  disabled: !1,
63
63
  viewOnly: !1
64
64
  })
65
- }) : null, m[21] = O, m[22] = A, m[23] = E, m[24] = T, m[25] = z) : z = m[25];
65
+ }) : null, m[21] = O, m[22] = A, m[23] = T, m[24] = E, m[25] = z) : z = m[25];
66
66
  let B;
67
67
  m[26] === k ? B = m[27] : (B = k ? /* @__PURE__ */ jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(Play, { className: "mr-2 h-4 w-4" }), m[26] = k, m[27] = B);
68
68
  let V;
@@ -21,7 +21,7 @@ var ArgumentsView_default = (u) => {
21
21
  }, d[3] = v, d[4] = b, d[5] = x) : x = d[5];
22
22
  let S = x, C;
23
23
  d[6] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(Zap, { className: "h-5 w-5" }), d[6] = C) : C = d[6];
24
- let w = f?.title || f?.blockName || "", T = f?.description, E;
24
+ let w = f?.title || f?.alias || "", T = f?.description, E;
25
25
  d[7] !== h || d[8] !== w || d[9] !== T ? (E = /* @__PURE__ */ jsx(HeaderSection_default, {
26
26
  icon: C,
27
27
  title: w,
@@ -5,10 +5,10 @@ import { c } from "react/compiler-runtime";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Loader2, Play } from "lucide-react";
7
7
  var SelectionView_default = (p) => {
8
- let m = c(46), { title: h, pipelineTypes: g, formData: _, errors: v, isLoading: y, onInputChange: b, onNext: x } = p, S;
9
- if (m[0] !== _.blockName || m[1] !== g) {
8
+ let m = c(46), { title: h, workflowTypes: g, formData: _, errors: v, isLoading: y, onInputChange: b, onNext: x } = p, S;
9
+ if (m[0] !== _.alias || m[1] !== g) {
10
10
  let e;
11
- m[3] === _.blockName ? e = m[4] : (e = (e) => e.blockName === _.blockName, m[3] = _.blockName, m[4] = e), S = g.find(e), m[0] = _.blockName, m[1] = g, m[2] = S;
11
+ m[3] === _.alias ? e = m[4] : (e = (e) => e.alias === _.alias, m[3] = _.alias, m[4] = e), S = g.find(e), m[0] = _.alias, m[1] = g, m[2] = S;
12
12
  } else S = m[2];
13
13
  let C = S, w;
14
14
  m[5] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ jsx(Play, { className: "h-5 w-5" }), m[5] = w) : w = m[5];
@@ -24,9 +24,9 @@ var SelectionView_default = (p) => {
24
24
  className: "text-foreground block text-sm font-medium",
25
25
  children: "Automation Type"
26
26
  }), m[8] = E) : E = m[8];
27
- let D = _.blockName, O;
28
- m[9] === b ? O = m[10] : (O = (e) => b("blockName", e), m[9] = b, m[10] = O);
29
- let k = `flex-1 ${v.blockName ? "border-red-500 focus:ring-red-500" : ""}`, A;
27
+ let D = _.alias, O;
28
+ m[9] === b ? O = m[10] : (O = (e) => b("alias", e), m[9] = b, m[10] = O);
29
+ let k = `flex-1 ${v.alias ? "border-red-500 focus:ring-red-500" : ""}`, A;
30
30
  m[11] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select an automation..." }), m[11] = A) : A = m[11];
31
31
  let j;
32
32
  m[12] === k ? j = m[13] : (j = /* @__PURE__ */ jsx(SelectTrigger, {
@@ -39,13 +39,13 @@ var SelectionView_default = (p) => {
39
39
  let N;
40
40
  m[16] === M ? N = m[17] : (N = /* @__PURE__ */ jsx(SelectContent, { children: M }), m[16] = M, m[17] = N);
41
41
  let P;
42
- m[18] !== _.blockName || m[19] !== y || m[20] !== N || m[21] !== O || m[22] !== j ? (P = /* @__PURE__ */ jsxs(Select, {
42
+ m[18] !== _.alias || m[19] !== y || m[20] !== N || m[21] !== O || m[22] !== j ? (P = /* @__PURE__ */ jsxs(Select, {
43
43
  value: D,
44
44
  onValueChange: O,
45
45
  disabled: y,
46
46
  children: [j, N]
47
- }), m[18] = _.blockName, m[19] = y, m[20] = N, m[21] = O, m[22] = j, m[23] = P) : P = m[23];
48
- let F = y || !_.blockName, I;
47
+ }), m[18] = _.alias, m[19] = y, m[20] = N, m[21] = O, m[22] = j, m[23] = P) : P = m[23];
48
+ let F = y || !_.alias, I;
49
49
  m[24] === y ? I = m[25] : (I = y ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(Play, { className: "h-4 w-4" }), m[24] = y, m[25] = I);
50
50
  let L;
51
51
  m[26] !== x || m[27] !== F || m[28] !== I ? (L = /* @__PURE__ */ jsx(Button, {
@@ -61,10 +61,10 @@ var SelectionView_default = (p) => {
61
61
  children: [P, L]
62
62
  }), m[30] = P, m[31] = L, m[32] = R) : R = m[32];
63
63
  let z;
64
- m[33] === v.blockName ? z = m[34] : (z = v.blockName && /* @__PURE__ */ jsx("p", {
64
+ m[33] === v.alias ? z = m[34] : (z = v.alias && /* @__PURE__ */ jsx("p", {
65
65
  className: "mt-1 flex items-center gap-1 text-sm text-red-500",
66
- children: v.blockName
67
- }), m[33] = v.blockName, m[34] = z);
66
+ children: v.alias
67
+ }), m[33] = v.alias, m[34] = z);
68
68
  let B;
69
69
  m[35] !== R || m[36] !== z ? (B = /* @__PURE__ */ jsxs("div", {
70
70
  className: "space-y-2",
@@ -79,7 +79,7 @@ var SelectionView_default = (p) => {
79
79
  className: "bg-muted/50 border-border mt-4 rounded-lg border p-4",
80
80
  children: [/* @__PURE__ */ jsx("h3", {
81
81
  className: "text-foreground mb-1 text-sm font-medium",
82
- children: C.title || C.blockName
82
+ children: C.title || C.alias
83
83
  }), C.description && /* @__PURE__ */ jsx("p", {
84
84
  className: "text-muted-foreground text-sm leading-relaxed",
85
85
  children: C.description
@@ -98,8 +98,8 @@ var SelectionView_default = (p) => {
98
98
  };
99
99
  function _temp(e) {
100
100
  return /* @__PURE__ */ jsx(SelectItem, {
101
- value: e.blockName,
102
- children: e.title ?? e.blockName
103
- }, e.blockName);
101
+ value: e.alias,
102
+ children: e.title ?? e.alias
103
+ }, e.alias);
104
104
  }
105
105
  export { SelectionView_default as default };
@@ -1,6 +1,6 @@
1
- import { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
1
+ import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
2
2
  import { useApiClient } from "./useApi.js";
3
3
  import { useIsMobile } from "./use-mobile.js";
4
- import { useAvailableEnvironments, usePipelineConfig, useWorkspaceConfig } from "./useConfig.js";
5
- import { useBatchDeletePipeline, useChildPipelines, useCreatePipeline, useDeletePipeline, useFilterPipelines, usePipeline, usePipelineConfigByName, usePipelineSource, useUpdatePipeline } from "./usePipelines.js";
4
+ import { useAvailableEnvironments, useWorkflowConfig, useWorkspaceConfig } from "./useConfig.js";
5
+ import { useBatchDeleteWorkflows, useChildWorkflows, useCreateWorkflow, useDeleteWorkflow, useFilterWorkflows, useUpdateWorkflow, useWorkflow, useWorkflowCheckpoints, useWorkflowConfigByName, useWorkflowSource } from "./useWorkflows.js";
6
6
  import { useBatchDeleteWorkspaces, useCreateWorkspace, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace, useUpdateWorkspace, useWorkspace } from "./useWorkspaces.js";
@@ -7,11 +7,11 @@ function getHealthCacheKey(e) {
7
7
  function getWorkspaceTypesCacheKey(e) {
8
8
  return ["workspace-types", e];
9
9
  }
10
- function getPipelineTypesCacheKey(e, x) {
10
+ function getWorkflowTypesCacheKey(e, g) {
11
11
  return [
12
- "pipeline-types",
12
+ "workflowTypes",
13
13
  e,
14
- x
14
+ g
15
15
  ];
16
16
  }
17
17
  function getAvailableEnvironmentsCacheKey(e) {
@@ -24,115 +24,81 @@ function getDashboardStatsCacheKey(e) {
24
24
  e
25
25
  ];
26
26
  }
27
- function getPipelineCacheKey(e, x) {
27
+ function getWorkflowCacheKey(e, g) {
28
28
  return [
29
- "pipeline",
29
+ "workflow",
30
30
  e,
31
- x
31
+ g
32
32
  ];
33
33
  }
34
- function getPipelinesCacheKey(e) {
35
- return ["pipelines", e];
34
+ function getWorkflowsCacheKey(e) {
35
+ return ["workflows", e];
36
36
  }
37
- function getPipelinesChildrenCacheKey(e, x) {
37
+ function getChildWorkflowsCacheKey(e, g) {
38
38
  return [
39
- "pipelines",
40
- "children",
39
+ "childWorkflows",
41
40
  e,
42
- x
41
+ g
43
42
  ];
44
43
  }
45
- function getPipelineConfigCacheKey(e, x, S) {
44
+ function getWorkflowConfigCacheKey(e, g) {
46
45
  return [
47
- "pipelineConfig",
46
+ "workflowConfig",
48
47
  e,
49
- x,
50
- S
48
+ g
51
49
  ];
52
50
  }
53
- function getPipelineSourceCacheKey(e, x, S) {
51
+ function getWorkflowSourceCacheKey(e, g) {
54
52
  return [
55
- "pipelineSource",
53
+ "workflowSource",
56
54
  e,
57
- x,
58
- S
55
+ g
59
56
  ];
60
57
  }
61
- function getWorkspaceCacheKey(e, x) {
58
+ function getWorkspaceCacheKey(e, g) {
62
59
  return [
63
60
  "workspace",
64
61
  e,
65
- x
62
+ g
66
63
  ];
67
64
  }
68
65
  function getWorkspacesCacheKey(e) {
69
66
  return ["workspaces", e];
70
67
  }
71
- function getWorkflowCacheKey(e, x) {
72
- return [
73
- "workflow",
74
- e,
75
- x
76
- ];
77
- }
78
- function getWorkflowsCacheKey(e, x) {
68
+ function getDocumentCacheKey(e, g) {
79
69
  return [
80
- "workflows",
81
- e,
82
- x
83
- ];
84
- }
85
- function getWorkflowsByPipelineCacheKey(e, x) {
86
- return [
87
- "workflows-by-pipeline",
88
- e,
89
- x
90
- ];
91
- }
92
- function getAllWorkflowsCacheKey(e) {
93
- return ["all-workflows", e];
94
- }
95
- function getNamespaceCacheKey(e, x) {
96
- return [
97
- "namespace",
98
- e,
99
- x
100
- ];
101
- }
102
- function getNamespacesByPipelineCacheKey(e, x) {
103
- return [
104
- "namespaces",
70
+ "document",
105
71
  e,
106
- x
72
+ g
107
73
  ];
108
74
  }
109
- function getDocumentCacheKey(e, x) {
75
+ function getDocumentsCacheKey(e, g) {
110
76
  return [
111
- "document",
77
+ "documents",
112
78
  e,
113
- x
79
+ g
114
80
  ];
115
81
  }
116
- function getDocumentsCacheKey(e, x) {
82
+ function getSecretsCacheKey(e, g) {
117
83
  return [
118
- "documents",
84
+ "secrets",
119
85
  e,
120
- x
86
+ g
121
87
  ];
122
88
  }
123
- function getFileTreeCacheKey(e, x) {
89
+ function getFileTreeCacheKey(e, g) {
124
90
  return [
125
91
  "fileTree",
126
92
  e,
127
- x
93
+ g
128
94
  ];
129
95
  }
130
- function getFileContentCacheKey(e, x, S) {
96
+ function getFileContentCacheKey(e, g, _) {
131
97
  return [
132
98
  "fileContent",
133
99
  e,
134
- x,
135
- S
100
+ g,
101
+ _
136
102
  ];
137
103
  }
138
- export { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
104
+ export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
@@ -1,4 +1,4 @@
1
- import { getAvailableEnvironmentsCacheKey, getPipelineTypesCacheKey, getWorkspaceTypesCacheKey } from "./query-keys.js";
1
+ import { getAvailableEnvironmentsCacheKey, getWorkflowTypesCacheKey, getWorkspaceTypesCacheKey } from "./query-keys.js";
2
2
  import { useApiClient } from "./useApi.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { useQuery } from "@tanstack/react-query";
@@ -13,11 +13,11 @@ function useWorkspaceConfig() {
13
13
  queryFn: l
14
14
  }, e[4] = s, e[5] = l, e[6] = u) : u = e[6], useQuery(u);
15
15
  }
16
- function usePipelineConfig(e) {
16
+ function useWorkflowConfig(e) {
17
17
  let a = c(10), { envKey: o, api: s } = useApiClient(), l;
18
- a[0] !== o || a[1] !== e ? (l = getPipelineTypesCacheKey(o, e), a[0] = o, a[1] = e, a[2] = l) : l = a[2];
18
+ a[0] !== o || a[1] !== e ? (l = getWorkflowTypesCacheKey(o, e), a[0] = o, a[1] = e, a[2] = l) : l = a[2];
19
19
  let u;
20
- a[3] !== s || a[4] !== e ? (u = () => s.config.getPipelineTypesByWorkspace({ workspaceBlockName: e }), a[3] = s, a[4] = e, a[5] = u) : u = a[5];
20
+ a[3] !== s || a[4] !== e ? (u = () => s.config.getWorkflowTypesByWorkspace({ workspaceBlockName: e }), a[3] = s, a[4] = e, a[5] = u) : u = a[5];
21
21
  let d = !!e, f;
22
22
  return a[6] !== l || a[7] !== u || a[8] !== d ? (f = {
23
23
  queryKey: l,
@@ -37,4 +37,4 @@ function useAvailableEnvironments(i) {
37
37
  enabled: d
38
38
  }, a[4] = l, a[5] = u, a[6] = d, a[7] = f) : f = a[7], useQuery(f);
39
39
  }
40
- export { useAvailableEnvironments, usePipelineConfig, useWorkspaceConfig };
40
+ export { useAvailableEnvironments, useWorkflowConfig, useWorkspaceConfig };
@@ -1,13 +1,13 @@
1
- import { getPipelinesCacheKey } from "./query-keys.js";
1
+ import { getWorkflowsCacheKey } from "./query-keys.js";
2
2
  import { useApiClient } from "./useApi.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { useMutation, useQueryClient } from "@tanstack/react-query";
5
- function useRunPipeline() {
5
+ function useRunWorkflow() {
6
6
  let a = c(8), { envKey: o, api: s } = useApiClient(), l = useQueryClient(), u;
7
- a[0] === s ? u = a[1] : (u = (e) => s.processor.runPipeline(e), a[0] = s, a[1] = u);
7
+ a[0] === s ? u = a[1] : (u = (e) => s.processor.runWorkflow(e), a[0] = s, a[1] = u);
8
8
  let d;
9
9
  a[2] !== o || a[3] !== l ? (d = () => {
10
- l.invalidateQueries({ queryKey: getPipelinesCacheKey(o) });
10
+ l.invalidateQueries({ queryKey: getWorkflowsCacheKey(o) });
11
11
  }, a[2] = o, a[3] = l, a[4] = d) : d = a[4];
12
12
  let f;
13
13
  return a[5] !== u || a[6] !== d ? (f = {
@@ -15,4 +15,4 @@ function useRunPipeline() {
15
15
  onSuccess: d
16
16
  }, a[5] = u, a[6] = d, a[7] = f) : f = a[7], useMutation(f);
17
17
  }
18
- export { useRunPipeline };
18
+ export { useRunWorkflow };
@@ -0,0 +1,69 @@
1
+ import { getSecretsCacheKey } from "./query-keys.js";
2
+ import { useApiClient } from "./useApi.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
5
+ function useWorkspaceSecrets(r) {
6
+ let a = c(10), { envKey: o, api: s } = useApiClient(), l;
7
+ a[0] !== o || a[1] !== r ? (l = getSecretsCacheKey(o, r), a[0] = o, a[1] = r, a[2] = l) : l = a[2];
8
+ let u;
9
+ a[3] !== s || a[4] !== r ? (u = () => s.secrets.getByWorkspaceId({ workspaceId: r }), a[3] = s, a[4] = r, a[5] = u) : u = a[5];
10
+ let d = !!r, f;
11
+ return a[6] !== l || a[7] !== u || a[8] !== d ? (f = {
12
+ queryKey: l,
13
+ queryFn: u,
14
+ enabled: d
15
+ }, a[6] = l, a[7] = u, a[8] = d, a[9] = f) : f = a[9], useQuery(f);
16
+ }
17
+ function useCreateSecret() {
18
+ let i = c(8), { envKey: o, api: s } = useApiClient(), l = useQueryClient(), u;
19
+ i[0] === s ? u = i[1] : (u = (e) => s.secrets.create(e), i[0] = s, i[1] = u);
20
+ let d;
21
+ i[2] !== o || i[3] !== l ? (d = (t, n) => {
22
+ l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
23
+ }, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
24
+ let f;
25
+ return i[5] !== u || i[6] !== d ? (f = {
26
+ mutationFn: u,
27
+ onSuccess: d
28
+ }, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
29
+ }
30
+ function useUpdateSecret() {
31
+ let i = c(8), { envKey: o, api: s } = useApiClient(), l = useQueryClient(), u;
32
+ i[0] === s ? u = i[1] : (u = (e) => s.secrets.update(e), i[0] = s, i[1] = u);
33
+ let d;
34
+ i[2] !== o || i[3] !== l ? (d = (t, n) => {
35
+ l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
36
+ }, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
37
+ let f;
38
+ return i[5] !== u || i[6] !== d ? (f = {
39
+ mutationFn: u,
40
+ onSuccess: d
41
+ }, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
42
+ }
43
+ function useUpsertSecret() {
44
+ let i = c(8), { envKey: o, api: s } = useApiClient(), l = useQueryClient(), u;
45
+ i[0] === s ? u = i[1] : (u = (e) => s.secrets.upsert(e), i[0] = s, i[1] = u);
46
+ let d;
47
+ i[2] !== o || i[3] !== l ? (d = (t, n) => {
48
+ l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
49
+ }, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
50
+ let f;
51
+ return i[5] !== u || i[6] !== d ? (f = {
52
+ mutationFn: u,
53
+ onSuccess: d
54
+ }, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
55
+ }
56
+ function useDeleteSecret() {
57
+ let i = c(8), { envKey: o, api: s } = useApiClient(), l = useQueryClient(), u;
58
+ i[0] === s ? u = i[1] : (u = (e) => s.secrets.delete(e), i[0] = s, i[1] = u);
59
+ let d;
60
+ i[2] !== o || i[3] !== l ? (d = (t, n) => {
61
+ l.invalidateQueries({ queryKey: getSecretsCacheKey(o, n.workspaceId) });
62
+ }, i[2] = o, i[3] = l, i[4] = d) : d = i[4];
63
+ let f;
64
+ return i[5] !== u || i[6] !== d ? (f = {
65
+ mutationFn: u,
66
+ onSuccess: d
67
+ }, i[5] = u, i[6] = d, i[7] = f) : f = i[7], useMutation(f);
68
+ }
69
+ export { useCreateSecret, useDeleteSecret, useUpdateSecret, useUpsertSecret, useWorkspaceSecrets };