@burdenoff/fluidgrids-fe-sdk 2026.1105.1 → 2026.1105.2
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/dist/{ExecutionDetailPage-YBAMVPMB.js → ExecutionDetailPage-HQB2SWBP.js} +12 -10
- package/dist/{ExecutionsListPage-NQIQXMTY.js → ExecutionsListPage-RSLL634L.js} +8 -7
- package/dist/{WorkflowBuilder-CRR5WP4V.js → WorkflowBuilder-E3PNZX74.js} +12 -12
- package/dist/{WorkflowsList-EV725VG5.js → WorkflowsList-473FRRP2.js} +7 -7
- package/dist/{agentTools-PN4W7QZH.js → agentTools-5N3ZEZDW.js} +4 -4
- package/dist/{chunk-AZKVI4YN.js → chunk-2KUZBEWW.js} +5 -4
- package/dist/{chunk-C26QAWCT.js → chunk-3QCRKKTI.js} +1 -1
- package/dist/{chunk-L44BRLW5.js → chunk-3XUWPDKJ.js} +612 -22
- package/dist/{chunk-DANOMJ5I.js → chunk-5CFCFA6O.js} +6 -6
- package/dist/{chunk-I3QPAEL6.js → chunk-62CCBMDC.js} +12 -12
- package/dist/{chunk-4QB6S7YW.js → chunk-64JN2TVX.js} +2 -2
- package/dist/{chunk-D7G5VWSH.js → chunk-6IS7EXIY.js} +2 -2
- package/dist/{chunk-FJSXXO5W.js → chunk-6ZK4MRVA.js} +1 -1
- package/dist/{chunk-2QOAJF7V.js → chunk-AJVU5YW6.js} +2 -2
- package/dist/{chunk-JDQYGH4Q.js → chunk-CH3YUGWR.js} +4 -4
- package/dist/{chunk-MSQAULLG.js → chunk-CNKTQ5MG.js} +186 -7
- package/dist/{chunk-6P7DOBVN.js → chunk-EYQ7GJRW.js} +2 -2
- package/dist/{chunk-O2EB7UT2.js → chunk-GKFMK7FF.js} +2 -2
- package/dist/{chunk-6EZJ5J3B.js → chunk-HK76ZUAK.js} +4 -4
- package/dist/{chunk-EC2AN74G.js → chunk-IL343FKX.js} +1 -1
- package/dist/{chunk-AG3VC7Y2.js → chunk-J3YQCEP3.js} +2 -2
- package/dist/chunk-NZAYYUQ4.js +172 -0
- package/dist/{chunk-R3Z7W4EX.js → chunk-O7CJJNW6.js} +276 -196
- package/dist/{chunk-MZFJL4X3.js → chunk-OXXXUAWM.js} +1 -1
- package/dist/{chunk-XLI75E3D.js → chunk-QFC6E3WD.js} +2 -2
- package/dist/{chunk-HOTVUVZG.js → chunk-QFGZXWTM.js} +2 -2
- package/dist/{chunk-JC4D7RQ6.js → chunk-QPLFALVV.js} +4 -4
- package/dist/{chunk-FCT6POFX.js → chunk-SALZ3LQB.js} +1 -1
- package/dist/{chunk-CGR3AEZU.js → chunk-TCIBTMJI.js} +68 -2
- package/dist/{chunk-MQN6YDX4.js → chunk-TNFBRXU7.js} +6 -6
- package/dist/{chunk-GVIYGJQG.js → chunk-W5WML3OO.js} +1 -1
- package/dist/chunk-WZ3EJVS6.js +93 -0
- package/dist/{chunk-BHAKNT5M.js → chunk-X25NCWG2.js} +3 -3
- package/dist/{chunk-VFVN7D3A.js → chunk-XFH6SLDK.js} +3 -93
- package/dist/{chunk-HLAUK5GM.js → chunk-Y6M7K4UG.js} +1 -1
- package/dist/{chunk-AVHBWJRY.js → chunk-Z3ABLERJ.js} +3 -1
- package/dist/executions.js +13 -11
- package/dist/history.js +5 -5
- package/dist/index.d.ts +77 -1
- package/dist/index.js +42 -40
- package/dist/{node-detail-view-3VG7XFIZ.js → node-detail-view-WIWW5N6N.js} +31 -7
- package/dist/nodes.js +2 -2
- package/dist/observability.js +6 -5
- package/dist/{quick-config-panel-GB7SDWHD.js → quick-config-panel-O64TXXK3.js} +6 -5
- package/dist/settings.js +6 -5
- package/dist/templates.js +11 -11
- package/dist/workflow-builder.js +13 -13
- package/dist/workflows-list.js +7 -7
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
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-Y6M7K4UG.js';
|
|
2
|
+
import { useExecutions } from './chunk-J3YQCEP3.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-GKFMK7FF.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-QFGZXWTM.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, useFlowStore, isQuotaExhaustedFailure } from './chunk-
|
|
8
|
+
import { createThenOpen, FluidGridsContext, useFluidGridsFlag, FLUIDGRIDS_FLAGS, BILLING_PLANS_PATH, useFlowStore, isQuotaExhaustedFailure } from './chunk-3QCRKKTI.js';
|
|
9
9
|
import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton, SdkPermissionGate } from './chunk-5375NUIO.js';
|
|
10
|
-
import { WorkflowFoldersDocument, CreateWorkflowFolderDocument, RenameWorkflowFolderDocument, MoveWorkflowFolderDocument, DeleteWorkflowFolderDocument, WorkflowProjectsDocument, CreateWorkflowProjectDocument, RenameWorkflowProjectDocument, DeleteWorkflowProjectDocument, BulkMoveWorkflowsToFolderDocument, BulkAssignWorkflowsToProjectDocument, BulkDeleteWorkflowsDocument } from './chunk-
|
|
10
|
+
import { WorkflowFoldersDocument, CreateWorkflowFolderDocument, RenameWorkflowFolderDocument, MoveWorkflowFolderDocument, DeleteWorkflowFolderDocument, WorkflowProjectsDocument, CreateWorkflowProjectDocument, RenameWorkflowProjectDocument, DeleteWorkflowProjectDocument, BulkMoveWorkflowsToFolderDocument, BulkAssignWorkflowsToProjectDocument, BulkDeleteWorkflowsDocument } from './chunk-Z3ABLERJ.js';
|
|
11
11
|
import { useTr } from './chunk-UULVIT25.js';
|
|
12
12
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
13
13
|
import { describeOperationError, throwIfResultError } from './chunk-US5QSLPV.js';
|
|
@@ -3,23 +3,23 @@ import { templatePreview } from './chunk-B6CCE2RW.js';
|
|
|
3
3
|
import { Input } from './chunk-IEVSFCFS.js';
|
|
4
4
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter as DialogFooter$1 } from './chunk-YXMFRQYV.js';
|
|
5
5
|
import { Badge as Badge$1, Button } from './chunk-BQXVT32O.js';
|
|
6
|
-
import { LogsPanel } from './chunk-
|
|
7
|
-
import { computeAttachPosition, firstInputHandleId } from './chunk-
|
|
8
|
-
import { QuotaExhaustedDialog, WorkflowShareDialog, useWorkflowCodeExport, orderedExportFiles, fileBaseName, downloadWorkflowCodeExport, isLosslessReport, sortFidelityItems, isLossyFidelityItem, lineOfNode } from './chunk-
|
|
9
|
-
import { emptyTestCaseDraft, EntityTagPicker, useWorkflowProposal, WorkflowProposalCard, useWorkflowTests, pinnedOutputsFromCanvas, enabledCaseIds, isTestRunOpen, MAX_TEST_CASES, draftFromTestCase, testRunSummaryText, testStatusLabel, TEST_STATUS_TONE_CLASS, testStatusTone, MAX_CASE_NAME, nextSortOrder, draftToInput } from './chunk-
|
|
10
|
-
import { buildNodeDisplayMap } from './chunk-
|
|
6
|
+
import { LogsPanel } from './chunk-6ZK4MRVA.js';
|
|
7
|
+
import { computeAttachPosition, firstInputHandleId } from './chunk-W5WML3OO.js';
|
|
8
|
+
import { QuotaExhaustedDialog, WorkflowShareDialog, useWorkflowCodeExport, orderedExportFiles, fileBaseName, downloadWorkflowCodeExport, isLosslessReport, sortFidelityItems, isLossyFidelityItem, lineOfNode } from './chunk-GKFMK7FF.js';
|
|
9
|
+
import { emptyTestCaseDraft, EntityTagPicker, useWorkflowProposal, WorkflowProposalCard, useWorkflowTests, pinnedOutputsFromCanvas, enabledCaseIds, isTestRunOpen, MAX_TEST_CASES, draftFromTestCase, testRunSummaryText, testStatusLabel, TEST_STATUS_TONE_CLASS, testStatusTone, MAX_CASE_NAME, nextSortOrder, draftToInput } from './chunk-EYQ7GJRW.js';
|
|
10
|
+
import { buildNodeDisplayMap } from './chunk-IL343FKX.js';
|
|
11
11
|
import { AiCreditBalanceSlot } from './chunk-Y53CVZVV.js';
|
|
12
|
-
import { countLifecycle, VersionLifecycleBar, VersionDiffDialog } from './chunk-
|
|
13
|
-
import { useRestoreWorkflowVersion, useWorkflowVersions, useActivateWorkflow, useDeleteWorkflow, useDeactivateWorkflow } from './chunk-
|
|
12
|
+
import { countLifecycle, VersionLifecycleBar, VersionDiffDialog } from './chunk-64JN2TVX.js';
|
|
13
|
+
import { useRestoreWorkflowVersion, useWorkflowVersions, useActivateWorkflow, useDeleteWorkflow, useDeactivateWorkflow } from './chunk-QFGZXWTM.js';
|
|
14
14
|
import { useRequestedProposal } from './chunk-GLYINMOR.js';
|
|
15
15
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
16
|
-
import { leaseCallQueue, RUNS_QUOTA_NAME, useFlowStore, BILLING_PLANS_PATH, emitUpgradeClicked, FluidGridsContext, emitWorkflowCreated, emitTemplateUsed, ensureNodeConfigsLoaded, NODE_CONFIGS, useEditLeaseStore, useEditLeaseLocked, registerWorkflowNodeTypes, emitNodeInstalled, useNodeExecution, usePaletteGates, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, useIsValidConnection, refetchStoreNodes, AVAILABLE_NODES, EDIT_SESSION_ID, useInsertNode, NODE_TYPE_DRAG_DATA_FORMAT, NODE_OPERATION_DRAG_DATA_FORMAT, useSaveStatusStore, useManualSave, useDurableFunctionNodesEnabled, CODE_WORKFLOW_NODE_TYPE, bannerOf, editStateFor, useSaveWorkflow, STICKY_NOTE_TYPE, filterPaletteNodes, useFluidGridsAnalytics, useGuardedNavigate, sessionBeforeReload, forgetSessionForReload, releasesOnClose, touchesSavedFields, isLocked, watchLeavingLosesChanges, workflowFingerprint, savedEverythingBeforeLeaving, buildStickyNode, NODES_METADATA, NodeTypeIcon, shouldReleaseForIdle, tickAction, rememberSessionForReload, leavingLosesChanges, buildOperationSeed, useDurableParityEnabled, useConnections, ConnectionFormDialog, useWorkflowTestsEnabled, useFluidGridsFlag, FLUIDGRIDS_FLAGS, useFlowValidator, saveIndicatorOf, departingSave, inAppLeaveTarget, isNodeConfigsInitialized, phaseAfterAcquire, rememberOwnStatusChange, useRunGuard, getNodeDetail, isImageIcon, NODES, synchronizeOperationUpdate, NodePropertyPanel, loadDefinitionJson, canAutosave, isNodeTypeHiddenFromPalette, isTriggerOperation, canRenderOperationPanel, resolveOperationName, ConnectionSelector, AUTOSAVE_RETRY_DELAYS_MS, AUTOSAVE_DEBOUNCE_MS, editingLeaseLocked, autosaveAllowedFor, isFlowComplete, rememberRevision, phaseAfterTakeOver } from './chunk-
|
|
16
|
+
import { leaseCallQueue, RUNS_QUOTA_NAME, useFlowStore, BILLING_PLANS_PATH, emitUpgradeClicked, FluidGridsContext, emitWorkflowCreated, emitTemplateUsed, ensureNodeConfigsLoaded, NODE_CONFIGS, useEditLeaseStore, useEditLeaseLocked, registerWorkflowNodeTypes, emitNodeInstalled, useNodeExecution, usePaletteGates, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, useIsValidConnection, refetchStoreNodes, AVAILABLE_NODES, EDIT_SESSION_ID, useInsertNode, NODE_TYPE_DRAG_DATA_FORMAT, NODE_OPERATION_DRAG_DATA_FORMAT, useSaveStatusStore, useManualSave, useDurableFunctionNodesEnabled, CODE_WORKFLOW_NODE_TYPE, bannerOf, editStateFor, useSaveWorkflow, STICKY_NOTE_TYPE, filterPaletteNodes, useFluidGridsAnalytics, useGuardedNavigate, sessionBeforeReload, forgetSessionForReload, releasesOnClose, touchesSavedFields, isLocked, watchLeavingLosesChanges, workflowFingerprint, savedEverythingBeforeLeaving, buildStickyNode, NODES_METADATA, NodeTypeIcon, shouldReleaseForIdle, tickAction, rememberSessionForReload, leavingLosesChanges, buildOperationSeed, useDurableParityEnabled, useConnections, ConnectionFormDialog, useWorkflowTestsEnabled, useFluidGridsFlag, FLUIDGRIDS_FLAGS, useFlowValidator, saveIndicatorOf, departingSave, inAppLeaveTarget, isNodeConfigsInitialized, phaseAfterAcquire, rememberOwnStatusChange, useRunGuard, getNodeDetail, isImageIcon, NODES, synchronizeOperationUpdate, NodePropertyPanel, loadDefinitionJson, canAutosave, isNodeTypeHiddenFromPalette, isTriggerOperation, canRenderOperationPanel, resolveOperationName, ConnectionSelector, AUTOSAVE_RETRY_DELAYS_MS, AUTOSAVE_DEBOUNCE_MS, editingLeaseLocked, autosaveAllowedFor, isFlowComplete, rememberRevision, phaseAfterTakeOver } from './chunk-3QCRKKTI.js';
|
|
17
17
|
import { SdkPermissionButton, FLUIDGRIDS_PERMISSIONS, useFluidGridsPermission, SdkPermissionGate } from './chunk-5375NUIO.js';
|
|
18
18
|
import { cn } from './chunk-JL7CASN5.js';
|
|
19
19
|
import { BuilderReadOnlyProvider, useBuilderReadOnly } from './chunk-OCJTTHTS.js';
|
|
20
20
|
import { getGlobalStoreClient } from './chunk-AU7LACOY.js';
|
|
21
21
|
import { GetMyNodeInstallationsDocument, BrowseWorkflowTemplatesDocument, InstallWorkflowNodeDocument, SubmitWorkflowTemplateDocument, MyWorkflowTemplateSubmissionsDocument, WithdrawWorkflowTemplateSubmissionDocument, InstallPurchasedNodeDocument, BrowseWorkflowNodesDocument, UninstallWorkflowNodeDocument, CreateStoreOrderDocument, GetNodeInstallableVersionsDocument, OrganizationPrivateNodesDocument, InstallOrganizationPrivateNodeDocument, UninstallOrganizationPrivateNodeDocument } from './chunk-G77IGC3Y.js';
|
|
22
|
-
import { WorkspaceRunsQuotaDocument, WorkflowGenerationTemplatesDocument, ReleaseWorkflowEditLeaseDocument, NodeSchemaIntrospectionDocument, AcquireWorkflowEditLeaseDocument, WorkflowEnvironmentsDocument, WorkflowPromotionRequestsDocument, DeployWorkflowVersionToDevDocument, RequestWorkflowPromotionDocument, ApproveWorkflowPromotionDocument, RejectWorkflowPromotionDocument, CancelWorkflowPromotionDocument, UpdateWorkflowEnvironmentPolicyDocument, WorkflowGitRepositoryDocument, WorkflowGitPushesDocument, WorkflowGitCommitsDocument, LinkWorkflowGitRepositoryDocument, UnlinkWorkflowGitRepositoryDocument, PushWorkflowToGitDocument, WorkflowGitDiffDocument, RestoreWorkflowFromGitDocument, WorkflowAuthoringDocument, WorkflowEditLeaseDocument, WorkflowVersioningDocument, WorkflowVersionDrainageDocument, ActivateWorkflowVersionCheckedDocument, WorkflowDefinitionDocument, NodeUsageStatusDocument, RemoveNodeFromWorkflowsDocument, SetWorkflowRolloutDocument, DeleteWorkflowRolloutDocument, TakeOverWorkflowEditLeaseDocument } from './chunk-
|
|
22
|
+
import { WorkspaceRunsQuotaDocument, WorkflowGenerationTemplatesDocument, ReleaseWorkflowEditLeaseDocument, NodeSchemaIntrospectionDocument, AcquireWorkflowEditLeaseDocument, WorkflowEnvironmentsDocument, WorkflowPromotionRequestsDocument, DeployWorkflowVersionToDevDocument, RequestWorkflowPromotionDocument, ApproveWorkflowPromotionDocument, RejectWorkflowPromotionDocument, CancelWorkflowPromotionDocument, UpdateWorkflowEnvironmentPolicyDocument, WorkflowGitRepositoryDocument, WorkflowGitPushesDocument, WorkflowGitCommitsDocument, LinkWorkflowGitRepositoryDocument, UnlinkWorkflowGitRepositoryDocument, PushWorkflowToGitDocument, WorkflowGitDiffDocument, RestoreWorkflowFromGitDocument, WorkflowAuthoringDocument, WorkflowEditLeaseDocument, WorkflowVersioningDocument, WorkflowVersionDrainageDocument, ActivateWorkflowVersionCheckedDocument, WorkflowDefinitionDocument, NodeUsageStatusDocument, RemoveNodeFromWorkflowsDocument, SetWorkflowRolloutDocument, DeleteWorkflowRolloutDocument, TakeOverWorkflowEditLeaseDocument } from './chunk-Z3ABLERJ.js';
|
|
23
23
|
import { useTr } from './chunk-UULVIT25.js';
|
|
24
24
|
import { waitForFluidGridsClient, getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
25
25
|
import { throwIfResultError, describeOperationError, emitFluidGridsEvent } from './chunk-US5QSLPV.js';
|
|
@@ -21240,12 +21240,12 @@ function EditLeaseBanner() {
|
|
|
21240
21240
|
);
|
|
21241
21241
|
}
|
|
21242
21242
|
var LazyNodeDetailView = lazy(
|
|
21243
|
-
() => import('./node-detail-view-
|
|
21243
|
+
() => import('./node-detail-view-WIWW5N6N.js').then((m) => ({
|
|
21244
21244
|
default: m.NodeDetailView
|
|
21245
21245
|
}))
|
|
21246
21246
|
);
|
|
21247
21247
|
var LazyQuickConfigPanel = lazy(
|
|
21248
|
-
() => import('./quick-config-panel-
|
|
21248
|
+
() => import('./quick-config-panel-O64TXXK3.js').then((m) => ({
|
|
21249
21249
|
default: m.QuickConfigPanel
|
|
21250
21250
|
}))
|
|
21251
21251
|
);
|
|
@@ -21307,7 +21307,7 @@ var FlowBuilder = ({ readOnly = false }) => {
|
|
|
21307
21307
|
);
|
|
21308
21308
|
useEffect(() => {
|
|
21309
21309
|
let cancelled = false;
|
|
21310
|
-
void import('./agentTools-
|
|
21310
|
+
void import('./agentTools-5N3ZEZDW.js').then(({ createBuilderAgentTools }) => {
|
|
21311
21311
|
if (cancelled) return;
|
|
21312
21312
|
setAgentTools(
|
|
21313
21313
|
createBuilderAgentTools({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mergeStickyNotes } from './chunk-
|
|
2
|
-
import { WorkflowDefinitionDocument, WorkflowVersionDiffDocument } from './chunk-
|
|
1
|
+
import { mergeStickyNotes } from './chunk-3QCRKKTI.js';
|
|
2
|
+
import { WorkflowDefinitionDocument, WorkflowVersionDiffDocument } 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,6 +1,6 @@
|
|
|
1
|
-
import { versionsOfWorkflow, VersionDiffDialog } from './chunk-
|
|
1
|
+
import { versionsOfWorkflow, VersionDiffDialog } from './chunk-64JN2TVX.js';
|
|
2
2
|
import { historyControls } from './chunk-FNZZ5JJL.js';
|
|
3
|
-
import { useWorkflowDefinitions, useRestoreWorkflowVersion } from './chunk-
|
|
3
|
+
import { useWorkflowDefinitions, useRestoreWorkflowVersion } from './chunk-QFGZXWTM.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,6 +1,6 @@
|
|
|
1
|
-
import { structuredParameterType, parseParameterValue, liveInternalOperations, resolveNodeOperation, readDisplayOptions, getNodeDetail, useFlowStore, useNodeRegistryRevision, fieldsFromIO, pathToExpression, NODE_CONFIGS, resolveUiSpec, fieldsFromValue, declaredOutputFields, subscribeWorkflowSaved } from './chunk-
|
|
1
|
+
import { structuredParameterType, parseParameterValue, liveInternalOperations, resolveNodeOperation, readDisplayOptions, getNodeDetail, useFlowStore, useNodeRegistryRevision, fieldsFromIO, pathToExpression, NODE_CONFIGS, resolveUiSpec, fieldsFromValue, declaredOutputFields, subscribeWorkflowSaved } from './chunk-3QCRKKTI.js';
|
|
2
2
|
import { useBuilderReadOnly } from './chunk-OCJTTHTS.js';
|
|
3
|
-
import { EventRegistrationsDocument } from './chunk-
|
|
3
|
+
import { EventRegistrationsDocument } from './chunk-Z3ABLERJ.js';
|
|
4
4
|
import { useTr } from './chunk-UULVIT25.js';
|
|
5
5
|
import { getFluidGridsClientSafe } from './chunk-3IXU7WUC.js';
|
|
6
6
|
import { useMemo, useState, useEffect, useRef, useCallback } from 'react';
|
|
@@ -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-62CCBMDC.js';
|
|
2
|
+
import { QuotaExhaustedDialog } from './chunk-GKFMK7FF.js';
|
|
3
3
|
import { templatesControls } from './chunk-FNZZ5JJL.js';
|
|
4
|
-
import { useWorkflowDefinitions, useDuplicateWorkflow, useLazyWorkflowDefinition } from './chunk-
|
|
4
|
+
import { useWorkflowDefinitions, useDuplicateWorkflow, useLazyWorkflowDefinition } from './chunk-QFGZXWTM.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-3QCRKKTI.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,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-J3YQCEP3.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-3QCRKKTI.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 };
|
|
@@ -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,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-3QCRKKTI.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,8 +1,8 @@
|
|
|
1
|
-
import { useRunStatusCounts, ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination, runStatusLabels } from './chunk-
|
|
2
|
-
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh, WORKFLOW_ID_MAX_LENGTH } from './chunk-
|
|
3
|
-
import { useWorkflowDefinitions } from './chunk-
|
|
1
|
+
import { useRunStatusCounts, ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination, runStatusLabels } from './chunk-CNKTQ5MG.js';
|
|
2
|
+
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh, WORKFLOW_ID_MAX_LENGTH } from './chunk-J3YQCEP3.js';
|
|
3
|
+
import { useWorkflowDefinitions } from './chunk-QFGZXWTM.js';
|
|
4
4
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
5
|
-
import { useDurableParityEnabled } from './chunk-
|
|
5
|
+
import { useDurableParityEnabled } from './chunk-3QCRKKTI.js';
|
|
6
6
|
import { useTr } from './chunk-UULVIT25.js';
|
|
7
7
|
import { useExecutionsStore } from './chunk-UEG2WC3G.js';
|
|
8
8
|
import { useRef, useCallback, useMemo, useState, useEffect } from 'react';
|
|
@@ -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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { REPLAY_WORKFLOW_RUN, RETRY_WORKFLOW_RUNS } from './chunk-5ERAJC2I.js';
|
|
2
|
-
import { useFluidGridsAnalytics, emitRunStarted, openRunQuotaUpgradePrompt } from './chunk-
|
|
3
|
-
import { ExecutionsListDocument, ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument } from './chunk-
|
|
2
|
+
import { useFluidGridsAnalytics, emitRunStarted, openRunQuotaUpgradePrompt } from './chunk-3QCRKKTI.js';
|
|
3
|
+
import { ExecutionsListDocument, ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument } from './chunk-Z3ABLERJ.js';
|
|
4
4
|
import { useTr } from './chunk-UULVIT25.js';
|
|
5
5
|
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
6
6
|
import { throwIfResultError, emitFluidGridsEvent, emitOperationErrorEvent } from './chunk-US5QSLPV.js';
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// src/modules/observability/optimisation.ts
|
|
2
|
+
var DEFAULT_WINDOW_DAYS = 30;
|
|
3
|
+
var DISMISS_REASONS = [
|
|
4
|
+
"NOT_APPLICABLE" /* NotApplicable */,
|
|
5
|
+
"ACCEPTED_COST" /* AcceptedCost */,
|
|
6
|
+
"WILL_FIX_LATER" /* WillFixLater */,
|
|
7
|
+
"OTHER" /* Other */
|
|
8
|
+
];
|
|
9
|
+
var MAX_DISMISS_NOTE_LENGTH = 500;
|
|
10
|
+
function isRecord(value) {
|
|
11
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12
|
+
}
|
|
13
|
+
function evidenceRecord(evidence) {
|
|
14
|
+
if (typeof evidence === "string") {
|
|
15
|
+
try {
|
|
16
|
+
const parsed = JSON.parse(evidence);
|
|
17
|
+
return isRecord(parsed) ? parsed : {};
|
|
18
|
+
} catch {
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return isRecord(evidence) ? evidence : {};
|
|
23
|
+
}
|
|
24
|
+
function numberAt(evidence, key) {
|
|
25
|
+
const value = evidence[key];
|
|
26
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
27
|
+
}
|
|
28
|
+
function formatShare(value) {
|
|
29
|
+
return `${Math.round(value * 100)}%`;
|
|
30
|
+
}
|
|
31
|
+
function formatSeconds(ms) {
|
|
32
|
+
const seconds = ms / 1e3;
|
|
33
|
+
return `${Number.isInteger(seconds) ? seconds : seconds.toFixed(1)} s`;
|
|
34
|
+
}
|
|
35
|
+
function formatCount(value) {
|
|
36
|
+
return Math.round(value).toLocaleString("en-US");
|
|
37
|
+
}
|
|
38
|
+
function formatMicroUsd(value) {
|
|
39
|
+
const dollars = value / 1e6;
|
|
40
|
+
if (dollars > 0 && dollars < 0.01) return "< $0.01";
|
|
41
|
+
return `$${dollars.toLocaleString("en-US", {
|
|
42
|
+
minimumFractionDigits: 2,
|
|
43
|
+
maximumFractionDigits: 2
|
|
44
|
+
})}`;
|
|
45
|
+
}
|
|
46
|
+
function monthlySavingLabel(microUsd) {
|
|
47
|
+
if (microUsd === null || microUsd === void 0) return null;
|
|
48
|
+
if (!Number.isFinite(microUsd) || microUsd <= 0) return null;
|
|
49
|
+
return formatMicroUsd(microUsd);
|
|
50
|
+
}
|
|
51
|
+
function evidenceWindowDays(evidence) {
|
|
52
|
+
const days = numberAt(evidenceRecord(evidence), "windowDays");
|
|
53
|
+
return days !== null && days > 0 ? days : DEFAULT_WINDOW_DAYS;
|
|
54
|
+
}
|
|
55
|
+
var FACTS = {
|
|
56
|
+
["RAISE_TIMEOUT" /* RaiseTimeout */]: [
|
|
57
|
+
{ id: "executions", format: formatCount },
|
|
58
|
+
{ id: "timeoutRate", format: formatShare },
|
|
59
|
+
{ id: "currentTimeoutMs", format: formatSeconds },
|
|
60
|
+
{
|
|
61
|
+
id: "p95CompletedMs",
|
|
62
|
+
format: formatSeconds
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "suggestedTimeoutMs",
|
|
66
|
+
format: formatSeconds
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
["ADD_RETRY" /* AddRetry */]: [
|
|
70
|
+
{ id: "executions", format: formatCount },
|
|
71
|
+
{
|
|
72
|
+
id: "transientFailures",
|
|
73
|
+
format: formatCount
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "transientFailureRate",
|
|
77
|
+
format: formatShare
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
["UNUSED_NODE" /* UnusedNode */]: [{ id: "completedRuns", format: formatCount }],
|
|
81
|
+
["ENABLE_CACHE" /* EnableCache */]: [
|
|
82
|
+
{ id: "calls", format: formatCount },
|
|
83
|
+
{ id: "repeatedCalls", format: formatCount },
|
|
84
|
+
{ id: "repeatShare", format: formatShare },
|
|
85
|
+
{ id: "costMicroUsd", format: formatMicroUsd }
|
|
86
|
+
],
|
|
87
|
+
["CHEAPER_MODEL" /* CheaperModel */]: [],
|
|
88
|
+
["MISSING_GUARDRAIL" /* MissingGuardrail */]: []
|
|
89
|
+
};
|
|
90
|
+
function evidenceFacts(kind, evidence) {
|
|
91
|
+
const record = evidenceRecord(evidence);
|
|
92
|
+
const facts = [];
|
|
93
|
+
for (const spec of FACTS[kind] ?? []) {
|
|
94
|
+
const value = numberAt(record, spec.id);
|
|
95
|
+
if (value === null) continue;
|
|
96
|
+
facts.push({ id: spec.id, value: spec.format(value) });
|
|
97
|
+
}
|
|
98
|
+
if (kind === "UNUSED_NODE" /* UnusedNode */) {
|
|
99
|
+
const removed = record.removedNodeIds;
|
|
100
|
+
if (Array.isArray(removed) && removed.length > 0) {
|
|
101
|
+
facts.push({
|
|
102
|
+
id: "removedNodeIds",
|
|
103
|
+
value: removed.map(String).join(", ")
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (kind === "ADD_RETRY" /* AddRetry */) {
|
|
108
|
+
const byType = record.failuresByType;
|
|
109
|
+
if (isRecord(byType)) {
|
|
110
|
+
const parts = Object.entries(byType).filter(
|
|
111
|
+
(entry) => typeof entry[1] === "number" && entry[1] > 0
|
|
112
|
+
).map(([type, count]) => `${type} ${formatCount(count)}`);
|
|
113
|
+
if (parts.length > 0) {
|
|
114
|
+
facts.push({
|
|
115
|
+
id: "failuresByType",
|
|
116
|
+
value: parts.join(", ")
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return facts;
|
|
122
|
+
}
|
|
123
|
+
function shortRunId(runId) {
|
|
124
|
+
return runId.length > 8 ? runId.slice(0, 8) : runId;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// src/modules/executions/utils/ai-usage.ts
|
|
128
|
+
function aiCost(usage) {
|
|
129
|
+
if (!usage || usage.calls <= 0) return { kind: "none" };
|
|
130
|
+
const cost = usage.costMicroUsd;
|
|
131
|
+
if (cost === null || cost === void 0 || !Number.isFinite(cost)) {
|
|
132
|
+
return { kind: "unpriced" };
|
|
133
|
+
}
|
|
134
|
+
const unpricedCalls = Math.max(0, usage.calls - usage.pricedCalls);
|
|
135
|
+
return {
|
|
136
|
+
kind: "priced",
|
|
137
|
+
text: formatMicroUsd(cost),
|
|
138
|
+
partial: unpricedCalls > 0 || usage.pendingCalls > 0,
|
|
139
|
+
unpricedCalls: Math.max(unpricedCalls, usage.pendingCalls)
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function formatTokens(value) {
|
|
143
|
+
if (value === null || value === void 0 || !Number.isFinite(value)) {
|
|
144
|
+
return "0";
|
|
145
|
+
}
|
|
146
|
+
return Math.max(0, Math.round(value)).toLocaleString("en-US");
|
|
147
|
+
}
|
|
148
|
+
function modelLabel(providerKey, modelKey) {
|
|
149
|
+
const parts = [providerKey, modelKey].filter(
|
|
150
|
+
(part) => typeof part === "string" && part.length > 0
|
|
151
|
+
);
|
|
152
|
+
return parts.length ? parts.join(" \xB7 ") : null;
|
|
153
|
+
}
|
|
154
|
+
var AI_SPEND_RANGE_DAYS = [7, 30, 90];
|
|
155
|
+
var DAY_MS = 864e5;
|
|
156
|
+
function aiSpendPeriod(days, now = /* @__PURE__ */ new Date()) {
|
|
157
|
+
const toMs = Math.ceil(now.getTime() / 6e4) * 6e4;
|
|
158
|
+
return {
|
|
159
|
+
from: new Date(toMs - days * DAY_MS).toISOString(),
|
|
160
|
+
to: new Date(toMs).toISOString()
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function runsOfWorkflowPath(workflowKey) {
|
|
164
|
+
return `../runs?workflowKey=${encodeURIComponent(workflowKey)}`;
|
|
165
|
+
}
|
|
166
|
+
function agentTracePath(runId, nodeId) {
|
|
167
|
+
const params = new URLSearchParams({ tab: "agent" });
|
|
168
|
+
if (nodeId) params.set("node", nodeId);
|
|
169
|
+
return `../runs/${encodeURIComponent(runId)}?${params.toString()}`;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export { AI_SPEND_RANGE_DAYS, DISMISS_REASONS, MAX_DISMISS_NOTE_LENGTH, agentTracePath, aiCost, aiSpendPeriod, evidenceFacts, evidenceWindowDays, formatTokens, modelLabel, monthlySavingLabel, runsOfWorkflowPath, shortRunId };
|