@loopstack/loopstack-studio 0.34.0 → 0.35.1

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 (133) hide show
  1. package/dist/app/EnvironmentEmbedRoot.js +18 -24
  2. package/dist/components/layout/StudioSidebar.js +34 -34
  3. package/dist/events/api-client-events.js +13 -1
  4. package/dist/events/index.js +1 -0
  5. package/dist/features/code-explorer/components/FileTabsBarBase.js +1 -1
  6. package/dist/features/code-explorer/index.js +0 -3
  7. package/dist/features/dashboard/AppLauncher.js +1 -1
  8. package/dist/features/debug/components/WorkflowFlowViewer.js +2 -1
  9. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +2 -1
  10. package/dist/features/documents/components/DocumentList.js +1 -1
  11. package/dist/features/documents/document-details/DocumentDetails.js +0 -5
  12. package/dist/features/documents/renderers/DocumentFormRenderer.js +13 -12
  13. package/dist/features/documents/renderers/LinkMessageRenderer.js +2 -1
  14. package/dist/features/documents/renderers/useDocumentTransition.js +3 -2
  15. package/dist/features/feature-registry/FeatureRegistryProvider.js +2 -1
  16. package/dist/features/file-explorer/components/FileTabsBar.js +1 -1
  17. package/dist/features/file-explorer/components/FileTree.js +1 -1
  18. package/dist/features/file-explorer/hooks/useFileExplorer.js +36 -31
  19. package/dist/features/file-explorer/providers/FileExplorerProvider.js +94 -92
  20. package/dist/features/git/components/WorkbenchGitPanel.js +6 -9
  21. package/dist/features/git/hooks/useGit.js +55 -57
  22. package/dist/features/health/LocalHealthCheck.js +46 -47
  23. package/dist/features/oauth/OAuthPromptRenderer.js +6 -5
  24. package/dist/features/runs/Runs.js +3 -2
  25. package/dist/features/secrets/renderers/SecretInputRenderer.js +3 -2
  26. package/dist/features/workbench/WorkflowItem.js +5 -8
  27. package/dist/features/workbench/components/NewRunDialog.js +172 -170
  28. package/dist/features/workbench/components/PreviewEmptyState.js +1 -1
  29. package/dist/features/workbench/components/WorkbenchRunsPanel.js +2 -1
  30. package/dist/features/workbench/components/WorkflowForms.js +1 -1
  31. package/dist/features/workbench/components/WorkflowHistoryItem.js +2 -1
  32. package/dist/features/workbench/components/buttons/WorkflowButtons.js +8 -14
  33. package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +65 -132
  34. package/dist/features/workbench/hooks/useWorkflowData.js +8 -6
  35. package/dist/features/workspaces/Workspaces.js +4 -2
  36. package/dist/features/workspaces/components/CreateWorkspace.js +7 -5
  37. package/dist/features/workspaces/components/ExecutionTimeline.js +69 -65
  38. package/dist/features/workspaces/components/WorkflowRunForm.js +6 -4
  39. package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
  40. package/dist/hooks/index.js +5 -5
  41. package/dist/hooks/useAuth.js +14 -53
  42. package/dist/hooks/useConfig.js +13 -37
  43. package/dist/hooks/useDocuments.js +5 -30
  44. package/dist/hooks/useEnvironments.js +34 -24
  45. package/dist/hooks/useProcessor.js +2 -31
  46. package/dist/hooks/useSecrets.js +78 -24
  47. package/dist/hooks/useWorkflows.js +43 -172
  48. package/dist/hooks/useWorkspaces.js +24 -130
  49. package/dist/index.d.ts +130 -488
  50. package/dist/index.js +10 -12
  51. package/dist/packages/client/dist/client.js +35 -0
  52. package/dist/packages/client/dist/http.js +47 -0
  53. package/dist/packages/client/dist/index.js +15 -0
  54. package/dist/packages/client/dist/queries/query-keys.js +94 -0
  55. package/dist/packages/client/dist/queries/query-options.js +97 -0
  56. package/dist/packages/client/dist/resources/auth.js +10 -0
  57. package/dist/packages/client/dist/resources/config.js +11 -0
  58. package/dist/packages/client/dist/resources/dashboard.js +4 -0
  59. package/dist/packages/client/dist/resources/documents.js +7 -0
  60. package/dist/packages/client/dist/resources/processor.js +7 -0
  61. package/dist/packages/client/dist/resources/workflows.js +13 -0
  62. package/dist/packages/client/dist/resources/workspaces.js +12 -0
  63. package/dist/packages/client/dist/stream/invalidations.js +20 -0
  64. package/dist/packages/client/dist/stream/llm-reducer.js +65 -0
  65. package/dist/packages/client/dist/stream/sse-parser.js +40 -0
  66. package/dist/packages/client/dist/stream/stream.js +147 -0
  67. package/dist/packages/contracts/dist/events/client-message-base.schema.js +6 -0
  68. package/dist/packages/contracts/dist/events/client-message.schema.js +24 -0
  69. package/dist/packages/contracts/dist/events/index.js +6 -0
  70. package/dist/packages/contracts/dist/events/llm-events.schema.js +44 -0
  71. package/dist/packages/contracts/dist/events/stream-events.schema.js +4 -0
  72. package/dist/packages/contracts/dist/events/workflow-events.schema.js +20 -0
  73. package/dist/packages/contracts/dist/events/workspace-events.schema.js +5 -0
  74. package/dist/packages/contracts/dist/types/types/ui-message.type.js +39 -0
  75. package/dist/packages/react/dist/hooks/mutations.js +175 -0
  76. package/dist/packages/react/dist/hooks/queries.js +139 -0
  77. package/dist/packages/react/dist/hooks/use-live-invalidation.js +39 -0
  78. package/dist/packages/react/dist/hooks/use-llm-stream.js +18 -0
  79. package/dist/packages/react/dist/index.js +5 -0
  80. package/dist/packages/react/dist/provider.js +15 -0
  81. package/dist/pages/DashboardPage.js +2 -1
  82. package/dist/pages/DebugWorkflowDetailsPage.js +2 -1
  83. package/dist/pages/DebugWorkflowsPage.js +2 -1
  84. package/dist/pages/EmbedWorkbenchPage.js +5 -4
  85. package/dist/pages/PreviewWorkbenchPage.js +60 -59
  86. package/dist/pages/StudioLandingPage.js +1 -1
  87. package/dist/pages/WorkbenchPage.js +3 -2
  88. package/dist/pages/WorkflowDebugPage.js +3 -2
  89. package/dist/pages/WorkspacePage.js +3 -2
  90. package/dist/pages/WorkspaceRunsPage.js +2 -1
  91. package/dist/providers/LoopstackClientProvider.js +35 -0
  92. package/dist/services/createApiClient.js +9 -3
  93. package/dist/services/index.js +0 -1
  94. package/dist/services/reporting-fetch.js +13 -0
  95. package/package.json +4 -3
  96. package/dist/api/auth.js +0 -10
  97. package/dist/api/client.js +0 -13
  98. package/dist/api/config.js +0 -11
  99. package/dist/api/dashboard.js +0 -4
  100. package/dist/api/documents.js +0 -7
  101. package/dist/api/environments.js +0 -8
  102. package/dist/api/index.js +0 -31
  103. package/dist/api/processor.js +0 -7
  104. package/dist/api/secrets.js +0 -16
  105. package/dist/api/workflows.js +0 -15
  106. package/dist/api/workspaces.js +0 -12
  107. package/dist/events/sse-client-events.js +0 -15
  108. package/dist/features/code-explorer/CodeExplorer.js +0 -6
  109. package/dist/features/code-explorer/components/CodeExplorerTree.js +0 -6
  110. package/dist/features/code-explorer/components/FileTabsBar.js +0 -4
  111. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +0 -5
  112. package/dist/features/file-explorer/api/files.js +0 -12
  113. package/dist/features/git/api/git.js +0 -9
  114. package/dist/hooks/query-keys.js +0 -145
  115. package/dist/hooks/useApi.js +0 -15
  116. package/dist/hooks/useFiles.js +0 -3
  117. package/dist/node_modules/lodash/_Symbol.js +0 -7
  118. package/dist/node_modules/lodash/_baseGetTag.js +0 -13
  119. package/dist/node_modules/lodash/_baseTrim.js +0 -11
  120. package/dist/node_modules/lodash/_freeGlobal.js +0 -6
  121. package/dist/node_modules/lodash/_getRawTag.js +0 -17
  122. package/dist/node_modules/lodash/_objectToString.js +0 -10
  123. package/dist/node_modules/lodash/_root.js +0 -8
  124. package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -11
  125. package/dist/node_modules/lodash/debounce.js +0 -53
  126. package/dist/node_modules/lodash/isObject.js +0 -10
  127. package/dist/node_modules/lodash/isObjectLike.js +0 -9
  128. package/dist/node_modules/lodash/isSymbol.js +0 -12
  129. package/dist/node_modules/lodash/now.js +0 -10
  130. package/dist/node_modules/lodash/toNumber.js +0 -22
  131. package/dist/providers/InvalidationEventsProvider.js +0 -43
  132. package/dist/providers/SseProvider.js +0 -37
  133. 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,220 +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
- local: {
297
- getTree: (params: {
298
- workspaceId: string;
299
- path?: string;
300
- }) => Promise<FileExplorerNode[]>;
301
- readFile: (params: {
302
- workspaceId: string;
303
- path: string;
304
- }) => Promise<FileContent>;
305
- };
306
- remote: {
307
- getTree: (params: {
308
- workspaceId: string;
309
- path?: string;
310
- }) => Promise<FileExplorerNode[]>;
311
- readFile: (params: {
312
- workspaceId: string;
313
- path: string;
314
- }) => Promise<FileContent>;
315
- };
316
- };
317
- git: {
318
- getStatus: (params: {
319
- workspaceId: string;
320
- }) => Promise<GitStatusResponse>;
321
- getLog: (params: {
322
- workspaceId: string;
323
- limit?: number;
324
- }) => Promise<GitLogResponse>;
325
- getRemote: (params: {
326
- workspaceId: string;
327
- }) => Promise<GitRemoteResponse | null>;
328
- removeRemote: (params: {
329
- workspaceId: string;
330
- }) => Promise<{
331
- success: boolean;
332
- }>;
333
- };
334
- processor: {
335
- startWorkflow: (params: {
336
- payload: StartWorkflowPayload;
337
- }) => Promise<WorkflowRunResult>;
338
- runWorkflow: (params: {
339
- workflowId: string;
340
- runWorkflowPayloadDto: RunWorkflowPayloadInterface;
341
- force?: boolean;
342
- }) => Promise<void>;
343
- };
344
- secrets: {
345
- getByWorkspaceId: (params: {
346
- workspaceId: string;
347
- }) => Promise<SecretItem[]>;
348
- create: (params: {
349
- workspaceId: string;
350
- key: string;
351
- value: string;
352
- }) => Promise<{
353
- id: string;
354
- key: string;
355
- }>;
356
- upsert: (params: {
357
- workspaceId: string;
358
- key: string;
359
- value: string;
360
- }) => Promise<{
361
- id: string;
362
- key: string;
363
- }>;
364
- update: (params: {
365
- workspaceId: string;
366
- id: string;
367
- value?: string;
368
- }) => Promise<{
369
- id: string;
370
- key: string;
371
- }>;
372
- delete: (params: {
373
- workspaceId: string;
374
- id: string;
375
- }) => Promise<{
376
- success: boolean;
377
- }>;
378
- };
379
- workflows: {
380
- getById: (params: {
381
- id: string;
382
- }) => Promise<WorkflowFullInterface>;
383
- getStatusById: (params: {
384
- id: string;
385
- }) => Promise<WorkflowStatusInterface>;
386
- getAll: (params?: {
387
- filter?: string;
388
- sortBy?: string;
389
- page?: number;
390
- limit?: number;
391
- search?: string;
392
- searchColumns?: string;
393
- }) => Promise<PaginatedInterface<WorkflowItemInterface>>;
394
- create: (params: {
395
- workflowCreateDto: WorkflowCreateInterface;
396
- }) => Promise<WorkflowFullInterface>;
397
- update: (params: {
398
- id: string;
399
- workflowUpdateDto: WorkflowUpdateInterface;
400
- }) => Promise<WorkflowFullInterface>;
401
- delete: (params: {
402
- id: string;
403
- }) => Promise<void>;
404
- batchDelete: (params: {
405
- ids: string[];
406
- }) => Promise<void>;
407
- getFileTree: (params: {
408
- workflowId: string;
409
- }) => Promise<FileExplorerNodeInterface[]>;
410
- getFileContent: (params: {
411
- workflowId: string;
412
- filePath: string;
413
- }) => Promise<FileContentInterface>;
414
- getCheckpoints: (params: {
415
- id: string;
416
- }) => Promise<WorkflowCheckpoint[]>;
417
- };
418
- workspaces: {
419
- getById: (params: {
420
- id: string;
421
- }) => Promise<WorkspaceInterface>;
422
- getAll: (params?: {
423
- filter?: string;
424
- sortBy?: string;
425
- page?: number;
426
- limit?: number;
427
- search?: string;
428
- searchColumns?: string;
429
- }) => Promise<PaginatedInterface<WorkspaceItemInterface>>;
430
- create: (params: {
431
- workspaceCreateDto: WorkspaceCreateInterface;
432
- }) => Promise<WorkspaceInterface>;
433
- update: (params: {
434
- id: string;
435
- workspaceUpdateDto: WorkspaceUpdateInterface;
436
- }) => Promise<WorkspaceInterface>;
437
- delete: (params: {
438
- id: string;
439
- }) => Promise<void>;
440
- batchDelete: (params: {
441
- ids: string[];
442
- }) => Promise<void>;
443
- setFavourite: (params: {
444
- id: string;
445
- workspaceFavouriteDto: WorkspaceFavouriteInterface;
446
- }) => Promise<void>;
447
- };
448
- };
449
-
243
+ /** Auth surface of an environment, for hosts that probe/login before mounting Studio. */
450
244
  export declare function createApiClient(environment: Environment): {
451
- auth: ApiClient['auth'];
245
+ auth: AuthResource;
452
246
  };
453
247
 
454
248
  export declare const CreateWorkspace: ({ types, workspace, onSuccess }: CreateWorkspaceProps) => JSX.Element;
455
249
 
456
250
  export declare interface CreateWorkspaceProps {
457
251
  types: AppConfigInterface[];
458
- workspace?: WorkspaceItemInterface;
459
- onSuccess: (workspace?: WorkspaceItemInterface) => void;
252
+ workspace?: WorkspaceInterface;
253
+ onSuccess: (workspace?: WorkspaceInterface) => void;
460
254
  }
461
255
 
462
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;
@@ -682,8 +476,8 @@ export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps
682
476
 
683
477
  export declare interface EditWorkspaceProps {
684
478
  types: AppConfigInterface[];
685
- workspace: WorkspaceItemInterface;
686
- onSuccess: (workspace?: WorkspaceItemInterface) => void;
479
+ workspace: WorkspaceInterface;
480
+ onSuccess: (workspace?: WorkspaceInterface) => void;
687
481
  }
688
482
 
689
483
  export declare function EmbedWorkbenchPage(): JSX.Element;
@@ -743,14 +537,6 @@ declare interface ErrorSnackbarProps {
743
537
  error: Error | string | null | undefined;
744
538
  }
745
539
 
746
- export declare const eventBus: EventEmitter;
747
-
748
- declare class EventEmitter {
749
- private events;
750
- on(event: string, listener: (...args: any[]) => void): () => void;
751
- emit(event: string, ...args: unknown[]): void;
752
- }
753
-
754
540
  export declare function FeatureRegistryProvider({ appName, children }: FeatureRegistryProviderProps): JSX.Element;
755
541
 
756
542
  export declare interface FeatureRegistryProviderProps {
@@ -759,111 +545,11 @@ export declare interface FeatureRegistryProviderProps {
759
545
  children: ReactNode;
760
546
  }
761
547
 
762
- declare interface FileContent {
763
- path: string;
764
- content: string;
765
- }
766
-
767
- declare interface FileExplorerNode {
768
- id: string;
769
- name: string;
770
- path: string;
771
- type: FileNodeType;
772
- children?: FileExplorerNode[];
773
- }
774
-
775
- declare type FileNodeType = 'file' | 'folder';
776
-
777
548
  export declare type FilterOption = string | {
778
549
  label: string;
779
550
  value: string;
780
551
  };
781
552
 
782
- export declare function getAppTypesCacheKey(envKey: string): string[];
783
-
784
- export declare function getAvailableEnvironmentsCacheKey(envKey: string): string[];
785
-
786
- export declare function getChildWorkflowsCacheKey(envKey: string, parentId: string): string[];
787
-
788
- export declare function getDashboardStatsCacheKey(envKey: string): string[];
789
-
790
- export declare function getDocumentCacheKey(envKey: string, documentId: string): string[];
791
-
792
- export declare function getDocumentsCacheKey(envKey: string, workflowId: string): string[];
793
-
794
- export declare function getFileContentCacheKey(envKey: string, workflowId: string, filePath: string): string[];
795
-
796
- export declare function getFileTreeCacheKey(envKey: string, workflowId: string): string[];
797
-
798
- export declare function getGitLogCacheKey(envKey: string, workspaceId: string): string[];
799
-
800
- export declare function getGitRemoteCacheKey(envKey: string, workspaceId: string): string[];
801
-
802
- export declare function getGitStatusCacheKey(envKey: string, workspaceId: string): string[];
803
-
804
- export declare function getHealthCacheKey(envKey: string): string[];
805
-
806
- /**
807
- * Centralized cache key builders for React Query.
808
- *
809
- * Conventions:
810
- * - All keys start with a domain prefix, followed by envKey for environment scoping.
811
- * - Singular keys (e.g. 'workflow') are for single-entity queries.
812
- * - Plural keys (e.g. 'workflows') are for list/filter queries.
813
- * - Mutations should invalidate the plural key to catch all list variations.
814
- * - Use `select` (not `.then()` in queryFn) for response transformations.
815
- */
816
- export declare function getMeCacheKey(envKey: string): string[];
817
-
818
- export declare function getSecretsCacheKey(envKey: string, workspaceId: string): string[];
819
-
820
- export declare function getStudioAppsCacheKey(envKey: string): string[];
821
-
822
- export declare function getToolConfigCacheKey(envKey: string, toolName: string): string[];
823
-
824
- export declare function getToolConfigsCacheKey(envKey: string): string[];
825
-
826
- export declare function getWorkflowCacheKey(envKey: string, id: string): string[];
827
-
828
- export declare function getWorkflowConfigCacheKey(envKey: string, alias: string): string[];
829
-
830
- export declare function getWorkflowsCacheKey(envKey: string): string[];
831
-
832
- export declare function getWorkflowSourceCacheKey(envKey: string, alias: string): string[];
833
-
834
- export declare function getWorkflowStatusCacheKey(envKey: string, id: string): string[];
835
-
836
- export declare function getWorkflowTypesCacheKey(envKey: string, appBlockName: string): string[];
837
-
838
- export declare function getWorkspaceCacheKey(envKey: string, id: string): string[];
839
-
840
- export declare function getWorkspacesCacheKey(envKey: string): string[];
841
-
842
- declare interface GitCommit {
843
- hash: string;
844
- shortHash: string;
845
- message: string;
846
- author: string;
847
- date: string;
848
- }
849
-
850
- declare interface GitLogResponse {
851
- commits: GitCommit[];
852
- }
853
-
854
- declare interface GitRemoteResponse {
855
- name: string;
856
- url: string;
857
- }
858
-
859
- declare interface GitStatusResponse {
860
- branch: string;
861
- staged: string[];
862
- modified: string[];
863
- untracked: string[];
864
- deleted: string[];
865
- }
866
-
867
553
  export declare const GoogleLogo: default_2.FC<GoogleLogoProps>;
868
554
 
869
555
  declare interface GoogleLogoProps {
@@ -872,8 +558,6 @@ declare interface GoogleLogoProps {
872
558
 
873
559
  export declare function Input({ className, type, ...props }: React_2.ComponentProps<'input'>): JSX.Element;
874
560
 
875
- export declare function InvalidationEventsProvider(): null;
876
-
877
561
  declare interface Item {
878
562
  id: string;
879
563
  }
@@ -986,6 +670,15 @@ export declare class LocalRouter implements StudioRouter {
986
670
  getTheme(): 'local' | 'cloud';
987
671
  }
988
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
+
989
682
  export declare const MainLayout: ({ children, breadcrumbsData, headerMenu, }: {
990
683
  children: ReactNode;
991
684
  breadcrumbsData: BreadCrumbsData[];
@@ -1087,12 +780,6 @@ export declare function ScrollArea({ className, children, ...props }: React_2.Co
1087
780
 
1088
781
  export declare function ScrollBar({ className, orientation, ...props }: React_2.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): JSX.Element;
1089
782
 
1090
- declare interface SecretItem {
1091
- id: string;
1092
- key: string;
1093
- hasValue: boolean;
1094
- }
1095
-
1096
783
  export declare const secretsFeature: StudioFeature;
1097
784
 
1098
785
  export declare function Select({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
@@ -1237,33 +924,6 @@ export declare function Slider({ className, defaultValue, value, min, max, ...pr
1237
924
 
1238
925
  export declare const Snackbar: default_2.FC<BaseSnackbarProps>;
1239
926
 
1240
- export declare function SseProvider(): null;
1241
-
1242
- declare interface StartWorkflowPayload {
1243
- workflowName: string;
1244
- workspaceId: string;
1245
- args?: Record<string, unknown>;
1246
- }
1247
-
1248
- declare interface StaticDocumentMeta {
1249
- hidden?: boolean;
1250
- mimeType?: string;
1251
- level?: 'debug' | 'info' | 'warning' | 'error';
1252
- enableAtPlaces?: string[];
1253
- hideAtPlaces?: string[];
1254
- }
1255
-
1256
- declare interface StudioAppConfig {
1257
- appName: string;
1258
- title: string;
1259
- description?: string;
1260
- ui?: StudioUiConfig;
1261
- features: StudioFeatureRegistration[];
1262
- extensions?: Record<string, unknown[]>;
1263
- workflows: StudioWorkflowConfig[];
1264
- documents: StudioDocumentConfig[];
1265
- }
1266
-
1267
927
  declare interface StudioContext {
1268
928
  router: StudioRouter;
1269
929
  environment: Environment;
@@ -1271,30 +931,12 @@ declare interface StudioContext {
1271
931
 
1272
932
  declare const StudioContext: Context<StudioContext | null>;
1273
933
 
1274
- declare interface StudioDocumentConfig {
1275
- documentName: string;
1276
- title?: string;
1277
- description?: string;
1278
- ui?: {
1279
- widgets?: StudioWidgetConfig[];
1280
- };
1281
- tags?: string[];
1282
- meta?: StaticDocumentMeta;
1283
- schema?: Record<string, unknown>;
1284
- }
1285
-
1286
934
  export declare interface StudioFeature {
1287
935
  id: string;
1288
936
  documentRenderers?: Record<string, ComponentType<DocumentRendererProps>>;
1289
937
  sidebarPanel?: StudioFeatureSidebarPanel;
1290
938
  }
1291
939
 
1292
- declare interface StudioFeatureRegistration {
1293
- id: string;
1294
- enabled: boolean;
1295
- config: Record<string, unknown>;
1296
- }
1297
-
1298
940
  export declare interface StudioFeatureSidebarPanel {
1299
941
  id: string;
1300
942
  label: string;
@@ -1359,22 +1001,6 @@ export declare interface StudioRouter {
1359
1001
 
1360
1002
  export declare const StudioSidebar: () => JSX.Element;
1361
1003
 
1362
- declare interface StudioUiConfig {
1363
- widgets?: StudioWidgetConfig[];
1364
- }
1365
-
1366
- declare interface StudioWidgetConfig {
1367
- widget: string;
1368
- options?: Record<string, unknown>;
1369
- }
1370
-
1371
- declare interface StudioWorkflowConfig {
1372
- workflowName: string;
1373
- title?: string;
1374
- description?: string;
1375
- schema?: Record<string, unknown>;
1376
- }
1377
-
1378
1004
  export declare function Switch({ className, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root>): JSX.Element;
1379
1005
 
1380
1006
  export declare function Table({ className, ...props }: React_2.ComponentProps<'table'>): JSX.Element;
@@ -1405,48 +1031,51 @@ export declare function TooltipProvider({ delayDuration, ...props }: React_2.Com
1405
1031
 
1406
1032
  export declare function TooltipTrigger({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Trigger>): JSX.Element;
1407
1033
 
1408
- export declare function useApiClient(): {
1409
- envKey: string;
1410
- api: ApiClient;
1411
- };
1412
-
1413
- export declare function useAppsConfig(): UseQueryResult<StudioAppConfig[], Error>;
1034
+ export { useAppsConfig }
1414
1035
 
1415
- export declare function useAvailableEnvironments(options?: {
1416
- enabled?: boolean;
1417
- }): UseQueryResult<AvailableEnvironmentInterface[], Error>;
1036
+ export { useAvailableEnvironments }
1418
1037
 
1419
1038
  /**
1420
1039
  * Batch delete workflows.
1421
1040
  */
1422
- 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>;
1423
1048
 
1424
- export declare function useBatchDeleteWorkspaces(): UseMutationResult<void, Error, string[], unknown>;
1049
+ export { useBatchDeleteWorkspaces }
1425
1050
 
1426
1051
  /**
1427
1052
  * Fetch child workflows by parentId.
1428
1053
  */
1429
- 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
+ }[]>;
1430
1069
 
1431
1070
  export declare const useComponentOverrides: () => ComponentOverrides;
1432
1071
 
1433
- /**
1434
- * Create a new workflow.
1435
- */
1436
- export declare function useCreateWorkflow(): UseMutationResult<WorkflowFullInterface, Error, {
1437
- workflowCreateDto: WorkflowCreateInterface;
1438
- }, unknown>;
1072
+ export { useCreateWorkflow }
1439
1073
 
1440
- export declare function useCreateWorkspace(): UseMutationResult<WorkspaceInterface, Error, {
1441
- workspaceCreateDto: WorkspaceCreateInterface;
1442
- }, unknown>;
1074
+ export { useCreateWorkspace }
1443
1075
 
1444
- /**
1445
- * Delete a single workflow.
1446
- */
1447
- export declare function useDeleteWorkflow(): UseMutationResult<void, Error, string, unknown>;
1076
+ export { useDeleteWorkflow }
1448
1077
 
1449
- export declare function useDeleteWorkspace(): UseMutationResult<void, Error, string, unknown>;
1078
+ export { useDeleteWorkspace }
1450
1079
 
1451
1080
  /**
1452
1081
  * Returns a Map of document configs keyed by documentName.
@@ -1457,9 +1086,33 @@ export declare function useDocumentConfigs(): Map<string, StudioDocumentConfig>;
1457
1086
  /**
1458
1087
  * Fetch a filtered, sorted, paginated list of workflows.
1459
1088
  */
1460
- 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
+ }>>;
1461
1104
 
1462
- 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
+ }>>;
1463
1116
 
1464
1117
  export declare function useIsMobile(): boolean;
1465
1118
 
@@ -1480,10 +1133,7 @@ slotId: string;
1480
1133
 
1481
1134
  export declare const useRouter: (envId: string, embedPrefix?: string) => StudioRouter;
1482
1135
 
1483
- export declare function useSetFavouriteWorkspace(): UseMutationResult<void, Error, {
1484
- id: string;
1485
- isFavourite: boolean;
1486
- }, unknown>;
1136
+ export { useSetFavouriteWorkspace }
1487
1137
 
1488
1138
  export declare function useSidebar(): SidebarContextProps;
1489
1139
 
@@ -1493,46 +1143,53 @@ export declare const useStudioOptional: () => StudioContext | null;
1493
1143
 
1494
1144
  export declare function useStudioPreferences(): StudioPreferencesContextType;
1495
1145
 
1496
- /**
1497
- * Update an existing workflow.
1498
- */
1499
- export declare function useUpdateWorkflow(): UseMutationResult<WorkflowFullInterface, Error, {
1500
- id: string;
1501
- workflowUpdateDto: WorkflowUpdateInterface;
1502
- }, unknown>;
1146
+ export { useUpdateWorkflow }
1503
1147
 
1504
- export declare function useUpdateWorkspace(): UseMutationResult<WorkspaceInterface, Error, {
1505
- id: string;
1506
- workspaceUpdateDto: WorkspaceUpdateInterface;
1507
- }, unknown>;
1148
+ export { useUpdateWorkspace }
1508
1149
 
1509
- /**
1510
- * Fetch a single workflow (full details) by ID.
1511
- */
1512
- export declare function useWorkflow(id: string | undefined): UseQueryResult<WorkflowFullInterface, Error>;
1150
+ export { useWorkflow }
1513
1151
 
1514
- /**
1515
- * Fetch checkpoints for a workflow run.
1516
- */
1517
- export declare function useWorkflowCheckpoints(workflowId: string): UseQueryResult<WorkflowCheckpoint[], Error>;
1152
+ export { useWorkflowCheckpoints }
1518
1153
 
1519
1154
  /**
1520
1155
  * Fetch workflow config by workflow name (the identifier stored on the workflow entity).
1521
1156
  */
1522
- export declare function useWorkflowConfigByName(workflowName: string | undefined): UseQueryResult<WorkflowConfigInterface, Error>;
1523
-
1524
- /**
1525
- * Fetch workflow source by workflow name (class name).
1526
- */
1527
- export declare function useWorkflowSource(workflowName: string | undefined): UseQueryResult<WorkflowSourceInterface, Error>;
1528
-
1529
- /**
1530
- * Fetch the slim live status for a single workflow — used by embedded sub-workflow link cards
1531
- * to react to state changes without pulling the full workflow payload.
1532
- */
1533
- export declare function useWorkflowStatus(id: string | undefined): UseQueryResult<WorkflowStatusInterface, Error>;
1534
-
1535
- 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 }
1536
1193
 
1537
1194
  export declare function useWorkspaceEnvironments(workspaceId?: string): UseQueryResult<WorkspaceEnvironmentInterface[], Error>;
1538
1195
 
@@ -1541,23 +1198,8 @@ export declare function WorkbenchPage({ getPreviewUrl, getEnvironmentPreviewUrl,
1541
1198
  getEnvironmentPreviewUrl?: (env: WorkspaceEnvironmentInterface, workflowId?: string) => string;
1542
1199
  }): JSX.Element;
1543
1200
 
1544
- declare interface WorkflowCheckpoint {
1545
- id: string;
1546
- place: string;
1547
- transitionId: string | null;
1548
- transitionFrom: string | null;
1549
- version: number;
1550
- createdAt: string;
1551
- }
1552
-
1553
1201
  export declare const WorkflowDebugPage: default_2.FC;
1554
1202
 
1555
- declare interface WorkflowRunResult {
1556
- workflowId: string;
1557
- workspaceId: string;
1558
- status: string;
1559
- }
1560
-
1561
1203
  export declare const WorkspacePage: () => JSX.Element;
1562
1204
 
1563
1205
  export declare const WorkspaceRunsPage: () => JSX.Element;