@loopstack/loopstack-studio 0.33.0 → 0.35.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 (146) hide show
  1. package/dist/app/EnvironmentEmbedRoot.js +17 -25
  2. package/dist/components/layout/StudioSidebar.js +34 -34
  3. package/dist/components/messages/CompletionMessagePaper.js +25 -29
  4. package/dist/events/api-client-events.js +13 -1
  5. package/dist/events/index.js +1 -0
  6. package/dist/features/code-explorer/components/FileTabsBarBase.js +1 -1
  7. package/dist/features/code-explorer/index.js +0 -3
  8. package/dist/features/dashboard/AppLauncher.js +111 -64
  9. package/dist/features/debug/components/WorkflowFlowViewer.js +2 -1
  10. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +2 -1
  11. package/dist/features/documents/DocumentRenderer.js +42 -42
  12. package/dist/features/documents/components/DocumentList.js +1 -1
  13. package/dist/features/documents/document-details/DocumentDetails.js +0 -5
  14. package/dist/features/documents/renderers/DocumentFormRenderer.js +13 -12
  15. package/dist/features/documents/renderers/LinkMessageRenderer.js +2 -1
  16. package/dist/features/documents/renderers/useDocumentTransition.js +3 -2
  17. package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -18
  18. package/dist/features/feature-registry/available-features.js +3 -2
  19. package/dist/features/feature-registry/index.js +1 -1
  20. package/dist/features/file-explorer/components/FileExplorerPanel.js +64 -43
  21. package/dist/features/file-explorer/components/FileTabsBar.js +1 -1
  22. package/dist/features/file-explorer/components/FileTree.js +1 -1
  23. package/dist/features/file-explorer/file-explorer-feature.js +15 -7
  24. package/dist/features/file-explorer/hooks/useFileExplorer.js +41 -34
  25. package/dist/features/file-explorer/index.js +1 -1
  26. package/dist/features/file-explorer/providers/FileExplorerProvider.js +91 -89
  27. package/dist/features/git/components/WorkbenchGitPanel.js +7 -10
  28. package/dist/features/git/hooks/useGit.js +55 -57
  29. package/dist/features/health/LocalHealthCheck.js +46 -47
  30. package/dist/features/oauth/OAuthPromptRenderer.js +6 -5
  31. package/dist/features/runs/Runs.js +3 -2
  32. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
  33. package/dist/features/secrets/renderers/SecretInputRenderer.js +3 -2
  34. package/dist/features/workbench/Workbench.js +16 -16
  35. package/dist/features/workbench/WorkflowItem.js +5 -8
  36. package/dist/features/workbench/components/NewRunDialog.js +173 -171
  37. package/dist/features/workbench/components/PreviewEmptyState.js +1 -1
  38. package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
  39. package/dist/features/workbench/components/WorkbenchRunsPanel.js +2 -1
  40. package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
  41. package/dist/features/workbench/components/WorkflowForms.js +1 -1
  42. package/dist/features/workbench/components/WorkflowHistoryItem.js +2 -1
  43. package/dist/features/workbench/components/buttons/WorkflowButtons.js +8 -14
  44. package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +65 -132
  45. package/dist/features/workbench/hooks/useWorkflowData.js +8 -6
  46. package/dist/features/workbench/index.js +1 -1
  47. package/dist/features/workspaces/Workspaces.js +5 -3
  48. package/dist/features/workspaces/components/CreateWorkspace.js +7 -5
  49. package/dist/features/workspaces/components/ExecutionTimeline.js +69 -65
  50. package/dist/features/workspaces/components/WorkflowRunForm.js +6 -4
  51. package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
  52. package/dist/hooks/index.js +5 -5
  53. package/dist/hooks/useAuth.js +14 -53
  54. package/dist/hooks/useConfig.js +13 -37
  55. package/dist/hooks/useDocuments.js +5 -30
  56. package/dist/hooks/useEnvironments.js +34 -24
  57. package/dist/hooks/useProcessor.js +2 -31
  58. package/dist/hooks/useSecrets.js +71 -53
  59. package/dist/hooks/useWorkflows.js +43 -172
  60. package/dist/hooks/useWorkspaces.js +24 -130
  61. package/dist/index.d.ts +137 -481
  62. package/dist/index.js +15 -17
  63. package/dist/loopstack-studio.css +1 -1
  64. package/dist/packages/client/dist/client.js +35 -0
  65. package/dist/packages/client/dist/http.js +47 -0
  66. package/dist/packages/client/dist/index.js +15 -0
  67. package/dist/packages/client/dist/queries/query-keys.js +94 -0
  68. package/dist/packages/client/dist/queries/query-options.js +97 -0
  69. package/dist/packages/client/dist/resources/auth.js +10 -0
  70. package/dist/packages/client/dist/resources/config.js +11 -0
  71. package/dist/packages/client/dist/resources/dashboard.js +4 -0
  72. package/dist/packages/client/dist/resources/documents.js +7 -0
  73. package/dist/packages/client/dist/resources/processor.js +7 -0
  74. package/dist/packages/client/dist/resources/workflows.js +13 -0
  75. package/dist/packages/client/dist/resources/workspaces.js +12 -0
  76. package/dist/packages/client/dist/stream/invalidations.js +20 -0
  77. package/dist/packages/client/dist/stream/llm-reducer.js +65 -0
  78. package/dist/packages/client/dist/stream/sse-parser.js +40 -0
  79. package/dist/packages/client/dist/stream/stream.js +147 -0
  80. package/dist/packages/contracts/dist/events/client-message-base.schema.js +6 -0
  81. package/dist/packages/contracts/dist/events/client-message.schema.js +24 -0
  82. package/dist/packages/contracts/dist/events/index.js +6 -0
  83. package/dist/packages/contracts/dist/events/llm-events.schema.js +44 -0
  84. package/dist/packages/contracts/dist/events/stream-events.schema.js +4 -0
  85. package/dist/packages/contracts/dist/events/workflow-events.schema.js +20 -0
  86. package/dist/packages/contracts/dist/events/workspace-events.schema.js +5 -0
  87. package/dist/packages/contracts/dist/types/types/ui-message.type.js +39 -0
  88. package/dist/packages/react/dist/hooks/mutations.js +175 -0
  89. package/dist/packages/react/dist/hooks/queries.js +139 -0
  90. package/dist/packages/react/dist/hooks/use-live-invalidation.js +39 -0
  91. package/dist/packages/react/dist/hooks/use-llm-stream.js +18 -0
  92. package/dist/packages/react/dist/index.js +5 -0
  93. package/dist/packages/react/dist/provider.js +15 -0
  94. package/dist/pages/DashboardPage.js +2 -1
  95. package/dist/pages/DebugWorkflowDetailsPage.js +2 -1
  96. package/dist/pages/DebugWorkflowsPage.js +2 -1
  97. package/dist/pages/EmbedWorkbenchPage.js +50 -43
  98. package/dist/pages/PreviewWorkbenchPage.js +60 -59
  99. package/dist/pages/StudioLandingPage.js +1 -1
  100. package/dist/pages/WorkbenchPage.js +53 -47
  101. package/dist/pages/WorkflowDebugPage.js +3 -2
  102. package/dist/pages/WorkspacePage.js +42 -27
  103. package/dist/pages/WorkspaceRunsPage.js +36 -27
  104. package/dist/providers/LoopstackClientProvider.js +31 -0
  105. package/dist/services/createApiClient.js +9 -3
  106. package/dist/services/index.js +0 -1
  107. package/dist/services/reporting-fetch.js +13 -0
  108. package/package.json +4 -3
  109. package/dist/api/auth.js +0 -10
  110. package/dist/api/client.js +0 -13
  111. package/dist/api/config.js +0 -11
  112. package/dist/api/dashboard.js +0 -4
  113. package/dist/api/documents.js +0 -7
  114. package/dist/api/environments.js +0 -8
  115. package/dist/api/index.js +0 -28
  116. package/dist/api/processor.js +0 -7
  117. package/dist/api/secrets.js +0 -16
  118. package/dist/api/workflows.js +0 -15
  119. package/dist/api/workspaces.js +0 -12
  120. package/dist/events/sse-client-events.js +0 -13
  121. package/dist/features/code-explorer/CodeExplorer.js +0 -6
  122. package/dist/features/code-explorer/components/CodeExplorerTree.js +0 -6
  123. package/dist/features/code-explorer/components/FileTabsBar.js +0 -4
  124. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +0 -5
  125. package/dist/features/file-explorer/api/files.js +0 -7
  126. package/dist/features/git/api/git.js +0 -9
  127. package/dist/hooks/query-keys.js +0 -145
  128. package/dist/hooks/useApi.js +0 -15
  129. package/dist/hooks/useFiles.js +0 -3
  130. package/dist/node_modules/lodash/_Symbol.js +0 -7
  131. package/dist/node_modules/lodash/_baseGetTag.js +0 -13
  132. package/dist/node_modules/lodash/_baseTrim.js +0 -11
  133. package/dist/node_modules/lodash/_freeGlobal.js +0 -6
  134. package/dist/node_modules/lodash/_getRawTag.js +0 -17
  135. package/dist/node_modules/lodash/_objectToString.js +0 -10
  136. package/dist/node_modules/lodash/_root.js +0 -8
  137. package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -11
  138. package/dist/node_modules/lodash/debounce.js +0 -53
  139. package/dist/node_modules/lodash/isObject.js +0 -10
  140. package/dist/node_modules/lodash/isObjectLike.js +0 -9
  141. package/dist/node_modules/lodash/isSymbol.js +0 -12
  142. package/dist/node_modules/lodash/now.js +0 -10
  143. package/dist/node_modules/lodash/toNumber.js +0 -22
  144. package/dist/providers/InvalidationEventsProvider.js +0 -41
  145. package/dist/providers/SseProvider.js +0 -37
  146. package/dist/services/eventEmitter.js +0 -12
package/dist/index.d.ts CHANGED
@@ -1,28 +1,23 @@
1
1
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
2
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
3
  import { AppConfigInterface } from '@loopstack/contracts/api';
4
- import { AvailableEnvironmentInterface } from '@loopstack/contracts/api';
4
+ import { AuthResource } from '../../packages/client';
5
5
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
6
- import { AxiosInstance } from 'axios';
7
6
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
8
7
  import { ClassProp } from 'class-variance-authority/types';
9
8
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
10
9
  import { Component } from 'react';
11
10
  import { ComponentType } from 'react';
12
11
  import { Context } from 'react';
13
- import { DashboardStatsInterface } from '@loopstack/contracts/api';
14
12
  import { default as default_2 } from 'react';
15
13
  import * as DialogPrimitive from '@radix-ui/react-dialog';
16
14
  import { DocumentItemInterface } from '@loopstack/contracts/types';
17
- import { DocumentItemInterface as DocumentItemInterface_2 } from '@loopstack/contracts/api';
18
15
  import { Drawer as Drawer_2 } from 'vaul';
19
16
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
20
17
  import { EnvironmentConfigInterface } from '@loopstack/contracts/api';
21
18
  import { ErrorInfo } from 'react';
22
19
  import { ExternalToast } from 'sonner';
23
- import { FileContentInterface } from '@loopstack/contracts/api';
24
- import { FileExplorerNodeInterface } from '@loopstack/contracts/api';
25
- import { HubLoginRequestInterface } from '@loopstack/contracts/api';
20
+ import { JSONSchemaDefinition } from '@loopstack/contracts/schemas';
26
21
  import { JSX } from 'react/jsx-runtime';
27
22
  import * as LabelPrimitive from '@radix-ui/react-label';
28
23
  import { PaginatedInterface } from '@loopstack/contracts/api';
@@ -31,32 +26,36 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
31
26
  import * as React_2 from 'react';
32
27
  import { ReactElement } from 'react';
33
28
  import { ReactNode } from 'react';
34
- import { RunWorkflowPayloadInterface } from '@loopstack/contracts/api';
35
29
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
36
30
  import * as SelectPrimitive from '@radix-ui/react-select';
37
31
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
38
32
  import * as SliderPrimitive from '@radix-ui/react-slider';
33
+ import { StudioDocumentConfig } from '@loopstack/contracts/api';
39
34
  import * as SwitchPrimitive from '@radix-ui/react-switch';
40
- import { ToolConfigInterface } from '@loopstack/contracts/api';
41
35
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
36
+ import { useAppsConfig } from '@loopstack/react';
37
+ import { useAvailableEnvironments } from '@loopstack/react';
38
+ import { useBatchDeleteWorkspaces } from '@loopstack/react';
39
+ import { useCreateWorkflow } from '@loopstack/react';
40
+ import { useCreateWorkspace } from '@loopstack/react';
41
+ import { useDeleteWorkflow } from '@loopstack/react';
42
+ import { useDeleteWorkspace } from '@loopstack/react';
42
43
  import { UseMutationResult } from '@tanstack/react-query';
43
44
  import { useNavigate } from 'react-router-dom';
44
45
  import { UseQueryResult } from '@tanstack/react-query';
46
+ import { useSetFavouriteWorkspace } from '@loopstack/react';
47
+ import { useUpdateWorkflow } from '@loopstack/react';
48
+ import { useUpdateWorkspace } from '@loopstack/react';
49
+ import { useWorkflow } from '@loopstack/react';
50
+ import { useWorkflowCheckpoints } from '@loopstack/react';
51
+ import { useWorkflowSource } from '@loopstack/react';
52
+ import { useWorkflowStatus } from '@loopstack/react';
53
+ import { useWorkspace } from '@loopstack/react';
45
54
  import { VariantProps } from 'class-variance-authority';
46
- import { WorkerInfoInterface } from '@loopstack/contracts/api';
47
- import { WorkflowConfigInterface } from '@loopstack/contracts/api';
48
- import { WorkflowCreateInterface } from '@loopstack/contracts/api';
49
55
  import { WorkflowFullInterface } from '@loopstack/contracts/api';
50
- import { WorkflowItemInterface } from '@loopstack/contracts/api';
51
- import { WorkflowSourceInterface } from '@loopstack/contracts/api';
52
- import { WorkflowStatusInterface } from '@loopstack/contracts/api';
53
- import { WorkflowUpdateInterface } from '@loopstack/contracts/api';
54
- import { WorkspaceCreateInterface } from '@loopstack/contracts/api';
56
+ import { WorkflowState } from '@loopstack/contracts/enums';
55
57
  import { WorkspaceEnvironmentInterface } from '@loopstack/contracts/api';
56
- import { WorkspaceFavouriteInterface } from '@loopstack/contracts/api';
57
58
  import { WorkspaceInterface } from '@loopstack/contracts/api';
58
- import { WorkspaceItemInterface } from '@loopstack/contracts/api';
59
- import { WorkspaceUpdateInterface } from '@loopstack/contracts/api';
60
59
 
61
60
  export declare function Accordion({ ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Root>): JSX.Element;
62
61
 
@@ -98,8 +97,6 @@ declare const alertVariants: (props?: ({
98
97
  variant?: "default" | "destructive" | null | undefined;
99
98
  } & ClassProp) | undefined) => string;
100
99
 
101
- declare type ApiClient = ReturnType<typeof createApi>;
102
-
103
100
  export declare function Avatar({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Root>): JSX.Element;
104
101
 
105
102
  export declare function AvatarFallback({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Fallback>): JSX.Element;
@@ -243,208 +240,17 @@ declare interface ConfirmDialogProps {
243
240
  variant?: 'default' | 'destructive';
244
241
  }
245
242
 
246
- declare function createApi(http: AxiosInstance): {
247
- auth: {
248
- me: () => Promise<unknown>;
249
- getInfo: () => Promise<WorkerInfoInterface>;
250
- hubLogin: (params: {
251
- hubLoginRequestDto: HubLoginRequestInterface;
252
- }) => Promise<unknown>;
253
- refresh: () => Promise<unknown>;
254
- logout: () => Promise<void>;
255
- };
256
- config: {
257
- getApps: () => Promise<StudioAppConfig[]>;
258
- getWorkflowConfig: (params: {
259
- workflowName: string;
260
- }) => Promise<WorkflowConfigInterface>;
261
- getWorkflowSource: (params: {
262
- workflowName: string;
263
- }) => Promise<WorkflowSourceInterface>;
264
- getToolConfigs: () => Promise<ToolConfigInterface[]>;
265
- getToolConfig: (params: {
266
- toolName: string;
267
- }) => Promise<ToolConfigInterface>;
268
- getAvailableEnvironments: () => Promise<AvailableEnvironmentInterface[]>;
269
- };
270
- dashboard: {
271
- getStats: () => Promise<DashboardStatsInterface>;
272
- };
273
- documents: {
274
- getById: (params: {
275
- id: string;
276
- }) => Promise<DocumentItemInterface_2>;
277
- getAll: (params?: {
278
- filter?: string;
279
- sortBy?: string;
280
- page?: number;
281
- limit?: number;
282
- }) => Promise<PaginatedInterface<DocumentItemInterface_2>>;
283
- };
284
- environments: {
285
- getByWorkspace: (workspaceId: string) => Promise<WorkspaceEnvironmentInterface[]>;
286
- replaceEnvironments: (workspaceId: string, environments: WorkspaceEnvironmentInterface[]) => Promise<WorkspaceEnvironmentInterface[]>;
287
- resetEnvironment: (params: {
288
- workspaceId: string;
289
- slotId: string;
290
- }) => Promise<{
291
- success: boolean;
292
- message: string;
293
- }>;
294
- };
295
- files: {
296
- getTree: (params: {
297
- workspaceId: string;
298
- path?: string;
299
- }) => Promise<FileExplorerNode[]>;
300
- readFile: (params: {
301
- workspaceId: string;
302
- path: string;
303
- }) => Promise<FileContent>;
304
- };
305
- git: {
306
- getStatus: (params: {
307
- workspaceId: string;
308
- }) => Promise<GitStatusResponse>;
309
- getLog: (params: {
310
- workspaceId: string;
311
- limit?: number;
312
- }) => Promise<GitLogResponse>;
313
- getRemote: (params: {
314
- workspaceId: string;
315
- }) => Promise<GitRemoteResponse | null>;
316
- removeRemote: (params: {
317
- workspaceId: string;
318
- }) => Promise<{
319
- success: boolean;
320
- }>;
321
- };
322
- processor: {
323
- startWorkflow: (params: {
324
- payload: StartWorkflowPayload;
325
- }) => Promise<WorkflowRunResult>;
326
- runWorkflow: (params: {
327
- workflowId: string;
328
- runWorkflowPayloadDto: RunWorkflowPayloadInterface;
329
- force?: boolean;
330
- }) => Promise<void>;
331
- };
332
- secrets: {
333
- getByWorkspaceId: (params: {
334
- workspaceId: string;
335
- }) => Promise<SecretItem[]>;
336
- create: (params: {
337
- workspaceId: string;
338
- key: string;
339
- value: string;
340
- }) => Promise<{
341
- id: string;
342
- key: string;
343
- }>;
344
- upsert: (params: {
345
- workspaceId: string;
346
- key: string;
347
- value: string;
348
- }) => Promise<{
349
- id: string;
350
- key: string;
351
- }>;
352
- update: (params: {
353
- workspaceId: string;
354
- id: string;
355
- value?: string;
356
- }) => Promise<{
357
- id: string;
358
- key: string;
359
- }>;
360
- delete: (params: {
361
- workspaceId: string;
362
- id: string;
363
- }) => Promise<{
364
- success: boolean;
365
- }>;
366
- };
367
- workflows: {
368
- getById: (params: {
369
- id: string;
370
- }) => Promise<WorkflowFullInterface>;
371
- getStatusById: (params: {
372
- id: string;
373
- }) => Promise<WorkflowStatusInterface>;
374
- getAll: (params?: {
375
- filter?: string;
376
- sortBy?: string;
377
- page?: number;
378
- limit?: number;
379
- search?: string;
380
- searchColumns?: string;
381
- }) => Promise<PaginatedInterface<WorkflowItemInterface>>;
382
- create: (params: {
383
- workflowCreateDto: WorkflowCreateInterface;
384
- }) => Promise<WorkflowFullInterface>;
385
- update: (params: {
386
- id: string;
387
- workflowUpdateDto: WorkflowUpdateInterface;
388
- }) => Promise<WorkflowFullInterface>;
389
- delete: (params: {
390
- id: string;
391
- }) => Promise<void>;
392
- batchDelete: (params: {
393
- ids: string[];
394
- }) => Promise<void>;
395
- getFileTree: (params: {
396
- workflowId: string;
397
- }) => Promise<FileExplorerNodeInterface[]>;
398
- getFileContent: (params: {
399
- workflowId: string;
400
- filePath: string;
401
- }) => Promise<FileContentInterface>;
402
- getCheckpoints: (params: {
403
- id: string;
404
- }) => Promise<WorkflowCheckpoint[]>;
405
- };
406
- workspaces: {
407
- getById: (params: {
408
- id: string;
409
- }) => Promise<WorkspaceInterface>;
410
- getAll: (params?: {
411
- filter?: string;
412
- sortBy?: string;
413
- page?: number;
414
- limit?: number;
415
- search?: string;
416
- searchColumns?: string;
417
- }) => Promise<PaginatedInterface<WorkspaceItemInterface>>;
418
- create: (params: {
419
- workspaceCreateDto: WorkspaceCreateInterface;
420
- }) => Promise<WorkspaceInterface>;
421
- update: (params: {
422
- id: string;
423
- workspaceUpdateDto: WorkspaceUpdateInterface;
424
- }) => Promise<WorkspaceInterface>;
425
- delete: (params: {
426
- id: string;
427
- }) => Promise<void>;
428
- batchDelete: (params: {
429
- ids: string[];
430
- }) => Promise<void>;
431
- setFavourite: (params: {
432
- id: string;
433
- workspaceFavouriteDto: WorkspaceFavouriteInterface;
434
- }) => Promise<void>;
435
- };
436
- };
437
-
243
+ /** Auth surface of an environment, for hosts that probe/login before mounting Studio. */
438
244
  export declare function createApiClient(environment: Environment): {
439
- auth: ApiClient['auth'];
245
+ auth: AuthResource;
440
246
  };
441
247
 
442
248
  export declare const CreateWorkspace: ({ types, workspace, onSuccess }: CreateWorkspaceProps) => JSX.Element;
443
249
 
444
250
  export declare interface CreateWorkspaceProps {
445
251
  types: AppConfigInterface[];
446
- workspace?: WorkspaceItemInterface;
447
- onSuccess: (workspace?: WorkspaceItemInterface) => void;
252
+ workspace?: WorkspaceInterface;
253
+ onSuccess: (workspace?: WorkspaceInterface) => void;
448
254
  }
449
255
 
450
256
  export declare const CustomItemListView: <T extends Item_2>({ loading, error, items, totalItems, filterConfig, onClick, handleNew, setPage, setRowsPerPage, setSearchTerm, setFilters, searchTerm, filters, page, rowsPerPage, batchActions, batchDelete, enableBatchActions, rowActions, itemRenderer, newButtonLabel, }: ListViewProps_2<T>) => JSX.Element;
@@ -670,8 +476,8 @@ export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps
670
476
 
671
477
  export declare interface EditWorkspaceProps {
672
478
  types: AppConfigInterface[];
673
- workspace: WorkspaceItemInterface;
674
- onSuccess: (workspace?: WorkspaceItemInterface) => void;
479
+ workspace: WorkspaceInterface;
480
+ onSuccess: (workspace?: WorkspaceInterface) => void;
675
481
  }
676
482
 
677
483
  export declare function EmbedWorkbenchPage(): JSX.Element;
@@ -731,129 +537,19 @@ declare interface ErrorSnackbarProps {
731
537
  error: Error | string | null | undefined;
732
538
  }
733
539
 
734
- export declare const eventBus: EventEmitter;
735
-
736
- declare class EventEmitter {
737
- private events;
738
- on(event: string, listener: (...args: any[]) => void): () => void;
739
- emit(event: string, ...args: unknown[]): void;
740
- }
741
-
742
- export declare function FeatureRegistryProvider({ features, children }: FeatureRegistryProviderProps): JSX.Element;
540
+ export declare function FeatureRegistryProvider({ appName, children }: FeatureRegistryProviderProps): JSX.Element;
743
541
 
744
542
  export declare interface FeatureRegistryProviderProps {
745
- /** Static feature list (fallback when no backend features are available). */
746
- features?: StudioFeature[];
543
+ /** App name to scope features to. Must match an `appName` from `/api/v1/config/apps`. */
544
+ appName: string;
747
545
  children: ReactNode;
748
546
  }
749
547
 
750
- declare interface FileContent {
751
- path: string;
752
- content: string;
753
- }
754
-
755
- export declare const fileExplorerFeature: StudioFeature;
756
-
757
- declare interface FileExplorerNode {
758
- id: string;
759
- name: string;
760
- path: string;
761
- type: FileNodeType;
762
- children?: FileExplorerNode[];
763
- }
764
-
765
- declare type FileNodeType = 'file' | 'folder';
766
-
767
548
  export declare type FilterOption = string | {
768
549
  label: string;
769
550
  value: string;
770
551
  };
771
552
 
772
- export declare function getAppTypesCacheKey(envKey: string): string[];
773
-
774
- export declare function getAvailableEnvironmentsCacheKey(envKey: string): string[];
775
-
776
- export declare function getChildWorkflowsCacheKey(envKey: string, parentId: string): string[];
777
-
778
- export declare function getDashboardStatsCacheKey(envKey: string): string[];
779
-
780
- export declare function getDocumentCacheKey(envKey: string, documentId: string): string[];
781
-
782
- export declare function getDocumentsCacheKey(envKey: string, workflowId: string): string[];
783
-
784
- export declare function getFileContentCacheKey(envKey: string, workflowId: string, filePath: string): string[];
785
-
786
- export declare function getFileTreeCacheKey(envKey: string, workflowId: string): string[];
787
-
788
- export declare function getGitLogCacheKey(envKey: string, workspaceId: string): string[];
789
-
790
- export declare function getGitRemoteCacheKey(envKey: string, workspaceId: string): string[];
791
-
792
- export declare function getGitStatusCacheKey(envKey: string, workspaceId: string): string[];
793
-
794
- export declare function getHealthCacheKey(envKey: string): string[];
795
-
796
- /**
797
- * Centralized cache key builders for React Query.
798
- *
799
- * Conventions:
800
- * - All keys start with a domain prefix, followed by envKey for environment scoping.
801
- * - Singular keys (e.g. 'workflow') are for single-entity queries.
802
- * - Plural keys (e.g. 'workflows') are for list/filter queries.
803
- * - Mutations should invalidate the plural key to catch all list variations.
804
- * - Use `select` (not `.then()` in queryFn) for response transformations.
805
- */
806
- export declare function getMeCacheKey(envKey: string): string[];
807
-
808
- export declare function getSecretsCacheKey(envKey: string, workspaceId: string): string[];
809
-
810
- export declare function getStudioAppsCacheKey(envKey: string): string[];
811
-
812
- export declare function getToolConfigCacheKey(envKey: string, toolName: string): string[];
813
-
814
- export declare function getToolConfigsCacheKey(envKey: string): string[];
815
-
816
- export declare function getWorkflowCacheKey(envKey: string, id: string): string[];
817
-
818
- export declare function getWorkflowConfigCacheKey(envKey: string, alias: string): string[];
819
-
820
- export declare function getWorkflowsCacheKey(envKey: string): string[];
821
-
822
- export declare function getWorkflowSourceCacheKey(envKey: string, alias: string): string[];
823
-
824
- export declare function getWorkflowStatusCacheKey(envKey: string, id: string): string[];
825
-
826
- export declare function getWorkflowTypesCacheKey(envKey: string, appBlockName: string): string[];
827
-
828
- export declare function getWorkspaceCacheKey(envKey: string, id: string): string[];
829
-
830
- export declare function getWorkspacesCacheKey(envKey: string): string[];
831
-
832
- declare interface GitCommit {
833
- hash: string;
834
- shortHash: string;
835
- message: string;
836
- author: string;
837
- date: string;
838
- }
839
-
840
- declare interface GitLogResponse {
841
- commits: GitCommit[];
842
- }
843
-
844
- declare interface GitRemoteResponse {
845
- name: string;
846
- url: string;
847
- }
848
-
849
- declare interface GitStatusResponse {
850
- branch: string;
851
- staged: string[];
852
- modified: string[];
853
- untracked: string[];
854
- deleted: string[];
855
- }
856
-
857
553
  export declare const GoogleLogo: default_2.FC<GoogleLogoProps>;
858
554
 
859
555
  declare interface GoogleLogoProps {
@@ -862,8 +558,6 @@ declare interface GoogleLogoProps {
862
558
 
863
559
  export declare function Input({ className, type, ...props }: React_2.ComponentProps<'input'>): JSX.Element;
864
560
 
865
- export declare function InvalidationEventsProvider(): null;
866
-
867
561
  declare interface Item {
868
562
  id: string;
869
563
  }
@@ -940,6 +634,8 @@ declare interface LoadingCenteredProps extends default_2.HTMLAttributes<HTMLDivE
940
634
  children?: default_2.ReactNode;
941
635
  }
942
636
 
637
+ export declare const localFileExplorerFeature: StudioFeature;
638
+
943
639
  export declare const LocalHealthCheck: () => JSX.Element | null;
944
640
 
945
641
  export declare class LocalRouter implements StudioRouter {
@@ -974,6 +670,15 @@ export declare class LocalRouter implements StudioRouter {
974
670
  getTheme(): 'local' | 'cloud';
975
671
  }
976
672
 
673
+ /**
674
+ * Provides the Loopstack SDK client for the current Studio environment.
675
+ * The stream connection is ref-counted by its subscribers — no explicit
676
+ * teardown is needed when the environment changes.
677
+ */
678
+ export declare function LoopstackClientProvider({ children }: {
679
+ children?: ReactNode;
680
+ }): JSX.Element;
681
+
977
682
  export declare const MainLayout: ({ children, breadcrumbsData, headerMenu, }: {
978
683
  children: ReactNode;
979
684
  breadcrumbsData: BreadCrumbsData[];
@@ -1043,6 +748,8 @@ export declare function RadioGroup({ className, ...props }: React_2.ComponentPro
1043
748
 
1044
749
  export declare function RadioGroupItem({ className, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Item>): JSX.Element;
1045
750
 
751
+ export declare const remoteFileExplorerFeature: StudioFeature;
752
+
1046
753
  export declare interface RowAction<T = any> {
1047
754
  id: string;
1048
755
  label: string;
@@ -1073,12 +780,6 @@ export declare function ScrollArea({ className, children, ...props }: React_2.Co
1073
780
 
1074
781
  export declare function ScrollBar({ className, orientation, ...props }: React_2.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): JSX.Element;
1075
782
 
1076
- declare interface SecretItem {
1077
- id: string;
1078
- key: string;
1079
- hasValue: boolean;
1080
- }
1081
-
1082
783
  export declare const secretsFeature: StudioFeature;
1083
784
 
1084
785
  export declare function Select({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
@@ -1223,33 +924,6 @@ export declare function Slider({ className, defaultValue, value, min, max, ...pr
1223
924
 
1224
925
  export declare const Snackbar: default_2.FC<BaseSnackbarProps>;
1225
926
 
1226
- export declare function SseProvider(): null;
1227
-
1228
- declare interface StartWorkflowPayload {
1229
- workflowName: string;
1230
- workspaceId: string;
1231
- args?: Record<string, unknown>;
1232
- }
1233
-
1234
- declare interface StaticDocumentMeta {
1235
- hidden?: boolean;
1236
- mimeType?: string;
1237
- level?: 'debug' | 'info' | 'warning' | 'error';
1238
- enableAtPlaces?: string[];
1239
- hideAtPlaces?: string[];
1240
- }
1241
-
1242
- declare interface StudioAppConfig {
1243
- appName: string;
1244
- title: string;
1245
- description?: string;
1246
- ui?: StudioUiConfig;
1247
- features: StudioFeatureRegistration[];
1248
- extensions?: Record<string, unknown[]>;
1249
- workflows: StudioWorkflowConfig[];
1250
- documents: StudioDocumentConfig[];
1251
- }
1252
-
1253
927
  declare interface StudioContext {
1254
928
  router: StudioRouter;
1255
929
  environment: Environment;
@@ -1257,30 +931,12 @@ declare interface StudioContext {
1257
931
 
1258
932
  declare const StudioContext: Context<StudioContext | null>;
1259
933
 
1260
- declare interface StudioDocumentConfig {
1261
- documentName: string;
1262
- title?: string;
1263
- description?: string;
1264
- ui?: {
1265
- widgets?: StudioWidgetConfig[];
1266
- };
1267
- tags?: string[];
1268
- meta?: StaticDocumentMeta;
1269
- schema?: Record<string, unknown>;
1270
- }
1271
-
1272
934
  export declare interface StudioFeature {
1273
935
  id: string;
1274
936
  documentRenderers?: Record<string, ComponentType<DocumentRendererProps>>;
1275
937
  sidebarPanel?: StudioFeatureSidebarPanel;
1276
938
  }
1277
939
 
1278
- declare interface StudioFeatureRegistration {
1279
- id: string;
1280
- enabled: boolean;
1281
- config: Record<string, unknown>;
1282
- }
1283
-
1284
940
  export declare interface StudioFeatureSidebarPanel {
1285
941
  id: string;
1286
942
  label: string;
@@ -1345,22 +1001,6 @@ export declare interface StudioRouter {
1345
1001
 
1346
1002
  export declare const StudioSidebar: () => JSX.Element;
1347
1003
 
1348
- declare interface StudioUiConfig {
1349
- widgets?: StudioWidgetConfig[];
1350
- }
1351
-
1352
- declare interface StudioWidgetConfig {
1353
- widget: string;
1354
- options?: Record<string, unknown>;
1355
- }
1356
-
1357
- declare interface StudioWorkflowConfig {
1358
- workflowName: string;
1359
- title?: string;
1360
- description?: string;
1361
- schema?: Record<string, unknown>;
1362
- }
1363
-
1364
1004
  export declare function Switch({ className, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root>): JSX.Element;
1365
1005
 
1366
1006
  export declare function Table({ className, ...props }: React_2.ComponentProps<'table'>): JSX.Element;
@@ -1391,48 +1031,51 @@ export declare function TooltipProvider({ delayDuration, ...props }: React_2.Com
1391
1031
 
1392
1032
  export declare function TooltipTrigger({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Trigger>): JSX.Element;
1393
1033
 
1394
- export declare function useApiClient(): {
1395
- envKey: string;
1396
- api: ApiClient;
1397
- };
1398
-
1399
- export declare function useAppsConfig(): UseQueryResult<StudioAppConfig[], Error>;
1034
+ export { useAppsConfig }
1400
1035
 
1401
- export declare function useAvailableEnvironments(options?: {
1402
- enabled?: boolean;
1403
- }): UseQueryResult<AvailableEnvironmentInterface[], Error>;
1036
+ export { useAvailableEnvironments }
1404
1037
 
1405
1038
  /**
1406
1039
  * Batch delete workflows.
1407
1040
  */
1408
- export declare function useBatchDeleteWorkflows(): UseMutationResult<void, Error, string[], unknown>;
1041
+ export declare function useBatchDeleteWorkflows(): UseMutationResult< {
1042
+ deleted: string[];
1043
+ failed: {
1044
+ id: string;
1045
+ error: string;
1046
+ }[];
1047
+ }, Error, string[], unknown>;
1409
1048
 
1410
- export declare function useBatchDeleteWorkspaces(): UseMutationResult<void, Error, string[], unknown>;
1049
+ export { useBatchDeleteWorkspaces }
1411
1050
 
1412
1051
  /**
1413
1052
  * Fetch child workflows by parentId.
1414
1053
  */
1415
- export declare function useChildWorkflows(parentId: string | undefined, enabled?: boolean): UseQueryResult<WorkflowItemInterface[], Error>;
1054
+ export declare function useChildWorkflows(parentId: string | undefined, enabled?: boolean): UseQueryResult< {
1055
+ id: string;
1056
+ workflowName: string;
1057
+ title: string | null;
1058
+ run: number;
1059
+ labels: string[];
1060
+ status: WorkflowState;
1061
+ hasError: boolean;
1062
+ place: string;
1063
+ createdAt: string;
1064
+ updatedAt: string;
1065
+ workspaceId: string;
1066
+ parentId: string | null;
1067
+ hasChildren: number;
1068
+ }[]>;
1416
1069
 
1417
1070
  export declare const useComponentOverrides: () => ComponentOverrides;
1418
1071
 
1419
- /**
1420
- * Create a new workflow.
1421
- */
1422
- export declare function useCreateWorkflow(): UseMutationResult<WorkflowFullInterface, Error, {
1423
- workflowCreateDto: WorkflowCreateInterface;
1424
- }, unknown>;
1072
+ export { useCreateWorkflow }
1425
1073
 
1426
- export declare function useCreateWorkspace(): UseMutationResult<WorkspaceInterface, Error, {
1427
- workspaceCreateDto: WorkspaceCreateInterface;
1428
- }, unknown>;
1074
+ export { useCreateWorkspace }
1429
1075
 
1430
- /**
1431
- * Delete a single workflow.
1432
- */
1433
- export declare function useDeleteWorkflow(): UseMutationResult<void, Error, string, unknown>;
1076
+ export { useDeleteWorkflow }
1434
1077
 
1435
- export declare function useDeleteWorkspace(): UseMutationResult<void, Error, string, unknown>;
1078
+ export { useDeleteWorkspace }
1436
1079
 
1437
1080
  /**
1438
1081
  * Returns a Map of document configs keyed by documentName.
@@ -1443,9 +1086,33 @@ export declare function useDocumentConfigs(): Map<string, StudioDocumentConfig>;
1443
1086
  /**
1444
1087
  * Fetch a filtered, sorted, paginated list of workflows.
1445
1088
  */
1446
- export declare function useFilterWorkflows(searchTerm: string | undefined, filter: Record<string, string | null>, sortBy?: string, order?: string, page?: number, limit?: number): UseQueryResult<PaginatedInterface<WorkflowItemInterface>, Error>;
1089
+ export declare function useFilterWorkflows(searchTerm: string | undefined, filter: Record<string, string | null>, sortBy?: string, order?: string, page?: number, limit?: number): UseQueryResult<PaginatedInterface< {
1090
+ id: string;
1091
+ workflowName: string;
1092
+ title: string | null;
1093
+ run: number;
1094
+ labels: string[];
1095
+ status: WorkflowState;
1096
+ hasError: boolean;
1097
+ place: string;
1098
+ createdAt: string;
1099
+ updatedAt: string;
1100
+ workspaceId: string;
1101
+ parentId: string | null;
1102
+ hasChildren: number;
1103
+ }>>;
1447
1104
 
1448
- export declare function useFilterWorkspaces(searchTerm: string | undefined, filter: Record<string, string>, sortBy?: string, order?: string, page?: number, limit?: number): UseQueryResult<PaginatedInterface<WorkspaceItemInterface>, Error>;
1105
+ /**
1106
+ * Fetch a filtered, sorted, paginated list of workspaces.
1107
+ */
1108
+ export declare function useFilterWorkspaces(searchTerm: string | undefined, filter: Record<string, string>, sortBy?: string, order?: string, page?: number, limit?: number): UseQueryResult<PaginatedInterface< {
1109
+ id: string;
1110
+ appName: string;
1111
+ title: string;
1112
+ isFavourite: boolean;
1113
+ createdAt: string;
1114
+ updatedAt: string;
1115
+ }>>;
1449
1116
 
1450
1117
  export declare function useIsMobile(): boolean;
1451
1118
 
@@ -1466,10 +1133,7 @@ slotId: string;
1466
1133
 
1467
1134
  export declare const useRouter: (envId: string, embedPrefix?: string) => StudioRouter;
1468
1135
 
1469
- export declare function useSetFavouriteWorkspace(): UseMutationResult<void, Error, {
1470
- id: string;
1471
- isFavourite: boolean;
1472
- }, unknown>;
1136
+ export { useSetFavouriteWorkspace }
1473
1137
 
1474
1138
  export declare function useSidebar(): SidebarContextProps;
1475
1139
 
@@ -1479,46 +1143,53 @@ export declare const useStudioOptional: () => StudioContext | null;
1479
1143
 
1480
1144
  export declare function useStudioPreferences(): StudioPreferencesContextType;
1481
1145
 
1482
- /**
1483
- * Update an existing workflow.
1484
- */
1485
- export declare function useUpdateWorkflow(): UseMutationResult<WorkflowFullInterface, Error, {
1486
- id: string;
1487
- workflowUpdateDto: WorkflowUpdateInterface;
1488
- }, unknown>;
1146
+ export { useUpdateWorkflow }
1489
1147
 
1490
- export declare function useUpdateWorkspace(): UseMutationResult<WorkspaceInterface, Error, {
1491
- id: string;
1492
- workspaceUpdateDto: WorkspaceUpdateInterface;
1493
- }, unknown>;
1148
+ export { useUpdateWorkspace }
1494
1149
 
1495
- /**
1496
- * Fetch a single workflow (full details) by ID.
1497
- */
1498
- export declare function useWorkflow(id: string | undefined): UseQueryResult<WorkflowFullInterface, Error>;
1150
+ export { useWorkflow }
1499
1151
 
1500
- /**
1501
- * Fetch checkpoints for a workflow run.
1502
- */
1503
- export declare function useWorkflowCheckpoints(workflowId: string): UseQueryResult<WorkflowCheckpoint[], Error>;
1152
+ export { useWorkflowCheckpoints }
1504
1153
 
1505
1154
  /**
1506
1155
  * Fetch workflow config by workflow name (the identifier stored on the workflow entity).
1507
1156
  */
1508
- export declare function useWorkflowConfigByName(workflowName: string | undefined): UseQueryResult<WorkflowConfigInterface, Error>;
1509
-
1510
- /**
1511
- * Fetch workflow source by workflow name (class name).
1512
- */
1513
- export declare function useWorkflowSource(workflowName: string | undefined): UseQueryResult<WorkflowSourceInterface, Error>;
1514
-
1515
- /**
1516
- * Fetch the slim live status for a single workflow — used by embedded sub-workflow link cards
1517
- * to react to state changes without pulling the full workflow payload.
1518
- */
1519
- export declare function useWorkflowStatus(id: string | undefined): UseQueryResult<WorkflowStatusInterface, Error>;
1520
-
1521
- export declare function useWorkspace(id: string | undefined): UseQueryResult<WorkspaceInterface, Error>;
1157
+ export declare function useWorkflowConfigByName(workflowName: string | undefined): UseQueryResult< {
1158
+ workflowName: string;
1159
+ title?: string | undefined;
1160
+ description?: string | undefined;
1161
+ schema?: JSONSchemaDefinition | undefined;
1162
+ ui?: {
1163
+ widgets?: {
1164
+ widget: string;
1165
+ enabledWhen?: string[] | undefined;
1166
+ showWhen?: string[] | undefined;
1167
+ options?: Record<string, any> | undefined;
1168
+ }[] | undefined;
1169
+ } | undefined;
1170
+ transitions?: {
1171
+ id: string;
1172
+ from: string | string[];
1173
+ to: string;
1174
+ if?: string | boolean | undefined;
1175
+ trigger?: string | undefined;
1176
+ call?: {
1177
+ tool: string;
1178
+ id?: string | undefined;
1179
+ args?: any;
1180
+ assign?: Record<string, string | number | boolean | Record<string, any> | null> | undefined;
1181
+ }[] | undefined;
1182
+ assign?: Record<string, string | number | boolean | Record<string, any> | null> | undefined;
1183
+ onError?: string | undefined;
1184
+ debug?: boolean | undefined;
1185
+ }[] | undefined;
1186
+ }>;
1187
+
1188
+ export { useWorkflowSource }
1189
+
1190
+ export { useWorkflowStatus }
1191
+
1192
+ export { useWorkspace }
1522
1193
 
1523
1194
  export declare function useWorkspaceEnvironments(workspaceId?: string): UseQueryResult<WorkspaceEnvironmentInterface[], Error>;
1524
1195
 
@@ -1527,23 +1198,8 @@ export declare function WorkbenchPage({ getPreviewUrl, getEnvironmentPreviewUrl,
1527
1198
  getEnvironmentPreviewUrl?: (env: WorkspaceEnvironmentInterface, workflowId?: string) => string;
1528
1199
  }): JSX.Element;
1529
1200
 
1530
- declare interface WorkflowCheckpoint {
1531
- id: string;
1532
- place: string;
1533
- transitionId: string | null;
1534
- transitionFrom: string | null;
1535
- version: number;
1536
- createdAt: string;
1537
- }
1538
-
1539
1201
  export declare const WorkflowDebugPage: default_2.FC;
1540
1202
 
1541
- declare interface WorkflowRunResult {
1542
- workflowId: string;
1543
- workspaceId: string;
1544
- status: string;
1545
- }
1546
-
1547
1203
  export declare const WorkspacePage: () => JSX.Element;
1548
1204
 
1549
1205
  export declare const WorkspaceRunsPage: () => JSX.Element;