@burdenoff/fluidgrids-fe-sdk 2026.1104.3 → 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/README.md +38 -0
- package/dist/ExecutionDetailPage-HQB2SWBP.js +28 -0
- package/dist/ExecutionsListPage-RSLL634L.js +22 -0
- package/dist/WorkflowBuilder-E3PNZX74.js +32 -0
- package/dist/WorkflowsList-473FRRP2.js +21 -0
- package/dist/{agentTools-SZZN6TP3.js → agentTools-5N3ZEZDW.js} +8 -7
- package/dist/{chunk-NIY6R42C.js → chunk-2KUZBEWW.js} +7 -5
- package/dist/{chunk-NTWG3CJX.js → chunk-3IXU7WUC.js} +32 -21
- package/dist/{chunk-AAIZ6S6E.js → chunk-3QCRKKTI.js} +70 -88
- package/dist/{chunk-WTV6SQYK.js → chunk-3XUWPDKJ.js} +616 -25
- package/dist/{chunk-XCSCD3IU.js → chunk-5CFCFA6O.js} +8 -7
- package/dist/{chunk-DFIX6YWP.js → chunk-62CCBMDC.js} +40 -21
- package/dist/{chunk-KHXRYQYP.js → chunk-64JN2TVX.js} +4 -3
- package/dist/{chunk-NYBL5WHP.js → chunk-6IS7EXIY.js} +3 -3
- package/dist/{chunk-YYVRBROH.js → chunk-6ZK4MRVA.js} +1 -1
- package/dist/{chunk-4YCMMBSK.js → chunk-AJVU5YW6.js} +3 -3
- package/dist/{chunk-NGXJHYV5.js → chunk-AMXJLVZN.js} +2 -2
- package/dist/{chunk-PXIFUMLA.js → chunk-AU7LACOY.js} +16 -11
- package/dist/{chunk-GEY7RXRZ.js → chunk-CH3YUGWR.js} +4 -4
- package/dist/{chunk-XNU2PLJ2.js → chunk-CNKTQ5MG.js} +189 -9
- package/dist/{chunk-BIB7IH26.js → chunk-EYQ7GJRW.js} +5 -5
- package/dist/{chunk-X6PIU7FE.js → chunk-GKFMK7FF.js} +4 -3
- package/dist/{chunk-NJRCAE6K.js → chunk-HK76ZUAK.js} +5 -5
- package/dist/{chunk-F7LQL43U.js → chunk-IL343FKX.js} +2 -2
- package/dist/{chunk-5D4XS3WJ.js → chunk-J3YQCEP3.js} +18 -4
- package/dist/{chunk-4EUEKSEQ.js → chunk-L2N6DDOI.js} +2 -2
- package/dist/chunk-NZAYYUQ4.js +172 -0
- package/dist/{chunk-ON7LK6QH.js → chunk-O7CJJNW6.js} +278 -197
- package/dist/{chunk-ZDCJPQ5M.js → chunk-OXXXUAWM.js} +2 -2
- package/dist/{chunk-D4WA2M2N.js → chunk-QFC6E3WD.js} +4 -3
- package/dist/{chunk-AFX3EKFN.js → chunk-QFGZXWTM.js} +16 -4
- package/dist/{chunk-IK7IGG6T.js → chunk-QPLFALVV.js} +9 -8
- package/dist/{chunk-MF7JLSJX.js → chunk-SALZ3LQB.js} +11 -2
- package/dist/{chunk-SS7Y66P5.js → chunk-TCIBTMJI.js} +70 -4
- package/dist/{chunk-OMB3WMDQ.js → chunk-TNFBRXU7.js} +11 -10
- package/dist/chunk-UEG2WC3G.js +502 -0
- package/dist/chunk-US5QSLPV.js +316 -0
- package/dist/{chunk-5UHAB75U.js → chunk-W5WML3OO.js} +1 -1
- package/dist/chunk-WZ3EJVS6.js +93 -0
- package/dist/{chunk-Q72EOY4T.js → chunk-X25NCWG2.js} +9 -3
- package/dist/{chunk-VDJFTZ2H.js → chunk-XFH6SLDK.js} +4 -93
- package/dist/{chunk-TBHAZK52.js → chunk-Y6M7K4UG.js} +1 -1
- package/dist/{chunk-AVHBWJRY.js → chunk-Z3ABLERJ.js} +3 -1
- package/dist/client-YVZMLEQX.js +3 -0
- package/dist/config-66FUPSG5.js +1 -0
- package/dist/executions.js +18 -15
- package/dist/global-client-N5EIFW6T.js +3 -0
- package/dist/history.js +9 -8
- package/dist/index.d.ts +172 -133
- package/dist/index.js +95 -74
- package/dist/{node-detail-view-GAGSLHAO.js → node-detail-view-WIWW5N6N.js} +36 -11
- package/dist/nodes.js +5 -3
- package/dist/observability.js +10 -8
- package/dist/{quick-config-panel-44RBX6YR.js → quick-config-panel-O64TXXK3.js} +10 -8
- package/dist/settings.js +11 -9
- package/dist/templates.js +15 -14
- package/dist/{workflow-builder-BMGVSwpy.d.ts → workflow-builder-7vv9dCdp.d.ts} +413 -2
- package/dist/workflow-builder.d.ts +2 -1
- package/dist/workflow-builder.js +17 -16
- package/dist/workflows-list.js +11 -10
- package/package.json +1 -1
- package/dist/ExecutionDetailPage-ND2VMU45.js +0 -25
- package/dist/ExecutionsListPage-EZ65FXER.js +0 -20
- package/dist/WorkflowBuilder-4I44FWII.js +0 -31
- package/dist/WorkflowsList-YFD2RKKQ.js +0 -20
- package/dist/chunk-6AMNEX2Y.js +0 -214
- package/dist/client-EYQDMR4O.js +0 -1
- package/dist/config-3DBXLCK3.js +0 -1
- package/dist/global-client-O2HCG5CJ.js +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { REPLAY_WORKFLOW_RUN, RETRY_WORKFLOW_RUNS } from './chunk-5ERAJC2I.js';
|
|
2
|
-
import { useFluidGridsAnalytics,
|
|
3
|
-
import {
|
|
4
|
-
import { ExecutionsListDocument, ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument } from './chunk-AVHBWJRY.js';
|
|
2
|
+
import { useFluidGridsAnalytics, emitRunStarted, openRunQuotaUpgradePrompt } from './chunk-3QCRKKTI.js';
|
|
3
|
+
import { ExecutionsListDocument, ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument } from './chunk-Z3ABLERJ.js';
|
|
5
4
|
import { useTr } from './chunk-UULVIT25.js';
|
|
6
|
-
import { getFluidGridsClient } from './chunk-
|
|
5
|
+
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
6
|
+
import { throwIfResultError, emitFluidGridsEvent, emitOperationErrorEvent } from './chunk-US5QSLPV.js';
|
|
7
|
+
import { useExecutionsStore } from './chunk-UEG2WC3G.js';
|
|
7
8
|
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
8
9
|
|
|
9
10
|
// src/modules/executions/utils/date-range.ts
|
|
@@ -385,10 +386,15 @@ function useExecutionActions() {
|
|
|
385
386
|
executionId: run.runId,
|
|
386
387
|
trigger: "manual"
|
|
387
388
|
});
|
|
389
|
+
emitFluidGridsEvent("run:started", {
|
|
390
|
+
runId: run.runId,
|
|
391
|
+
workflowKey: run.workflowKey
|
|
392
|
+
});
|
|
388
393
|
return { ok: true, run };
|
|
389
394
|
} catch (err) {
|
|
390
395
|
const error2 = err;
|
|
391
396
|
setError(error2);
|
|
397
|
+
emitOperationErrorEvent("run:start", err);
|
|
392
398
|
openRunQuotaUpgradePrompt(err, tr, {
|
|
393
399
|
bus,
|
|
394
400
|
workspaceId,
|
|
@@ -420,6 +426,10 @@ function useExecutionActions() {
|
|
|
420
426
|
executionId: replayed.runId,
|
|
421
427
|
trigger: "manual"
|
|
422
428
|
});
|
|
429
|
+
emitFluidGridsEvent("run:started", {
|
|
430
|
+
runId: replayed.runId,
|
|
431
|
+
workflowKey: replayed.workflowKey
|
|
432
|
+
});
|
|
423
433
|
}
|
|
424
434
|
return replayed;
|
|
425
435
|
} catch (err) {
|
|
@@ -455,6 +465,10 @@ function useExecutionActions() {
|
|
|
455
465
|
executionId: run.runId,
|
|
456
466
|
trigger: "manual"
|
|
457
467
|
});
|
|
468
|
+
emitFluidGridsEvent("run:started", {
|
|
469
|
+
runId: run.runId,
|
|
470
|
+
workflowKey: run.workflowKey
|
|
471
|
+
});
|
|
458
472
|
}
|
|
459
473
|
return retried;
|
|
460
474
|
} catch (err) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { throwIfResultError } from './chunk-AAIZ6S6E.js';
|
|
2
1
|
import { useTr } from './chunk-UULVIT25.js';
|
|
3
|
-
import { getFluidGridsClient } from './chunk-
|
|
2
|
+
import { getFluidGridsClient } from './chunk-3IXU7WUC.js';
|
|
3
|
+
import { throwIfResultError } from './chunk-US5QSLPV.js';
|
|
4
4
|
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
5
5
|
import { gql } from '@apollo/client';
|
|
6
6
|
import { cn } from '@burdenoff/fe-libs/utils';
|
|
@@ -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 };
|