@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,66 +0,0 @@
1
- import { $ZodAsyncError, config } from "./core.js";
2
- import { captureStackTrace, finalizeIssue } from "./util.js";
3
- import { $ZodError, $ZodRealError } from "./errors.js";
4
- const _parse = (p) => (m, h, g, _) => {
5
- let v = g ? Object.assign(g, { async: !1 }) : { async: !1 }, y = m._zod.run({
6
- value: h,
7
- issues: []
8
- }, v);
9
- if (y instanceof Promise) throw new $ZodAsyncError();
10
- if (y.issues.length) {
11
- let e = new (_?.Err ?? p)(y.issues.map((e) => finalizeIssue(e, v, config())));
12
- throw captureStackTrace(e, _?.callee), e;
13
- }
14
- return y.value;
15
- }, _parseAsync = (e) => async (p, m, h, g) => {
16
- let _ = h ? Object.assign(h, { async: !0 }) : { async: !0 }, v = p._zod.run({
17
- value: m,
18
- issues: []
19
- }, _);
20
- if (v instanceof Promise && (v = await v), v.issues.length) {
21
- let p = new (g?.Err ?? e)(v.issues.map((e) => finalizeIssue(e, _, config())));
22
- throw captureStackTrace(p, g?.callee), p;
23
- }
24
- return v.value;
25
- }, _safeParse = (d) => (m, h, g) => {
26
- let _ = g ? {
27
- ...g,
28
- async: !1
29
- } : { async: !1 }, v = m._zod.run({
30
- value: h,
31
- issues: []
32
- }, _);
33
- if (v instanceof Promise) throw new $ZodAsyncError();
34
- return v.issues.length ? {
35
- success: !1,
36
- error: new (d ?? $ZodError)(v.issues.map((e) => finalizeIssue(e, _, config())))
37
- } : {
38
- success: !0,
39
- data: v.value
40
- };
41
- }, safeParse = /* @__PURE__ */ _safeParse($ZodRealError), _safeParseAsync = (e) => async (d, p, m) => {
42
- let h = m ? Object.assign(m, { async: !0 }) : { async: !0 }, g = d._zod.run({
43
- value: p,
44
- issues: []
45
- }, h);
46
- return g instanceof Promise && (g = await g), g.issues.length ? {
47
- success: !1,
48
- error: new e(g.issues.map((e) => finalizeIssue(e, h, config())))
49
- } : {
50
- success: !0,
51
- data: g.value
52
- };
53
- }, safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError), _encode = (e) => (u, d, f) => {
54
- let p = f ? Object.assign(f, { direction: "backward" }) : { direction: "backward" };
55
- return _parse(e)(u, d, p);
56
- }, _decode = (e) => (u, d, f) => _parse(e)(u, d, f), _encodeAsync = (e) => async (u, d, f) => {
57
- let p = f ? Object.assign(f, { direction: "backward" }) : { direction: "backward" };
58
- return _parseAsync(e)(u, d, p);
59
- }, _decodeAsync = (e) => async (u, d, f) => _parseAsync(e)(u, d, f), _safeEncode = (e) => (u, d, f) => {
60
- let p = f ? Object.assign(f, { direction: "backward" }) : { direction: "backward" };
61
- return _safeParse(e)(u, d, p);
62
- }, _safeDecode = (e) => (u, d, f) => _safeParse(e)(u, d, f), _safeEncodeAsync = (e) => async (u, d, f) => {
63
- let p = f ? Object.assign(f, { direction: "backward" }) : { direction: "backward" };
64
- return _safeParseAsync(e)(u, d, p);
65
- }, _safeDecodeAsync = (e) => async (u, d, f) => _safeParseAsync(e)(u, d, f);
66
- export { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, safeParse, safeParseAsync };
@@ -1,28 +0,0 @@
1
- const cuid = /^[cC][^\s-]{8,}$/, cuid2 = /^[0-9a-z]+$/, ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, xid = /^[0-9a-vA-V]{20}$/, ksuid = /^[A-Za-z0-9]{27}$/, nanoid = /^[a-zA-Z0-9_-]{21}$/, duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, uuid = (e) => e ? /* @__PURE__ */ RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
2
- var _emoji = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
3
- function emoji() {
4
- return new RegExp(_emoji, "u");
5
- }
6
- const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, base64url = /^[A-Za-z0-9_-]*$/, e164 = /^\+[1-9]\d{6,14}$/;
7
- var dateSource = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";
8
- const date = /* @__PURE__ */ RegExp(`^${dateSource}$`);
9
- function timeSource(e) {
10
- let O = "(?:[01]\\d|2[0-3]):[0-5]\\d";
11
- return typeof e.precision == "number" ? e.precision === -1 ? `${O}` : e.precision === 0 ? `${O}:[0-5]\\d` : `${O}:[0-5]\\d\\.\\d{${e.precision}}` : `${O}(?::[0-5]\\d(?:\\.\\d+)?)?`;
12
- }
13
- function time(e) {
14
- return /* @__PURE__ */ RegExp(`^${timeSource(e)}$`);
15
- }
16
- function datetime(e) {
17
- let O = timeSource({ precision: e.precision }), k = ["Z"];
18
- e.local && k.push(""), e.offset && k.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
19
- let A = `${O}(?:${k.join("|")})`;
20
- return /* @__PURE__ */ RegExp(`^${dateSource}T(?:${A})$`);
21
- }
22
- const string = (e) => {
23
- let O = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
24
- return /* @__PURE__ */ RegExp(`^${O}$`);
25
- }, integer = /^-?\d+$/, number = /^-?\d+(?:\.\d+)?$/, boolean = /^(?:true|false)$/i;
26
- var _null = /^null$/i;
27
- const lowercase = /^[^A-Z]*$/, uppercase = /^[^a-z]*$/;
28
- export { _null, base64, base64url, boolean, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, integer, ipv4, ipv6, ksuid, lowercase, nanoid, number, string, time, ulid, uppercase, uuid, xid };
@@ -1,38 +0,0 @@
1
- var _a, $ZodRegistry = class {
2
- constructor() {
3
- this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
4
- }
5
- add(e, ...t) {
6
- let n = t[0];
7
- return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
8
- }
9
- clear() {
10
- return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
11
- }
12
- remove(e) {
13
- let t = this._map.get(e);
14
- return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
15
- }
16
- get(e) {
17
- let t = e._zod.parent;
18
- if (t) {
19
- let n = { ...this.get(t) ?? {} };
20
- delete n.id;
21
- let r = {
22
- ...n,
23
- ...this._map.get(e)
24
- };
25
- return Object.keys(r).length ? r : void 0;
26
- }
27
- return this._map.get(e);
28
- }
29
- has(e) {
30
- return this._map.has(e);
31
- }
32
- };
33
- function registry() {
34
- return new $ZodRegistry();
35
- }
36
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
37
- const globalRegistry = globalThis.__zod_globalRegistry;
38
- export { globalRegistry };