@burdenoff/fluidgrids-fe-sdk 2026.1105.1 → 2026.1105.3
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.
- package/README.md +30 -0
- package/dist/ExecutionDetailPage-JXGPSLS3.js +30 -0
- package/dist/{WorkflowsList-EV725VG5.js → ExecutionsListPage-U3TC5JUI.js} +11 -8
- package/dist/{WorkflowBuilder-CRR5WP4V.js → WorkflowBuilder-6DOD6WWH.js} +16 -13
- package/dist/{ExecutionsListPage-NQIQXMTY.js → WorkflowsList-XOWRQNST.js} +10 -8
- package/dist/{agentTools-PN4W7QZH.js → agentTools-YQBN33WG.js} +7 -5
- package/dist/{chunk-VFVN7D3A.js → chunk-22U3TUKZ.js} +3 -93
- package/dist/{chunk-XLI75E3D.js → chunk-2WUVF4EQ.js} +2 -2
- package/dist/{chunk-GVIYGJQG.js → chunk-3MZOYJ5I.js} +1 -1
- package/dist/{chunk-L44BRLW5.js → chunk-3ZYRLGDF.js} +612 -22
- package/dist/{chunk-FCT6POFX.js → chunk-4NNF7DIB.js} +1 -1
- package/dist/chunk-5DVP2UYH.js +1924 -0
- package/dist/{chunk-JDQYGH4Q.js → chunk-EKDUYCTS.js} +4 -4
- package/dist/{chunk-6P7DOBVN.js → chunk-EYQ7GJRW.js} +2 -2
- package/dist/{chunk-HLAUK5GM.js → chunk-FVWRGL7S.js} +1 -1
- package/dist/{chunk-AZKVI4YN.js → chunk-G33OMSW6.js} +8 -6
- package/dist/{chunk-D7G5VWSH.js → chunk-G774FI2E.js} +2 -2
- package/dist/{chunk-DANOMJ5I.js → chunk-IJ7UIDCW.js} +7 -6
- package/dist/{chunk-EC2AN74G.js → chunk-IL343FKX.js} +1 -1
- package/dist/chunk-JYYN3CLL.js +32 -0
- package/dist/{chunk-O2EB7UT2.js → chunk-KAWRHIJZ.js} +2 -2
- package/dist/{chunk-JC4D7RQ6.js → chunk-KN37RIFC.js} +5 -4
- package/dist/{chunk-AASHQI77.js → chunk-KZCNJAMK.js} +2 -1
- package/dist/{chunk-BHAKNT5M.js → chunk-LDWBMCX4.js} +4 -3
- package/dist/{chunk-MSQAULLG.js → chunk-MA6I4KY5.js} +186 -7
- package/dist/{chunk-R3Z7W4EX.js → chunk-MP44TAOO.js} +276 -196
- package/dist/{chunk-FJSXXO5W.js → chunk-MY7SEUXM.js} +1 -1
- package/dist/{chunk-I3QPAEL6.js → chunk-NMQENSPW.js} +15 -14
- package/dist/chunk-NZAYYUQ4.js +172 -0
- package/dist/{chunk-6EZJ5J3B.js → chunk-NZFPCTIS.js} +4 -4
- package/dist/{chunk-MZFJL4X3.js → chunk-OXXXUAWM.js} +1 -1
- package/dist/chunk-SDZEAIIE.js +9 -0
- package/dist/{chunk-CGR3AEZU.js → chunk-TCIBTMJI.js} +68 -2
- package/dist/{chunk-4QB6S7YW.js → chunk-TJAG2DQT.js} +9 -38
- package/dist/{chunk-MQN6YDX4.js → chunk-TLHX4DK4.js} +7 -6
- package/dist/{chunk-AG3VC7Y2.js → chunk-VESQH55Q.js} +2 -2
- package/dist/chunk-WZ3EJVS6.js +93 -0
- package/dist/{chunk-OCJTTHTS.js → chunk-Y7FKJJMF.js} +1 -9
- package/dist/{chunk-HOTVUVZG.js → chunk-YGOGJDN4.js} +2 -2
- package/dist/{chunk-AVHBWJRY.js → chunk-Z3ABLERJ.js} +3 -1
- package/dist/{chunk-C26QAWCT.js → chunk-ZBPRNWKY.js} +235 -2146
- package/dist/{chunk-2QOAJF7V.js → chunk-ZLBTUCC2.js} +4 -3
- package/dist/code-editor-field-WWPDMF4O.js +3 -0
- package/dist/executions.js +16 -12
- package/dist/history.js +9 -6
- package/dist/index.d.ts +77 -1
- package/dist/index.js +46 -41
- package/dist/{node-detail-view-3VG7XFIZ.js → node-detail-view-U5HOP2WX.js} +35 -9
- package/dist/nodes.js +2 -2
- package/dist/observability.js +9 -6
- package/dist/{quick-config-panel-GB7SDWHD.js → quick-config-panel-XAISBW6Y.js} +10 -7
- package/dist/settings.js +9 -6
- package/dist/templates.js +15 -12
- package/dist/workflow-builder.js +17 -14
- package/dist/workflow-preview.d.ts +158 -0
- package/dist/workflow-preview.js +721 -0
- package/dist/workflows-list.js +10 -8
- package/package.json +5 -1
- package/dist/ExecutionDetailPage-YBAMVPMB.js +0 -26
- package/dist/code-editor-field-XWUVOKTA.js +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TEMPLATE_STORE_CATEGORIES, TemplateCard, useTemplateSubmissions, usePublishToStore } from './chunk-
|
|
2
|
-
import { QuotaExhaustedDialog } from './chunk-
|
|
1
|
+
import { useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TEMPLATE_STORE_CATEGORIES, TemplateCard, useTemplateSubmissions, usePublishToStore } from './chunk-NMQENSPW.js';
|
|
2
|
+
import { QuotaExhaustedDialog } from './chunk-KAWRHIJZ.js';
|
|
3
3
|
import { templatesControls } from './chunk-FNZZ5JJL.js';
|
|
4
|
-
import { useWorkflowDefinitions, useDuplicateWorkflow, useLazyWorkflowDefinition } from './chunk-
|
|
4
|
+
import { useWorkflowDefinitions, useDuplicateWorkflow, useLazyWorkflowDefinition } from './chunk-YGOGJDN4.js';
|
|
5
5
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
6
6
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
7
|
-
import { BILLING_PLANS_PATH, useFluidGridsAnalytics, emitTemplateUsed, isQuotaExhaustedFailure } from './chunk-
|
|
7
|
+
import { BILLING_PLANS_PATH, useFluidGridsAnalytics, emitTemplateUsed, isQuotaExhaustedFailure } from './chunk-ZBPRNWKY.js';
|
|
8
8
|
import { SdkPermissionButton, FLUIDGRIDS_PERMISSIONS } from './chunk-5375NUIO.js';
|
|
9
9
|
import { useTr } from './chunk-UULVIT25.js';
|
|
10
10
|
import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { operatorSpec, normaliseAssertRules, describeAssertRuleProblem } from './chunk-JDLQ6QIB.js';
|
|
2
|
-
import { useEntityTags, useTagEntity, useUntagEntity } from './chunk-
|
|
2
|
+
import { useEntityTags, useTagEntity, useUntagEntity } from './chunk-IL343FKX.js';
|
|
3
3
|
import { notifyFluidGridsAiCreditsUpdated } from './chunk-Y53CVZVV.js';
|
|
4
4
|
import { ErrorType } from './chunk-H4ERTSMX.js';
|
|
5
|
-
import { WorkflowProposalDocument, ProposeRunFixDocument, ProposeWorkflowChangeDocument, ApplyWorkflowProposalDocument, RejectWorkflowProposalDocument, CancelWorkflowProposalDocument, WorkflowTestCasesDocument, WorkflowTestRunsDocument, WorkflowTestRunDocument, CreateWorkflowTestCaseDocument, UpdateWorkflowTestCaseDocument, DeleteWorkflowTestCaseDocument, RunWorkflowTestsDocument, CreateWorkflowTestCaseFromRunDocument } from './chunk-
|
|
5
|
+
import { WorkflowProposalDocument, ProposeRunFixDocument, ProposeWorkflowChangeDocument, ApplyWorkflowProposalDocument, RejectWorkflowProposalDocument, CancelWorkflowProposalDocument, WorkflowTestCasesDocument, WorkflowTestRunsDocument, WorkflowTestRunDocument, CreateWorkflowTestCaseDocument, UpdateWorkflowTestCaseDocument, DeleteWorkflowTestCaseDocument, RunWorkflowTestsDocument, CreateWorkflowTestCaseFromRunDocument } from './chunk-Z3ABLERJ.js';
|
|
6
6
|
import { useTr } from './chunk-UULVIT25.js';
|
|
7
7
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
8
8
|
import { throwIfResultError, isForbiddenError } from './chunk-US5QSLPV.js';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { asRecord, ConditionTreeBuilder, SwitchRulesEditor, casesFromRules, isStringOptionList, optionText, coerceNumber, paramsFromOperation, resolveLoadOptionsSpec, optionListValues, parseMappingValue, optionListText } from './chunk-ZLBTUCC2.js';
|
|
2
|
+
import { CodeEditorField, normalizeCodeLanguage } from './chunk-KZCNJAMK.js';
|
|
3
3
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-GTEBQQ7J.js';
|
|
4
|
-
import {
|
|
4
|
+
import { AgentDefinitionSelectField } from './chunk-22U3TUKZ.js';
|
|
5
|
+
import { isAgentNodeType } from './chunk-WZ3EJVS6.js';
|
|
5
6
|
import { readAssertRulesSetting, rowsFromRules, normaliseAssertRules, ruleFromRow, describeAssertRuleProblem, operatorSpec, ASSERT_OPERATORS, emptyAssertRuleRow } from './chunk-JDLQ6QIB.js';
|
|
6
|
-
import {
|
|
7
|
-
import { useBuilderReadOnly } from './chunk-
|
|
8
|
-
import {
|
|
7
|
+
import { isParamVisible, ConnectionSelector, structuredParameterType, useRunGuard, FluidGridsContext, ExpressionEditor, formatParameterValue, parseParameterValue, useFluidGridsAnalytics, openRunQuotaUpgradePrompt } from './chunk-ZBPRNWKY.js';
|
|
8
|
+
import { useBuilderReadOnly } from './chunk-SDZEAIIE.js';
|
|
9
|
+
import { useFlowStore } from './chunk-5DVP2UYH.js';
|
|
10
|
+
import { useRunFromNodeEligibilityQuery, PreviewScheduleDocument, WebhookTestListenerDocument, StopWebhookTestListenerDocument, ListenForWebhookTestEventDocument } from './chunk-Z3ABLERJ.js';
|
|
9
11
|
import { useTr } from './chunk-UULVIT25.js';
|
|
10
12
|
import { getFluidGridsClientSafe, getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
11
13
|
import { throwIfResultError, describeOperationError } from './chunk-US5QSLPV.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { versionsOfWorkflow, VersionDiffDialog } from './chunk-
|
|
1
|
+
import { versionsOfWorkflow, VersionDiffDialog } from './chunk-TJAG2DQT.js';
|
|
2
2
|
import { historyControls } from './chunk-FNZZ5JJL.js';
|
|
3
|
-
import { useWorkflowDefinitions, useRestoreWorkflowVersion } from './chunk-
|
|
3
|
+
import { useWorkflowDefinitions, useRestoreWorkflowVersion } from './chunk-YGOGJDN4.js';
|
|
4
4
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
5
5
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
6
6
|
import { useTr } from './chunk-UULVIT25.js';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { CreateWorkflowRefusalDialog, firstWorkflowProgress, GUIDED_TOUR_STATE, builderPathFor } from './chunk-
|
|
2
|
-
import { useExecutions } from './chunk-
|
|
3
|
-
import { useExportWorkflowAs, WorkflowShareDialog, downloadWorkflowExport, importAcceptAttribute, canEditWorkflow, canShareWorkflow, QuotaExhaustedDialog, importFileKind, parseWorkflowImport, CODE_EXPORT_FORMATS, ImportSourceError, assertImportByteSize, MAX_IMPORT_ARCHIVE_BYTES, readProjectArchive, checkTypeScriptImport, MAX_IMPORT_SOURCE_BYTES, typeScriptModuleFile, typeScriptImportSource, workflowNameFromFile, primaryImportModule } from './chunk-
|
|
1
|
+
import { CreateWorkflowRefusalDialog, firstWorkflowProgress, GUIDED_TOUR_STATE, builderPathFor } from './chunk-FVWRGL7S.js';
|
|
2
|
+
import { useExecutions } from './chunk-VESQH55Q.js';
|
|
3
|
+
import { useExportWorkflowAs, WorkflowShareDialog, downloadWorkflowExport, importAcceptAttribute, canEditWorkflow, canShareWorkflow, QuotaExhaustedDialog, importFileKind, parseWorkflowImport, CODE_EXPORT_FORMATS, ImportSourceError, assertImportByteSize, MAX_IMPORT_ARCHIVE_BYTES, readProjectArchive, checkTypeScriptImport, MAX_IMPORT_SOURCE_BYTES, typeScriptModuleFile, typeScriptImportSource, workflowNameFromFile, primaryImportModule } from './chunk-KAWRHIJZ.js';
|
|
4
4
|
import { workflowsListControls } from './chunk-FNZZ5JJL.js';
|
|
5
|
-
import { useCreateWorkflow, useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, usePreviewN8nImport, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-
|
|
5
|
+
import { useCreateWorkflow, useWorkflowDefinitions, useLazyWorkflowDefinition, useImportWorkflow, usePreviewN8nImport, useDuplicateWorkflow, useDeleteWorkflow } from './chunk-YGOGJDN4.js';
|
|
6
6
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
7
7
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
8
|
-
import { createThenOpen, FluidGridsContext, useFluidGridsFlag, FLUIDGRIDS_FLAGS, BILLING_PLANS_PATH,
|
|
8
|
+
import { createThenOpen, FluidGridsContext, useFluidGridsFlag, FLUIDGRIDS_FLAGS, BILLING_PLANS_PATH, isQuotaExhaustedFailure } from './chunk-ZBPRNWKY.js';
|
|
9
9
|
import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton, SdkPermissionGate } from './chunk-5375NUIO.js';
|
|
10
|
-
import {
|
|
10
|
+
import { useFlowStore } from './chunk-5DVP2UYH.js';
|
|
11
|
+
import { WorkflowFoldersDocument, CreateWorkflowFolderDocument, RenameWorkflowFolderDocument, MoveWorkflowFolderDocument, DeleteWorkflowFolderDocument, WorkflowProjectsDocument, CreateWorkflowProjectDocument, RenameWorkflowProjectDocument, DeleteWorkflowProjectDocument, BulkMoveWorkflowsToFolderDocument, BulkAssignWorkflowsToProjectDocument, BulkDeleteWorkflowsDocument } from './chunk-Z3ABLERJ.js';
|
|
11
12
|
import { useTr } from './chunk-UULVIT25.js';
|
|
12
13
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
13
14
|
import { describeOperationError, throwIfResultError } from './chunk-US5QSLPV.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, DataTablesTagsDocument } from './chunk-
|
|
1
|
+
import { FluidgridsEntityTagsDocument, AvailableFluidgridsTagsDocument, SearchFluidgridsTagsDocument, TagFluidgridsEntityDocument, UntagFluidgridsEntityDocument, ReplaceFluidgridsEntityTagsDocument, CreateFluidgridsTagDocument, DataTablesTagsDocument } from './chunk-Z3ABLERJ.js';
|
|
2
2
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
3
3
|
import { useState, useCallback, useEffect } from 'react';
|
|
4
4
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { mergeStickyNotes } from './chunk-5DVP2UYH.js';
|
|
2
|
+
|
|
3
|
+
// src/builder/live/definition-canvas.ts
|
|
4
|
+
function isRecord(value) {
|
|
5
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function hasId(item) {
|
|
8
|
+
return isRecord(item) && typeof item.id === "string" && item.id.length > 0;
|
|
9
|
+
}
|
|
10
|
+
function canvasFromDefinition(definitionJson) {
|
|
11
|
+
let definition = definitionJson;
|
|
12
|
+
if (typeof definition === "string") {
|
|
13
|
+
try {
|
|
14
|
+
definition = JSON.parse(definition);
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (!isRecord(definition)) return null;
|
|
20
|
+
const data = isRecord(definition.data) ? definition.data : definition;
|
|
21
|
+
if (!Array.isArray(data.nodes)) return null;
|
|
22
|
+
const nodes = mergeStickyNotes({
|
|
23
|
+
nodes: data.nodes,
|
|
24
|
+
stickyNotes: Array.isArray(data.stickyNotes) ? data.stickyNotes : []
|
|
25
|
+
}).filter(hasId);
|
|
26
|
+
const edges = (Array.isArray(data.edges) ? data.edges : []).filter(
|
|
27
|
+
hasId
|
|
28
|
+
);
|
|
29
|
+
return { nodes, edges };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { canvasFromDefinition };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFluidGridsAnalytics, emitWorkflowLimitHit, emitUpgradeClicked, WORKFLOWS_QUOTA_NAME } from './chunk-
|
|
2
|
-
import { ExportWorkflowCodeDocument, ShareWorkflowDocument, WorkflowSharingDocument } from './chunk-
|
|
1
|
+
import { useFluidGridsAnalytics, emitWorkflowLimitHit, emitUpgradeClicked, WORKFLOWS_QUOTA_NAME } from './chunk-ZBPRNWKY.js';
|
|
2
|
+
import { ExportWorkflowCodeDocument, ShareWorkflowDocument, WorkflowSharingDocument } from './chunk-Z3ABLERJ.js';
|
|
3
3
|
import { useTr } from './chunk-UULVIT25.js';
|
|
4
4
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
5
5
|
import { describeOperationError, throwIfResultError } from './chunk-US5QSLPV.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { AgentsTab } from './chunk-
|
|
1
|
+
import { AgentsTab } from './chunk-22U3TUKZ.js';
|
|
2
2
|
import { ActionPoliciesTab } from './chunk-AMXJLVZN.js';
|
|
3
|
-
import { LogStreamingTab } from './chunk-
|
|
3
|
+
import { LogStreamingTab } from './chunk-4NNF7DIB.js';
|
|
4
4
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useFluidGridsFlag, FLUIDGRIDS_FLAGS, useSaveStatusStore, findSaveConflict, useDurableParityEnabled, useConnections } from './chunk-ZBPRNWKY.js';
|
|
6
6
|
import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS } from './chunk-5375NUIO.js';
|
|
7
|
+
import { useFlowStore } from './chunk-5DVP2UYH.js';
|
|
7
8
|
import { getGlobalStoreClient } from './chunk-AU7LACOY.js';
|
|
8
|
-
import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery, DurableHistoryCapsDocument, UpdateDurableHistoryCapsDocument } from './chunk-
|
|
9
|
+
import { useWorkflowDefinitionQuery, useUpdateWorkflowDefinitionMutation, useWorkflowDefinitionsQuery, DurableHistoryCapsDocument, UpdateDurableHistoryCapsDocument } from './chunk-Z3ABLERJ.js';
|
|
9
10
|
import { useTr } from './chunk-UULVIT25.js';
|
|
10
11
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
11
12
|
import { throwIfResultError, describeOperationError } from './chunk-US5QSLPV.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useBuilderReadOnly
|
|
1
|
+
import { useBuilderReadOnly } from './chunk-SDZEAIIE.js';
|
|
2
|
+
import { toCodeMirrorDiagnostics } from './chunk-Y7FKJJMF.js';
|
|
2
3
|
import { useMemo, useRef, useEffect, useState } from 'react';
|
|
3
4
|
import CodeMirror, { EditorView } from '@uiw/react-codemirror';
|
|
4
5
|
import { lintGutter, setDiagnostics } from '@codemirror/lint';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Card, FluidGridsMark } from './chunk-
|
|
1
|
+
import { Card, FluidGridsMark } from './chunk-NMQENSPW.js';
|
|
2
2
|
import { Input } from './chunk-IEVSFCFS.js';
|
|
3
3
|
import { Button } from './chunk-BQXVT32O.js';
|
|
4
|
-
import { useWorkflowDefinition } from './chunk-
|
|
5
|
-
import { FluidGridsProvider
|
|
4
|
+
import { useWorkflowDefinition } from './chunk-YGOGJDN4.js';
|
|
5
|
+
import { FluidGridsProvider } from './chunk-ZBPRNWKY.js';
|
|
6
6
|
import { cn } from './chunk-JL7CASN5.js';
|
|
7
|
+
import { useFlowStore } from './chunk-5DVP2UYH.js';
|
|
7
8
|
import { useTr } from './chunk-UULVIT25.js';
|
|
8
9
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
9
10
|
import { MarkerType, ReactFlowProvider, useReactFlow, ReactFlow, Background, Controls, MiniMap, Handle, Position } from '@xyflow/react';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { validateDateRange, statusCountFilter, STATUS_COUNT_GROUP_BY, statusCountsOf } from './chunk-
|
|
2
|
-
import {
|
|
1
|
+
import { validateDateRange, statusCountFilter, STATUS_COUNT_GROUP_BY, statusCountsOf } from './chunk-VESQH55Q.js';
|
|
2
|
+
import { isAgentNodeType } from './chunk-WZ3EJVS6.js';
|
|
3
|
+
import { useAvailableTags, formatRunVersion, nodeDisplayTitle } from './chunk-IL343FKX.js';
|
|
3
4
|
import { executionsControls } from './chunk-FNZZ5JJL.js';
|
|
4
5
|
import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
|
|
5
|
-
import { useDurableParityEnabled } from './chunk-
|
|
6
|
-
import { SetWorkflowRunVersioningOverrideDocument, WorkflowRunsCountDocument, DurableParityRunFieldsDocument, WorkflowRunPendingDocument, WorkflowRunMetadataDocument } from './chunk-
|
|
6
|
+
import { useDurableParityEnabled } from './chunk-ZBPRNWKY.js';
|
|
7
|
+
import { SetWorkflowRunVersioningOverrideDocument, WorkflowRunsCountDocument, DurableParityRunFieldsDocument, WorkflowRunPendingDocument, WorkflowRunMetadataDocument } from './chunk-Z3ABLERJ.js';
|
|
7
8
|
import { useTr } from './chunk-UULVIT25.js';
|
|
8
9
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
9
10
|
import { throwIfResultError, describeOperationError } from './chunk-US5QSLPV.js';
|
|
@@ -1822,6 +1823,168 @@ function ExecutionTimeline({
|
|
|
1822
1823
|
] })
|
|
1823
1824
|
] }, dateLabel)) });
|
|
1824
1825
|
}
|
|
1826
|
+
|
|
1827
|
+
// src/modules/executions/utils/agent-trace.ts
|
|
1828
|
+
function isRecord(value) {
|
|
1829
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1830
|
+
}
|
|
1831
|
+
function asRecord(value) {
|
|
1832
|
+
if (isRecord(value)) return value;
|
|
1833
|
+
if (typeof value === "string") {
|
|
1834
|
+
const parsed = tryParseJson(value);
|
|
1835
|
+
return isRecord(parsed) ? parsed : null;
|
|
1836
|
+
}
|
|
1837
|
+
return null;
|
|
1838
|
+
}
|
|
1839
|
+
function tryParseJson(text) {
|
|
1840
|
+
const trimmed = text.trim();
|
|
1841
|
+
if (!trimmed || trimmed[0] !== "{" && trimmed[0] !== "[") return void 0;
|
|
1842
|
+
try {
|
|
1843
|
+
return JSON.parse(trimmed);
|
|
1844
|
+
} catch {
|
|
1845
|
+
return void 0;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
function stringOrNull(value) {
|
|
1849
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
1850
|
+
}
|
|
1851
|
+
function finiteOrNull(value) {
|
|
1852
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
1853
|
+
}
|
|
1854
|
+
function prettyValue(value) {
|
|
1855
|
+
if (value === null || value === void 0) return null;
|
|
1856
|
+
if (typeof value === "string") {
|
|
1857
|
+
if (!value.length) return null;
|
|
1858
|
+
const parsed = tryParseJson(value);
|
|
1859
|
+
return parsed === void 0 ? value : JSON.stringify(parsed, null, 2);
|
|
1860
|
+
}
|
|
1861
|
+
try {
|
|
1862
|
+
return JSON.stringify(value, null, 2) ?? null;
|
|
1863
|
+
} catch {
|
|
1864
|
+
return String(value);
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
function classifyObservation(observation) {
|
|
1868
|
+
const record = asRecord(observation);
|
|
1869
|
+
if (!record) return { outcome: "ok", reason: null };
|
|
1870
|
+
if (record.error === "tool_call_rejected") {
|
|
1871
|
+
return { outcome: "rejected", reason: stringOrNull(record.reason) };
|
|
1872
|
+
}
|
|
1873
|
+
const keys = Object.keys(record);
|
|
1874
|
+
if (typeof record.error === "string" && record.error.length > 0 && keys.every((key) => key === "error" || key === "reason")) {
|
|
1875
|
+
return { outcome: "failed", reason: record.error };
|
|
1876
|
+
}
|
|
1877
|
+
return { outcome: "ok", reason: null };
|
|
1878
|
+
}
|
|
1879
|
+
function toStep(raw, index) {
|
|
1880
|
+
if (!isRecord(raw)) return null;
|
|
1881
|
+
const tool = stringOrNull(raw.tool) ?? stringOrNull(raw.toolName) ?? stringOrNull(raw.action) ?? stringOrNull(raw.name);
|
|
1882
|
+
if (!tool) return null;
|
|
1883
|
+
const observationRaw = raw.observation ?? raw.output ?? raw.result;
|
|
1884
|
+
const { outcome, reason } = classifyObservation(observationRaw);
|
|
1885
|
+
const seconds = finiteOrNull(raw.duration);
|
|
1886
|
+
return {
|
|
1887
|
+
index,
|
|
1888
|
+
tool,
|
|
1889
|
+
args: prettyValue(raw.args ?? raw.input ?? raw.actionInput ?? raw.argsJson),
|
|
1890
|
+
observation: prettyValue(observationRaw),
|
|
1891
|
+
outcome,
|
|
1892
|
+
reason,
|
|
1893
|
+
// The Python node records seconds; the worker records no duration.
|
|
1894
|
+
durationMs: seconds === null ? null : Math.round(seconds * 1e3)
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
function toSteps(raw) {
|
|
1898
|
+
if (!Array.isArray(raw)) return [];
|
|
1899
|
+
const steps = [];
|
|
1900
|
+
for (const item of raw) {
|
|
1901
|
+
const step = toStep(item, steps.length);
|
|
1902
|
+
if (step) steps.push(step);
|
|
1903
|
+
}
|
|
1904
|
+
return steps;
|
|
1905
|
+
}
|
|
1906
|
+
function toPendingApprovals(raw) {
|
|
1907
|
+
if (!Array.isArray(raw)) return [];
|
|
1908
|
+
const pending = [];
|
|
1909
|
+
for (const item of raw) {
|
|
1910
|
+
if (!isRecord(item)) continue;
|
|
1911
|
+
const tool = stringOrNull(item.name) ?? stringOrNull(item.tool);
|
|
1912
|
+
if (!tool) continue;
|
|
1913
|
+
const callId = stringOrNull(item.id) ?? stringOrNull(item.callId);
|
|
1914
|
+
pending.push({
|
|
1915
|
+
key: callId ?? `pending-${pending.length}`,
|
|
1916
|
+
callId,
|
|
1917
|
+
tool,
|
|
1918
|
+
args: prettyValue(item.argsJson ?? item.args)
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1921
|
+
return pending;
|
|
1922
|
+
}
|
|
1923
|
+
var PAYLOAD_KEYS = [
|
|
1924
|
+
"steps",
|
|
1925
|
+
"response",
|
|
1926
|
+
"iterationCount",
|
|
1927
|
+
"tokensUsed",
|
|
1928
|
+
"toolCalls",
|
|
1929
|
+
"intermediateSteps"
|
|
1930
|
+
];
|
|
1931
|
+
function looksLikeAgentPayload(value) {
|
|
1932
|
+
return isRecord(value) && PAYLOAD_KEYS.some((key) => key in value);
|
|
1933
|
+
}
|
|
1934
|
+
function findAgentPayload(output) {
|
|
1935
|
+
if (looksLikeAgentPayload(output))
|
|
1936
|
+
return { operation: null, payload: output };
|
|
1937
|
+
for (const [key, value] of Object.entries(output)) {
|
|
1938
|
+
if (key.startsWith("_")) continue;
|
|
1939
|
+
if (looksLikeAgentPayload(value)) return { operation: key, payload: value };
|
|
1940
|
+
}
|
|
1941
|
+
return { operation: null, payload: null };
|
|
1942
|
+
}
|
|
1943
|
+
function durationOf(node) {
|
|
1944
|
+
const recorded = finiteOrNull(node.duration);
|
|
1945
|
+
if (recorded !== null) return recorded;
|
|
1946
|
+
if (!node.startTime || !node.endTime) return null;
|
|
1947
|
+
const ms = new Date(node.endTime).getTime() - new Date(node.startTime).getTime();
|
|
1948
|
+
return Number.isFinite(ms) && ms >= 0 ? ms : null;
|
|
1949
|
+
}
|
|
1950
|
+
function parseAgentNodeState(node) {
|
|
1951
|
+
const output = asRecord(node.output) ?? {};
|
|
1952
|
+
const { operation, payload } = findAgentPayload(output);
|
|
1953
|
+
const resumeState = asRecord(output._agentResumeState);
|
|
1954
|
+
const waitingForApproval = output._waiting === "tool_approval" || output._agentApprovalWaiting === true;
|
|
1955
|
+
let steps = toSteps(payload?.steps);
|
|
1956
|
+
if (!steps.length) steps = toSteps(resumeState?.steps);
|
|
1957
|
+
if (!steps.length) steps = toSteps(payload?.toolCalls);
|
|
1958
|
+
if (!steps.length) steps = toSteps(payload?.intermediateSteps);
|
|
1959
|
+
const pendingApprovals = waitingForApproval ? toPendingApprovals(
|
|
1960
|
+
output._pendingApprovals ?? resumeState?.pendingToolCalls
|
|
1961
|
+
) : [];
|
|
1962
|
+
const iterationCount = finiteOrNull(payload?.iterationCount) ?? (resumeState && finiteOrNull(resumeState.iteration) !== null ? (finiteOrNull(resumeState.iteration) ?? 0) + 1 : null);
|
|
1963
|
+
return {
|
|
1964
|
+
nodeStateId: node.id,
|
|
1965
|
+
nodeId: node.nodeId,
|
|
1966
|
+
nodeType: node.nodeType,
|
|
1967
|
+
status: node.status,
|
|
1968
|
+
operation,
|
|
1969
|
+
response: prettyValue(payload?.response),
|
|
1970
|
+
error: stringOrNull(payload?.error) ?? stringOrNull(node.error),
|
|
1971
|
+
tokensUsed: finiteOrNull(payload?.tokensUsed) ?? finiteOrNull(resumeState?.totalTokens),
|
|
1972
|
+
iterationCount,
|
|
1973
|
+
steps,
|
|
1974
|
+
waitingForApproval,
|
|
1975
|
+
pendingApprovals,
|
|
1976
|
+
startTime: node.startTime ?? null,
|
|
1977
|
+
endTime: node.endTime ?? null,
|
|
1978
|
+
durationMs: durationOf(node),
|
|
1979
|
+
attemptCount: finiteOrNull(node.attemptCount)
|
|
1980
|
+
};
|
|
1981
|
+
}
|
|
1982
|
+
function hasAgentNodeState(nodeStates) {
|
|
1983
|
+
return !!nodeStates?.some((node) => isAgentNodeType(node.nodeType));
|
|
1984
|
+
}
|
|
1985
|
+
function agentNodeTraces(nodeStates) {
|
|
1986
|
+
return (nodeStates ?? []).filter((node) => isAgentNodeType(node.nodeType)).map(parseAgentNodeState);
|
|
1987
|
+
}
|
|
1825
1988
|
function orderNodesByExecution(nodeStates, triggerNodeId) {
|
|
1826
1989
|
const rankOf = (node) => {
|
|
1827
1990
|
const stamp = node.startTime ?? node.endTime;
|
|
@@ -1842,7 +2005,8 @@ function NodeTimeline({
|
|
|
1842
2005
|
loading,
|
|
1843
2006
|
triggerNodeId,
|
|
1844
2007
|
onRetryNode,
|
|
1845
|
-
onViewChildRun
|
|
2008
|
+
onViewChildRun,
|
|
2009
|
+
onViewAgentTrace
|
|
1846
2010
|
}) {
|
|
1847
2011
|
const tr = useTr();
|
|
1848
2012
|
const [expandedNodes, setExpandedNodes] = useState(/* @__PURE__ */ new Set());
|
|
@@ -2046,7 +2210,7 @@ function NodeTimeline({
|
|
|
2046
2210
|
] }),
|
|
2047
2211
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-[var(--color-status-error-text)]", children: node.error })
|
|
2048
2212
|
] }),
|
|
2049
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex justify-end gap-2", children: [
|
|
2213
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap justify-end gap-2", children: [
|
|
2050
2214
|
hasChildRun && onViewChildRun && /* @__PURE__ */ jsxs(
|
|
2051
2215
|
"button",
|
|
2052
2216
|
{
|
|
@@ -2061,6 +2225,21 @@ function NodeTimeline({
|
|
|
2061
2225
|
]
|
|
2062
2226
|
}
|
|
2063
2227
|
),
|
|
2228
|
+
onViewAgentTrace && isAgentNodeType(node.nodeType) && /* @__PURE__ */ jsxs(
|
|
2229
|
+
"button",
|
|
2230
|
+
{
|
|
2231
|
+
type: "button",
|
|
2232
|
+
onClick: () => onViewAgentTrace(node.nodeId),
|
|
2233
|
+
className: "px-3 py-1.5 text-sm border border-border-secondary text-text-primary rounded hover:bg-background-tertiary flex items-center gap-1.5",
|
|
2234
|
+
children: [
|
|
2235
|
+
/* @__PURE__ */ jsx(Icon, { icon: "mdi:robot-outline", width: 16 }),
|
|
2236
|
+
tr(
|
|
2237
|
+
"fluidgrids.executions.nodeTimeline.viewAgentTrace",
|
|
2238
|
+
"View trace"
|
|
2239
|
+
)
|
|
2240
|
+
]
|
|
2241
|
+
}
|
|
2242
|
+
),
|
|
2064
2243
|
node.status === "FAILED" && onRetryNode && /* @__PURE__ */ jsxs(
|
|
2065
2244
|
"button",
|
|
2066
2245
|
{
|
|
@@ -2848,4 +3027,4 @@ function useRunStatusCounts(input, enabled) {
|
|
|
2848
3027
|
return enabled ? { ...state, error, refetch } : { total: null, counts: [], error: null, refetch };
|
|
2849
3028
|
}
|
|
2850
3029
|
|
|
2851
|
-
export { ExecutionCards, ExecutionFilters, ExecutionStats, ExecutionStatusBadge, ExecutionTable, ExecutionTimeline, NodeTimeline, Pagination, RunLogViewer, TagFilterSelect, runStatusLabels, setRunVersioningOverride, useDurableParityRunFields, useRunMetadata, useRunPending, useRunStatusCounts };
|
|
3030
|
+
export { ExecutionCards, ExecutionFilters, ExecutionStats, ExecutionStatusBadge, ExecutionTable, ExecutionTimeline, NodeStatusBadge, NodeTimeline, Pagination, RunLogViewer, TagFilterSelect, agentNodeTraces, hasAgentNodeState, orderNodesByExecution, runStatusLabels, setRunVersioningOverride, useDurableParityRunFields, useRunMetadata, useRunPending, useRunStatusCounts };
|