@loopstack/loopstack-studio 0.23.0 → 0.24.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 (90) hide show
  1. package/dist/api/index.js +12 -10
  2. package/dist/api/secrets.js +16 -0
  3. package/dist/components/dynamic-form/ArrayController.js +68 -64
  4. package/dist/components/dynamic-form/Form.js +56 -27
  5. package/dist/components/dynamic-form/FormElement.js +1 -1
  6. package/dist/components/dynamic-form/FormElementHeader.js +2 -2
  7. package/dist/components/dynamic-form/InputController.js +3 -1
  8. package/dist/components/dynamic-form/ObjectController.js +24 -21
  9. package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
  10. package/dist/components/dynamic-form/fields/InputField.js +20 -19
  11. package/dist/components/dynamic-form/fields/MarkdownViewField.js +20 -0
  12. package/dist/components/dynamic-form/fields/RadioField.js +18 -18
  13. package/dist/components/dynamic-form/fields/SelectField.js +19 -19
  14. package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
  15. package/dist/components/layout/MainLayout.js +18 -31
  16. package/dist/components/layout/StudioSidebar.js +168 -108
  17. package/dist/components/page/PageBreadcrumbs.js +79 -32
  18. package/dist/components/ui-widgets/UiWidget.js +36 -27
  19. package/dist/components/ui-widgets/widgets/SecretInput.js +42 -0
  20. package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +80 -4
  21. package/dist/features/code-explorer/components/FileContentViewer.js +47 -30
  22. package/dist/features/code-explorer/components/FileTabsBar.js +3 -190
  23. package/dist/features/code-explorer/components/FileTabsBarBase.js +190 -0
  24. package/dist/features/code-explorer/index.js +2 -2
  25. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +2 -162
  26. package/dist/features/code-explorer/utils/fileIcons.js +7 -4
  27. package/dist/features/debug/components/PipelineFlowViewer.js +46 -45
  28. package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +19 -19
  29. package/dist/features/documents/DocumentRenderer.js +20 -15
  30. package/dist/features/documents/components/DocumentList.js +5 -1
  31. package/dist/features/documents/renderers/AiMessage.js +11 -11
  32. package/dist/features/documents/renderers/ClaudeMessage.js +96 -0
  33. package/dist/features/documents/renderers/DocumentFormRenderer.js +17 -11
  34. package/dist/features/workbench/Workbench.js +64 -80
  35. package/dist/features/workbench/WorkflowItem.js +5 -5
  36. package/dist/features/workbench/components/RemoteFileTabsBar.js +18 -0
  37. package/dist/features/workbench/components/RemoteFileTree.js +90 -0
  38. package/dist/features/workbench/components/WorkbenchFilesPanel.js +67 -0
  39. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +57 -49
  40. package/dist/features/workbench/components/WorkbenchFlowPanel.js +2 -2
  41. package/dist/features/workbench/components/WorkbenchIconSidebar.js +48 -28
  42. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
  43. package/dist/features/workbench/hooks/useWorkflowData.js +4 -4
  44. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +160 -0
  45. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +46 -43
  46. package/dist/features/workspaces/components/PipelineForm.js +1 -1
  47. package/dist/features/workspaces/components/WorkspaceHomePage.js +93 -0
  48. package/dist/hooks/index.js +1 -1
  49. package/dist/hooks/query-keys.js +41 -34
  50. package/dist/hooks/useFiles.js +1 -43
  51. package/dist/hooks/useSecrets.js +69 -0
  52. package/dist/index.d.ts +49 -0
  53. package/dist/index.js +3 -2
  54. package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
  55. package/dist/pages/DashboardPage.js +87 -35
  56. package/dist/pages/EmbedWorkbenchPage.js +43 -39
  57. package/dist/pages/PipelineDebugPage.js +1 -1
  58. package/dist/pages/PreviewWorkbenchPage.js +167 -70
  59. package/dist/pages/WorkspacePage.js +102 -50
  60. package/dist/pages/WorkspaceRunsPage.js +71 -0
  61. package/dist/routing/LocalRouter.js +6 -0
  62. package/dist/types/ai.types.js +13 -0
  63. package/package.json +2 -3
  64. package/dist/node_modules/@ai-sdk/provider/dist/index.js +0 -65
  65. package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
  66. package/dist/node_modules/ai/dist/index.js +0 -1083
  67. package/dist/node_modules/zod/v3/ZodError.js +0 -79
  68. package/dist/node_modules/zod/v3/errors.js +0 -6
  69. package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
  70. package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
  71. package/dist/node_modules/zod/v3/helpers/util.js +0 -72
  72. package/dist/node_modules/zod/v3/locales/en.js +0 -58
  73. package/dist/node_modules/zod/v3/types.js +0 -2425
  74. package/dist/node_modules/zod/v4/classic/errors.js +0 -21
  75. package/dist/node_modules/zod/v4/classic/iso.js +0 -29
  76. package/dist/node_modules/zod/v4/classic/parse.js +0 -4
  77. package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
  78. package/dist/node_modules/zod/v4/core/api.js +0 -532
  79. package/dist/node_modules/zod/v4/core/checks.js +0 -283
  80. package/dist/node_modules/zod/v4/core/core.js +0 -44
  81. package/dist/node_modules/zod/v4/core/doc.js +0 -21
  82. package/dist/node_modules/zod/v4/core/errors.js +0 -40
  83. package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
  84. package/dist/node_modules/zod/v4/core/parse.js +0 -66
  85. package/dist/node_modules/zod/v4/core/regexes.js +0 -28
  86. package/dist/node_modules/zod/v4/core/registries.js +0 -38
  87. package/dist/node_modules/zod/v4/core/schemas.js +0 -863
  88. package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
  89. package/dist/node_modules/zod/v4/core/util.js +0 -267
  90. package/dist/node_modules/zod/v4/core/versions.js +0 -6
@@ -0,0 +1,93 @@
1
+ import { useStudio } from "../../../providers/StudioProvider.js";
2
+ import { useCreatePipeline } from "../../../hooks/usePipelines.js";
3
+ import { Button } from "../../../components/ui/button.js";
4
+ import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
5
+ import Form_default from "../../../components/dynamic-form/Form.js";
6
+ import { useRunPipeline } from "../../../hooks/useProcessor.js";
7
+ import { c } from "react/compiler-runtime";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { Loader2, Play } from "lucide-react";
10
+ import { useForm } from "react-hook-form";
11
+ var WorkspaceHomePage_default = (p) => {
12
+ let m = c(39), { workspace: h, action: g } = p, { router: _ } = useStudio(), v = useCreatePipeline(), y = useRunPipeline(), b;
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;
15
+ m[2] === Symbol.for("react.memo_cache_sentinel") ? (D = {
16
+ defaultValues: {},
17
+ mode: "onChange"
18
+ }, m[2] = D) : D = m[2];
19
+ let O = useForm(D), k = v.isPending || y.isPending, A = !!T, j;
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,
23
+ title: null,
24
+ workspaceId: h.id,
25
+ transition: null,
26
+ args: A ? t : void 0
27
+ } }, { onSuccess: (t) => {
28
+ y.mutate({
29
+ pipelineId: t.id,
30
+ runPipelinePayloadDto: {},
31
+ force: !0
32
+ }, { onSuccess: () => {
33
+ _.navigateToPipeline(t.id);
34
+ } });
35
+ } });
36
+ }, m[3] = v, m[4] = A, m[5] = _, m[6] = y, m[7] = S, m[8] = h, m[9] = j) : j = m[9];
37
+ let M = j, N;
38
+ m[10] !== O || m[11] !== M ? (N = () => {
39
+ O.handleSubmit(M)();
40
+ }, m[10] = O, m[11] = M, m[12] = N) : N = m[12];
41
+ let P = N, F;
42
+ m[13] === v.error ? F = m[14] : (F = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: v.error }), m[13] = v.error, m[14] = F);
43
+ let I;
44
+ m[15] === y.error ? I = m[16] : (I = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: y.error }), m[15] = y.error, m[16] = I);
45
+ let L;
46
+ m[17] === C ? L = m[18] : (L = C && /* @__PURE__ */ jsx("h2", {
47
+ className: "mb-2 text-center text-3xl font-bold tracking-tight",
48
+ children: C
49
+ }), m[17] = C, m[18] = L);
50
+ let R;
51
+ m[19] === w ? R = m[20] : (R = w && /* @__PURE__ */ jsx("p", {
52
+ className: "text-muted-foreground mb-8 text-center text-sm",
53
+ children: w
54
+ }), m[19] = w, m[20] = R);
55
+ let z;
56
+ m[21] !== O || m[22] !== A || m[23] !== E || m[24] !== T ? (z = A ? /* @__PURE__ */ jsx("div", {
57
+ className: "mb-6 w-full",
58
+ children: /* @__PURE__ */ jsx(Form_default, {
59
+ form: O,
60
+ schema: T,
61
+ ui: E,
62
+ disabled: !1,
63
+ viewOnly: !1
64
+ })
65
+ }) : null, m[21] = O, m[22] = A, m[23] = E, m[24] = T, m[25] = z) : z = m[25];
66
+ let B;
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
+ let V;
69
+ m[28] !== k || m[29] !== P || m[30] !== B ? (V = /* @__PURE__ */ jsx("div", {
70
+ className: "flex w-full justify-end",
71
+ children: /* @__PURE__ */ jsxs(Button, {
72
+ variant: "default",
73
+ disabled: k,
74
+ onClick: P,
75
+ size: "lg",
76
+ className: "font-medium",
77
+ children: [B, "Run"]
78
+ })
79
+ }), m[28] = k, m[29] = P, m[30] = B, m[31] = V) : V = m[31];
80
+ let H;
81
+ return m[32] !== V || m[33] !== F || m[34] !== I || m[35] !== L || m[36] !== R || m[37] !== z ? (H = /* @__PURE__ */ jsxs("div", {
82
+ className: "mx-auto flex min-h-[60vh] max-w-2xl flex-col items-center justify-center",
83
+ children: [
84
+ F,
85
+ I,
86
+ L,
87
+ R,
88
+ z,
89
+ V
90
+ ]
91
+ }), m[32] = V, m[33] = F, m[34] = I, m[35] = L, m[36] = R, m[37] = z, m[38] = H) : H = m[38], H;
92
+ };
93
+ export { WorkspaceHomePage_default as default };
@@ -1,4 +1,4 @@
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 { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
2
2
  import { useApiClient } from "./useApi.js";
3
3
  import { useIsMobile } from "./use-mobile.js";
4
4
  import { useAvailableEnvironments, usePipelineConfig, useWorkspaceConfig } from "./useConfig.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 getPipelineTypesCacheKey(e, S) {
11
11
  return [
12
12
  "pipeline-types",
13
13
  e,
14
- x
14
+ S
15
15
  ];
16
16
  }
17
17
  function getAvailableEnvironmentsCacheKey(e) {
@@ -24,115 +24,122 @@ function getDashboardStatsCacheKey(e) {
24
24
  e
25
25
  ];
26
26
  }
27
- function getPipelineCacheKey(e, x) {
27
+ function getPipelineCacheKey(e, S) {
28
28
  return [
29
29
  "pipeline",
30
30
  e,
31
- x
31
+ S
32
32
  ];
33
33
  }
34
34
  function getPipelinesCacheKey(e) {
35
35
  return ["pipelines", e];
36
36
  }
37
- function getPipelinesChildrenCacheKey(e, x) {
37
+ function getPipelinesChildrenCacheKey(e, S) {
38
38
  return [
39
39
  "pipelines",
40
40
  "children",
41
41
  e,
42
- x
42
+ S
43
43
  ];
44
44
  }
45
- function getPipelineConfigCacheKey(e, x, S) {
45
+ function getPipelineConfigCacheKey(e, S, C) {
46
46
  return [
47
47
  "pipelineConfig",
48
48
  e,
49
- x,
50
- S
49
+ S,
50
+ C
51
51
  ];
52
52
  }
53
- function getPipelineSourceCacheKey(e, x, S) {
53
+ function getPipelineSourceCacheKey(e, S, C) {
54
54
  return [
55
55
  "pipelineSource",
56
56
  e,
57
- x,
58
- S
57
+ S,
58
+ C
59
59
  ];
60
60
  }
61
- function getWorkspaceCacheKey(e, x) {
61
+ function getWorkspaceCacheKey(e, S) {
62
62
  return [
63
63
  "workspace",
64
64
  e,
65
- x
65
+ S
66
66
  ];
67
67
  }
68
68
  function getWorkspacesCacheKey(e) {
69
69
  return ["workspaces", e];
70
70
  }
71
- function getWorkflowCacheKey(e, x) {
71
+ function getWorkflowCacheKey(e, S) {
72
72
  return [
73
73
  "workflow",
74
74
  e,
75
- x
75
+ S
76
76
  ];
77
77
  }
78
- function getWorkflowsCacheKey(e, x) {
78
+ function getWorkflowsCacheKey(e, S) {
79
79
  return [
80
80
  "workflows",
81
81
  e,
82
- x
82
+ S
83
83
  ];
84
84
  }
85
- function getWorkflowsByPipelineCacheKey(e, x) {
85
+ function getWorkflowsByPipelineCacheKey(e, S) {
86
86
  return [
87
87
  "workflows-by-pipeline",
88
88
  e,
89
- x
89
+ S
90
90
  ];
91
91
  }
92
92
  function getAllWorkflowsCacheKey(e) {
93
93
  return ["all-workflows", e];
94
94
  }
95
- function getNamespaceCacheKey(e, x) {
95
+ function getNamespaceCacheKey(e, S) {
96
96
  return [
97
97
  "namespace",
98
98
  e,
99
- x
99
+ S
100
100
  ];
101
101
  }
102
- function getNamespacesByPipelineCacheKey(e, x) {
102
+ function getNamespacesByPipelineCacheKey(e, S) {
103
103
  return [
104
104
  "namespaces",
105
105
  e,
106
- x
106
+ S
107
107
  ];
108
108
  }
109
- function getDocumentCacheKey(e, x) {
109
+ function getDocumentCacheKey(e, S) {
110
110
  return [
111
111
  "document",
112
112
  e,
113
- x
113
+ S
114
114
  ];
115
115
  }
116
- function getDocumentsCacheKey(e, x) {
116
+ function getDocumentsCacheKey(e, S) {
117
117
  return [
118
118
  "documents",
119
119
  e,
120
- x
120
+ S
121
+ ];
122
+ }
123
+ function getSecretsCacheKey(e, S) {
124
+ return [
125
+ "secrets",
126
+ e,
127
+ S
121
128
  ];
122
129
  }
123
- function getFileTreeCacheKey(e, x) {
130
+ function getFileTreeCacheKey(e, S) {
124
131
  return [
125
132
  "fileTree",
126
133
  e,
127
- x
134
+ S
128
135
  ];
129
136
  }
130
- function getFileContentCacheKey(e, x, S) {
137
+ function getFileContentCacheKey(e, S, C) {
131
138
  return [
132
139
  "fileContent",
133
140
  e,
134
- x,
135
- S
141
+ S,
142
+ C
136
143
  ];
137
144
  }
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 };
145
+ export { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
@@ -1,45 +1,3 @@
1
- import { getFileContentCacheKey, getFileTreeCacheKey } from "./query-keys.js";
2
- import { useApiClient } from "./useApi.js";
1
+ import "./useApi.js";
3
2
  import { c } from "react/compiler-runtime";
4
3
  import { useQuery } from "@tanstack/react-query";
5
- function useFileTree(e, a) {
6
- let s = c(10), l = a === void 0 ? !0 : a, { envKey: u, api: d } = useApiClient(), f;
7
- s[0] !== u || s[1] !== e ? (f = getFileTreeCacheKey(u, e), s[0] = u, s[1] = e, s[2] = f) : f = s[2];
8
- let p;
9
- s[3] !== d || s[4] !== e ? (p = () => {
10
- if (!e) throw Error("Pipeline ID is required");
11
- return d.pipelines.getFileTree({ pipelineId: e });
12
- }, s[3] = d, s[4] = e, s[5] = p) : p = s[5];
13
- let m = !!e && l, h;
14
- return s[6] !== f || s[7] !== p || s[8] !== m ? (h = {
15
- queryKey: f,
16
- queryFn: p,
17
- enabled: m,
18
- staleTime: 3e5,
19
- refetchOnMount: !1,
20
- refetchOnWindowFocus: !1,
21
- placeholderData: _temp
22
- }, s[6] = f, s[7] = p, s[8] = m, s[9] = h) : h = s[9], useQuery(h);
23
- }
24
- function _temp(e) {
25
- return e;
26
- }
27
- function useFileContent(i, a, o) {
28
- let s = c(12), l = o === void 0 ? !0 : o, { envKey: u, api: d } = useApiClient(), f;
29
- s[0] !== u || s[1] !== a || s[2] !== i ? (f = getFileContentCacheKey(u, i, a), s[0] = u, s[1] = a, s[2] = i, s[3] = f) : f = s[3];
30
- let p;
31
- s[4] !== d || s[5] !== a || s[6] !== i ? (p = () => {
32
- if (!i || !a) throw Error("Pipeline ID and file path are required");
33
- return d.pipelines.getFileContent({
34
- pipelineId: i,
35
- filePath: a
36
- });
37
- }, s[4] = d, s[5] = a, s[6] = i, s[7] = p) : p = s[7];
38
- let m = !!i && !!a && l, h;
39
- return s[8] !== f || s[9] !== p || s[10] !== m ? (h = {
40
- queryKey: f,
41
- queryFn: p,
42
- enabled: m
43
- }, s[8] = f, s[9] = p, s[10] = m, s[11] = h) : h = s[11], useQuery(h);
44
- }
45
- export { useFileContent, useFileTree };
@@ -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 };
package/dist/index.d.ts CHANGED
@@ -334,6 +334,41 @@ declare function createApi(http: AxiosInstance): {
334
334
  force?: boolean;
335
335
  }) => Promise<void>;
336
336
  };
337
+ secrets: {
338
+ getByWorkspaceId: (params: {
339
+ workspaceId: string;
340
+ }) => Promise<SecretItem[]>;
341
+ create: (params: {
342
+ workspaceId: string;
343
+ key: string;
344
+ value: string;
345
+ }) => Promise<{
346
+ id: string;
347
+ key: string;
348
+ }>;
349
+ upsert: (params: {
350
+ workspaceId: string;
351
+ key: string;
352
+ value: string;
353
+ }) => Promise<{
354
+ id: string;
355
+ key: string;
356
+ }>;
357
+ update: (params: {
358
+ workspaceId: string;
359
+ id: string;
360
+ value?: string;
361
+ }) => Promise<{
362
+ id: string;
363
+ key: string;
364
+ }>;
365
+ delete: (params: {
366
+ workspaceId: string;
367
+ id: string;
368
+ }) => Promise<{
369
+ success: boolean;
370
+ }>;
371
+ };
337
372
  workflows: {
338
373
  getById: (params: {
339
374
  id: string;
@@ -725,6 +760,8 @@ export declare function getPipelineSourceCacheKey(envKey: string, workspaceBlock
725
760
 
726
761
  export declare function getPipelineTypesCacheKey(envKey: string, workspaceBlockName: string): string[];
727
762
 
763
+ export declare function getSecretsCacheKey(envKey: string, workspaceId: string): string[];
764
+
728
765
  export declare function getWorkflowCacheKey(envKey: string, workflowId: string): string[];
729
766
 
730
767
  export declare function getWorkflowsByPipelineCacheKey(envKey: string, pipelineId: string): string[];
@@ -850,6 +887,8 @@ export declare class LocalRouter implements StudioRouter {
850
887
  navigateToPipelineDebug(pipelineId: string): Promise<void>;
851
888
  navigateToWorkflow(pipelineId: string, workflowId: string, clickId: string | undefined): Promise<void>;
852
889
  navigateToPipelineNamespace(workspaceId: string, pipelineId: string, namespaceId: string): Promise<void>;
890
+ getWorkspaceRuns(workspaceId: string): string;
891
+ navigateToWorkspaceRuns(workspaceId: string): Promise<void>;
853
892
  getEmbedPipeline(pipelineId: string): string;
854
893
  getPreviewPipeline(pipelineId: string): string;
855
894
  getCurrentEnvironmentId(): string;
@@ -953,6 +992,12 @@ export declare function ScrollArea({ className, children, ...props }: React_2.Co
953
992
 
954
993
  export declare function ScrollBar({ className, orientation, ...props }: React_2.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): JSX.Element;
955
994
 
995
+ declare interface SecretItem {
996
+ id: string;
997
+ key: string;
998
+ hasValue: boolean;
999
+ }
1000
+
956
1001
  export declare function Select({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
957
1002
 
958
1003
  export declare function SelectContent({ className, children, position, align, ...props }: React_2.ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
@@ -1133,6 +1178,8 @@ export declare interface StudioRouter {
1133
1178
  navigateToPipelineDebug(pipelineId: string): Promise<void>;
1134
1179
  navigateToWorkflow(pipelineId: string, workflowId: string, clickId: string | undefined): Promise<void>;
1135
1180
  navigateToPipelineNamespace(workspaceId: string, pipelineId: string, namespaceId: string): Promise<void>;
1181
+ getWorkspaceRuns(workspaceId: string): string;
1182
+ navigateToWorkspaceRuns(workspaceId: string): Promise<void>;
1136
1183
  getEmbedPipeline(pipelineId: string): string;
1137
1184
  getPreviewPipeline(pipelineId: string): string;
1138
1185
  getCurrentEnvironmentId(): string;
@@ -1252,6 +1299,8 @@ export declare function WorkbenchPage({ previewPanelOpen, onPreviewPanelOpenChan
1252
1299
 
1253
1300
  export declare const WorkspacePage: () => JSX.Element;
1254
1301
 
1302
+ export declare const WorkspaceRunsPage: () => JSX.Element;
1303
+
1255
1304
  export declare function WorkspacesPage(): JSX.Element;
1256
1305
 
1257
1306
  export { }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
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 "./hooks/query-keys.js";
1
+ import { getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./hooks/query-keys.js";
2
2
  import { createApiClient } from "./services/createApiClient.js";
3
3
  import { eventBus } from "./services/eventEmitter.js";
4
4
  import "./services/index.js";
@@ -67,6 +67,7 @@ import { EnvironmentSlotSelector } from "./features/workspaces/components/Enviro
67
67
  import CreateWorkspace_default from "./features/workspaces/components/CreateWorkspace.js";
68
68
  import WorkspacesPage from "./pages/WorkspacesPage.js";
69
69
  import WorkspacePage_default from "./pages/WorkspacePage.js";
70
+ import WorkspaceRunsPage_default from "./pages/WorkspaceRunsPage.js";
70
71
  import "./features/workspaces/index.js";
71
72
  import WorkbenchPage from "./pages/WorkbenchPage.js";
72
73
  import PipelineDebugPage_default from "./pages/PipelineDebugPage.js";
@@ -81,4 +82,4 @@ import LocalHealthCheck_default from "./features/health/LocalHealthCheck.js";
81
82
  import EnvironmentEmbedRoot from "./app/EnvironmentEmbedRoot.js";
82
83
  import { StudioSidebar } from "./components/layout/StudioSidebar.js";
83
84
  import "./features/health/index.js";
84
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CreateWorkspace_default as CreateWorkspace, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, GoogleLogo, Input, InvalidationEventsProvider, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, PipelineDebugPage_default as PipelineDebugPage, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, SseProvider, StudioLandingPage, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkspacePage_default as WorkspacePage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey, useApiClient, useAvailableEnvironments, useBatchDeletePipeline, useBatchDeleteWorkspaces, useChildPipelines, useComponentOverrides, useCreatePipeline, useCreateWorkspace, useDeletePipeline, useDeleteWorkspace, useFilterPipelines, useFilterWorkspaces, useIsMobile, usePipeline, usePipelineConfig, usePipelineConfigByName, usePipelineSource, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useStudioOptional, useUpdatePipeline, useUpdateWorkspace, useWorkspace, useWorkspaceConfig };
85
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CreateWorkspace_default as CreateWorkspace, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, GoogleLogo, Input, InvalidationEventsProvider, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, PipelineDebugPage_default as PipelineDebugPage, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, SseProvider, StudioLandingPage, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkspacePage_default as WorkspacePage, WorkspaceRunsPage_default as WorkspaceRunsPage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, getAllWorkflowsCacheKey, getAvailableEnvironmentsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getNamespaceCacheKey, getNamespacesByPipelineCacheKey, getPipelineCacheKey, getPipelineConfigCacheKey, getPipelineSourceCacheKey, getPipelineTypesCacheKey, getPipelinesCacheKey, getPipelinesChildrenCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowsByPipelineCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey, useApiClient, useAvailableEnvironments, useBatchDeletePipeline, useBatchDeleteWorkspaces, useChildPipelines, useComponentOverrides, useCreatePipeline, useCreateWorkspace, useDeletePipeline, useDeleteWorkspace, useFilterPipelines, useFilterWorkspaces, useIsMobile, usePipeline, usePipelineConfig, usePipelineConfigByName, usePipelineSource, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useStudioOptional, useUpdatePipeline, useUpdateWorkspace, useWorkspace, useWorkspaceConfig };
@@ -3,9 +3,9 @@ import cc from "../../../../classcat/index.js";
3
3
  import { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, addEdge, adoptUserNodes, areSetsEqual, calculateNodePosition, createMarkerIds, defaultAriaLabelConfig, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitViewport, getBezierEdgeCenter, getBezierPath, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandlePosition, getHostForElement, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodesBounds, getNodesInside, getOverlappingArea, getSmoothStepPath, getStraightPath, getViewportForBounds, handleExpandParent, infiniteExtent, initialConnection, isEdgeBase, isEdgeVisible, isInputDOMNode, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, mergeAriaLabelConfig, nodeHasDimensions, nodeToRect, panBy, pointToRendererPoint, rendererPointToPoint, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals, withResolvers } from "../../../system/dist/esm/index.js";
4
4
  import { createContext, forwardRef, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { createPortal } from "react-dom";
6
7
  import { createWithEqualityFn, useStoreWithEqualityFn } from "zustand/traditional";
7
8
  import { shallow } from "zustand/shallow";
8
- import { createPortal } from "react-dom";
9
9
  var StoreContext = createContext(null), Provider$1 = StoreContext.Provider, zustandErrorMessage = errorMessages.error001();
10
10
  function useStore(e, t) {
11
11
  let n = useContext(StoreContext);