@reopt-ai/opt-workflow 0.1.2 → 0.1.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/CHANGELOG.md +8 -0
- package/dist/{branch-resolver-D_wM183Q.cjs → branch-resolver-BMbNYMjx.cjs} +41 -33
- package/dist/{branch-resolver-BDi6Wu6m.js → branch-resolver-d5DC_s2D.js} +41 -33
- package/dist/{core-z3nXmUBj.d.ts → core-9vFdaT2U.d.ts} +17 -1
- package/dist/{core-CtqBb-6v.d.cts → core-CG0cyIEY.d.cts} +17 -1
- package/dist/core.cjs +3 -2
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +3 -3
- package/dist/index.cjs +14 -12
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -13
- package/dist/mock.cjs +1 -1
- package/dist/mock.js +1 -1
- package/dist/simulate.cjs +1 -1
- package/dist/simulate.js +1 -1
- package/dist/{test-executor-C2AvI73G.cjs → test-executor-DkBxQ-2s.cjs} +1 -1
- package/dist/{test-executor-DpT3qXIT.js → test-executor-hX0VIrtP.js} +1 -1
- package/dist/{workflow-preview-CZzXKXqK.cjs → workflow-preview-BtEThohd.cjs} +32 -1
- package/dist/{workflow-preview-B0kul6f-.js → workflow-preview-DP-VqUqM.js} +27 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.3] - 2026-12-01
|
|
6
|
+
|
|
7
|
+
- Fixed: a Switch step saved by the editor never took a case. The branch resolver read the raw condition type (which a Switch does not store) and resolved it as if/else; it now reads the normalized config, in runs and in test runs.
|
|
8
|
+
- Fixed: adding a step next to a condition created a connection without a branch — drawn on the canvas but never followed once a sibling branch had a type. The auto-connection takes a free branch (true, then false; default for a Switch) or leaves the step unconnected, and it no longer connects from an end step or adds a second outgoing connection to a step that follows only its first.
|
|
9
|
+
- Fixed: a trigger payload could shadow a step output or a run identifier in `{{…}}` lookups. Executed step outputs and run identifiers now resolve first. A null value renders as an empty string.
|
|
10
|
+
- Fixed: condition expressions that passed the check could throw at run time (`{{x}} === ''`, negative numbers) or break on a value containing an operator or a line break. Expressions are split before substitution.
|
|
11
|
+
- Fixed: export dropped the saved sample input, and import kept the previous one.
|
|
12
|
+
|
|
5
13
|
## [0.1.2] - 2026-11-30
|
|
6
14
|
|
|
7
15
|
- Fixed: closing the import or export dialog left focus on the more-menu button instead of the canvas, so the next arrow key did nothing.
|
|
@@ -60,10 +60,22 @@ function getValueByPath(obj, path) {
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* 변수 소스에서 값 조회
|
|
63
|
-
* 우선순위: variables > params >
|
|
63
|
+
* 우선순위: 실행 식별자 > 실행된 스텝의 출력 > variables > params > 나머지 시스템 변수
|
|
64
|
+
*
|
|
65
|
+
* 트리거 페이로드는 외부 입력이다 — 그것이 먼저이던 동안은 페이로드의
|
|
66
|
+
* `{"step-2":{"output":{"result":"approved"}}}`가 실제 스텝 출력을 대신해 분기 게이트를 밖에서
|
|
67
|
+
* 정할 수 있었다. 엔진이 만든 값은 외부 입력이 가릴 수 없어야 한다.
|
|
64
68
|
*/
|
|
65
69
|
function resolveVariable(variablePath, context) {
|
|
66
70
|
const trimmedPath = variablePath.trim();
|
|
71
|
+
if (trimmedPath === "runId") return context.runId;
|
|
72
|
+
if (trimmedPath === "workflowId") return context.workflowId;
|
|
73
|
+
if (trimmedPath === "workspaceId") return context.workspaceId;
|
|
74
|
+
const stepParts = trimmedPath.split(".");
|
|
75
|
+
if (stepParts.length >= 2 && stepParts[1] === "output") {
|
|
76
|
+
const executed = context.previousResults.get(stepParts[0]);
|
|
77
|
+
if (executed) return executed.output ? getValueByPath({ output: executed.output }, stepParts.slice(1).join(".")) : void 0;
|
|
78
|
+
}
|
|
67
79
|
const fromVariables = getValueByPath(context.variables, trimmedPath);
|
|
68
80
|
if (fromVariables !== void 0) return fromVariables;
|
|
69
81
|
if (trimmedPath.startsWith("variables.")) {
|
|
@@ -86,9 +98,6 @@ function resolveVariable(variablePath, context) {
|
|
|
86
98
|
if (fromOutput !== void 0) return fromOutput;
|
|
87
99
|
}
|
|
88
100
|
}
|
|
89
|
-
if (trimmedPath === "runId") return context.runId;
|
|
90
|
-
if (trimmedPath === "workflowId") return context.workflowId;
|
|
91
|
-
if (trimmedPath === "workspaceId") return context.workspaceId;
|
|
92
101
|
if (trimmedPath === "userId") return context.userId;
|
|
93
102
|
if (trimmedPath === "triggeredBy") return context.triggeredBy;
|
|
94
103
|
if (trimmedPath === "now") return (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -116,7 +125,7 @@ function neutralizeUntrusted(text) {
|
|
|
116
125
|
function replaceVariables(template, context, formatValue) {
|
|
117
126
|
return template.replace(VARIABLE_PATTERN, (match, variablePath) => {
|
|
118
127
|
const value = resolveVariable(variablePath, context);
|
|
119
|
-
if (value === void 0) return "";
|
|
128
|
+
if (value === void 0 || value === null) return "";
|
|
120
129
|
if (typeof value === "object") return formatValue(JSON.stringify(value));
|
|
121
130
|
return formatValue(String(value));
|
|
122
131
|
});
|
|
@@ -168,9 +177,11 @@ function resolveVariableValue(variablePath, context) {
|
|
|
168
177
|
* 그래서 치환은 그대로 두고, 무엇이 비었는지를 기록으로 남긴다.
|
|
169
178
|
*/
|
|
170
179
|
function collectUnresolvedVariables(value, context, seen = /* @__PURE__ */ new Set()) {
|
|
171
|
-
if (typeof value === "string") {
|
|
172
|
-
|
|
173
|
-
|
|
180
|
+
if (typeof value === "string") for (const path of extractVariablePaths(value)) {
|
|
181
|
+
const resolved = resolveVariableValue(path, context);
|
|
182
|
+
if (resolved === void 0 || resolved === null) seen.add(path);
|
|
183
|
+
}
|
|
184
|
+
else if (Array.isArray(value)) for (const item of value) collectUnresolvedVariables(item, context, seen);
|
|
174
185
|
else if (value && typeof value === "object") for (const item of Object.values(value)) collectUnresolvedVariables(item, context, seen);
|
|
175
186
|
return [...seen];
|
|
176
187
|
}
|
|
@@ -277,40 +288,37 @@ function findUnsupportedConditionExpression(expression) {
|
|
|
277
288
|
function evaluateExpression(expression, context) {
|
|
278
289
|
const unsupported = findUnsupportedConditionExpression(expression);
|
|
279
290
|
if (unsupported) throw new Error(unsupported);
|
|
280
|
-
const
|
|
281
|
-
if (/^true$/i.test(
|
|
282
|
-
if (/^false$/i.test(
|
|
283
|
-
const equalityMatch =
|
|
291
|
+
const trimmed = expression.trim();
|
|
292
|
+
if (/^true$/i.test(trimmed)) return true;
|
|
293
|
+
if (/^false$/i.test(trimmed)) return false;
|
|
294
|
+
const equalityMatch = /^([\s\S]+?)\s*(===?|!==?)\s*(['"])([\s\S]*)\3$/.exec(trimmed);
|
|
284
295
|
if (equalityMatch) {
|
|
285
|
-
const [,
|
|
286
|
-
|
|
287
|
-
if (op === "===" || op === "==") return leftValue === right;
|
|
288
|
-
if (op === "!==" || op === "!=") return leftValue !== right;
|
|
296
|
+
const same = resolveVariables(equalityMatch[1], context).trim() === resolveVariables(equalityMatch[4], context);
|
|
297
|
+
return equalityMatch[2].startsWith("!") ? !same : same;
|
|
289
298
|
}
|
|
290
|
-
const numericMatch =
|
|
299
|
+
const numericMatch = /^([\s\S]+?)\s*(>=|<=|>|<|===?|!==?)\s*(-?\d+(?:\.\d+)?)$/.exec(trimmed);
|
|
291
300
|
if (numericMatch) {
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
switch (op) {
|
|
301
|
+
const leftNum = parseConditionNumber(resolveVariables(numericMatch[1], context));
|
|
302
|
+
const rightNum = parseFloat(numericMatch[3]);
|
|
303
|
+
if (Number.isNaN(leftNum) || Number.isNaN(rightNum)) return false;
|
|
304
|
+
switch (numericMatch[2]) {
|
|
297
305
|
case ">": return leftNum > rightNum;
|
|
298
306
|
case "<": return leftNum < rightNum;
|
|
299
307
|
case ">=": return leftNum >= rightNum;
|
|
300
308
|
case "<=": return leftNum <= rightNum;
|
|
301
309
|
case "===":
|
|
302
310
|
case "==": return leftNum === rightNum;
|
|
303
|
-
|
|
304
|
-
case "!=": return leftNum !== rightNum;
|
|
311
|
+
default: return leftNum !== rightNum;
|
|
305
312
|
}
|
|
306
313
|
}
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return
|
|
314
|
+
const value = resolveVariables(trimmed, context).trim();
|
|
315
|
+
return !(!value || value === "0" || value === "null" || value === "undefined" || value.toLowerCase() === "false");
|
|
316
|
+
}
|
|
317
|
+
/** "1,000"처럼 자릿수 쉼표가 든 값도 숫자로 읽는다(그대로 parseFloat하면 1이 된다). */
|
|
318
|
+
function parseConditionNumber(raw) {
|
|
319
|
+
const text = raw.trim();
|
|
320
|
+
if (/^-?\d{1,3}(,\d{3})+(\.\d+)?$/.test(text)) return Number(text.replaceAll(",", ""));
|
|
321
|
+
return text === "" ? NaN : Number(text);
|
|
314
322
|
}
|
|
315
323
|
/**
|
|
316
324
|
* 비교 연산 수행
|
|
@@ -503,7 +511,7 @@ async function evaluateConditionWithDetails(config, context) {
|
|
|
503
511
|
*/
|
|
504
512
|
function resolveBranchPath(conditionStep, outgoingConnections, conditionResult) {
|
|
505
513
|
if (outgoingConnections.length === 0) return null;
|
|
506
|
-
if (conditionStep.config.conditionType === "switch") return resolveSwitchBranch(outgoingConnections, conditionResult);
|
|
514
|
+
if (normalizeConditionConfig(conditionStep.config).conditionType === "switch") return resolveSwitchBranch(outgoingConnections, conditionResult);
|
|
507
515
|
return resolveIfElseBranch(outgoingConnections, conditionResult);
|
|
508
516
|
}
|
|
509
517
|
/**
|
|
@@ -540,7 +548,7 @@ function resolveSwitchBranch(connections, conditionResult) {
|
|
|
540
548
|
function validateBranchConnections(conditionStep, connections) {
|
|
541
549
|
const errors = [];
|
|
542
550
|
const warnings = [];
|
|
543
|
-
if (conditionStep.config.conditionType === "switch") {
|
|
551
|
+
if (normalizeConditionConfig(conditionStep.config).conditionType === "switch") {
|
|
544
552
|
const caseConnections = connections.filter((c) => c.branchType === "case");
|
|
545
553
|
const defaultConnection = connections.find((c) => c.branchType === "default");
|
|
546
554
|
if (caseConnections.length === 0 && !defaultConnection) errors.push("switch 조건에 case 또는 default 분기가 없습니다");
|
|
@@ -60,10 +60,22 @@ function getValueByPath(obj, path) {
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* 변수 소스에서 값 조회
|
|
63
|
-
* 우선순위: variables > params >
|
|
63
|
+
* 우선순위: 실행 식별자 > 실행된 스텝의 출력 > variables > params > 나머지 시스템 변수
|
|
64
|
+
*
|
|
65
|
+
* 트리거 페이로드는 외부 입력이다 — 그것이 먼저이던 동안은 페이로드의
|
|
66
|
+
* `{"step-2":{"output":{"result":"approved"}}}`가 실제 스텝 출력을 대신해 분기 게이트를 밖에서
|
|
67
|
+
* 정할 수 있었다. 엔진이 만든 값은 외부 입력이 가릴 수 없어야 한다.
|
|
64
68
|
*/
|
|
65
69
|
function resolveVariable(variablePath, context) {
|
|
66
70
|
const trimmedPath = variablePath.trim();
|
|
71
|
+
if (trimmedPath === "runId") return context.runId;
|
|
72
|
+
if (trimmedPath === "workflowId") return context.workflowId;
|
|
73
|
+
if (trimmedPath === "workspaceId") return context.workspaceId;
|
|
74
|
+
const stepParts = trimmedPath.split(".");
|
|
75
|
+
if (stepParts.length >= 2 && stepParts[1] === "output") {
|
|
76
|
+
const executed = context.previousResults.get(stepParts[0]);
|
|
77
|
+
if (executed) return executed.output ? getValueByPath({ output: executed.output }, stepParts.slice(1).join(".")) : void 0;
|
|
78
|
+
}
|
|
67
79
|
const fromVariables = getValueByPath(context.variables, trimmedPath);
|
|
68
80
|
if (fromVariables !== void 0) return fromVariables;
|
|
69
81
|
if (trimmedPath.startsWith("variables.")) {
|
|
@@ -86,9 +98,6 @@ function resolveVariable(variablePath, context) {
|
|
|
86
98
|
if (fromOutput !== void 0) return fromOutput;
|
|
87
99
|
}
|
|
88
100
|
}
|
|
89
|
-
if (trimmedPath === "runId") return context.runId;
|
|
90
|
-
if (trimmedPath === "workflowId") return context.workflowId;
|
|
91
|
-
if (trimmedPath === "workspaceId") return context.workspaceId;
|
|
92
101
|
if (trimmedPath === "userId") return context.userId;
|
|
93
102
|
if (trimmedPath === "triggeredBy") return context.triggeredBy;
|
|
94
103
|
if (trimmedPath === "now") return (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -116,7 +125,7 @@ function neutralizeUntrusted(text) {
|
|
|
116
125
|
function replaceVariables(template, context, formatValue) {
|
|
117
126
|
return template.replace(VARIABLE_PATTERN, (match, variablePath) => {
|
|
118
127
|
const value = resolveVariable(variablePath, context);
|
|
119
|
-
if (value === void 0) return "";
|
|
128
|
+
if (value === void 0 || value === null) return "";
|
|
120
129
|
if (typeof value === "object") return formatValue(JSON.stringify(value));
|
|
121
130
|
return formatValue(String(value));
|
|
122
131
|
});
|
|
@@ -168,9 +177,11 @@ function resolveVariableValue(variablePath, context) {
|
|
|
168
177
|
* 그래서 치환은 그대로 두고, 무엇이 비었는지를 기록으로 남긴다.
|
|
169
178
|
*/
|
|
170
179
|
function collectUnresolvedVariables(value, context, seen = /* @__PURE__ */ new Set()) {
|
|
171
|
-
if (typeof value === "string") {
|
|
172
|
-
|
|
173
|
-
|
|
180
|
+
if (typeof value === "string") for (const path of extractVariablePaths(value)) {
|
|
181
|
+
const resolved = resolveVariableValue(path, context);
|
|
182
|
+
if (resolved === void 0 || resolved === null) seen.add(path);
|
|
183
|
+
}
|
|
184
|
+
else if (Array.isArray(value)) for (const item of value) collectUnresolvedVariables(item, context, seen);
|
|
174
185
|
else if (value && typeof value === "object") for (const item of Object.values(value)) collectUnresolvedVariables(item, context, seen);
|
|
175
186
|
return [...seen];
|
|
176
187
|
}
|
|
@@ -277,40 +288,37 @@ function findUnsupportedConditionExpression(expression) {
|
|
|
277
288
|
function evaluateExpression(expression, context) {
|
|
278
289
|
const unsupported = findUnsupportedConditionExpression(expression);
|
|
279
290
|
if (unsupported) throw new Error(unsupported);
|
|
280
|
-
const
|
|
281
|
-
if (/^true$/i.test(
|
|
282
|
-
if (/^false$/i.test(
|
|
283
|
-
const equalityMatch =
|
|
291
|
+
const trimmed = expression.trim();
|
|
292
|
+
if (/^true$/i.test(trimmed)) return true;
|
|
293
|
+
if (/^false$/i.test(trimmed)) return false;
|
|
294
|
+
const equalityMatch = /^([\s\S]+?)\s*(===?|!==?)\s*(['"])([\s\S]*)\3$/.exec(trimmed);
|
|
284
295
|
if (equalityMatch) {
|
|
285
|
-
const [,
|
|
286
|
-
|
|
287
|
-
if (op === "===" || op === "==") return leftValue === right;
|
|
288
|
-
if (op === "!==" || op === "!=") return leftValue !== right;
|
|
296
|
+
const same = resolveVariables(equalityMatch[1], context).trim() === resolveVariables(equalityMatch[4], context);
|
|
297
|
+
return equalityMatch[2].startsWith("!") ? !same : same;
|
|
289
298
|
}
|
|
290
|
-
const numericMatch =
|
|
299
|
+
const numericMatch = /^([\s\S]+?)\s*(>=|<=|>|<|===?|!==?)\s*(-?\d+(?:\.\d+)?)$/.exec(trimmed);
|
|
291
300
|
if (numericMatch) {
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
switch (op) {
|
|
301
|
+
const leftNum = parseConditionNumber(resolveVariables(numericMatch[1], context));
|
|
302
|
+
const rightNum = parseFloat(numericMatch[3]);
|
|
303
|
+
if (Number.isNaN(leftNum) || Number.isNaN(rightNum)) return false;
|
|
304
|
+
switch (numericMatch[2]) {
|
|
297
305
|
case ">": return leftNum > rightNum;
|
|
298
306
|
case "<": return leftNum < rightNum;
|
|
299
307
|
case ">=": return leftNum >= rightNum;
|
|
300
308
|
case "<=": return leftNum <= rightNum;
|
|
301
309
|
case "===":
|
|
302
310
|
case "==": return leftNum === rightNum;
|
|
303
|
-
|
|
304
|
-
case "!=": return leftNum !== rightNum;
|
|
311
|
+
default: return leftNum !== rightNum;
|
|
305
312
|
}
|
|
306
313
|
}
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return
|
|
314
|
+
const value = resolveVariables(trimmed, context).trim();
|
|
315
|
+
return !(!value || value === "0" || value === "null" || value === "undefined" || value.toLowerCase() === "false");
|
|
316
|
+
}
|
|
317
|
+
/** "1,000"처럼 자릿수 쉼표가 든 값도 숫자로 읽는다(그대로 parseFloat하면 1이 된다). */
|
|
318
|
+
function parseConditionNumber(raw) {
|
|
319
|
+
const text = raw.trim();
|
|
320
|
+
if (/^-?\d{1,3}(,\d{3})+(\.\d+)?$/.test(text)) return Number(text.replaceAll(",", ""));
|
|
321
|
+
return text === "" ? NaN : Number(text);
|
|
314
322
|
}
|
|
315
323
|
/**
|
|
316
324
|
* 비교 연산 수행
|
|
@@ -503,7 +511,7 @@ async function evaluateConditionWithDetails(config, context) {
|
|
|
503
511
|
*/
|
|
504
512
|
function resolveBranchPath(conditionStep, outgoingConnections, conditionResult) {
|
|
505
513
|
if (outgoingConnections.length === 0) return null;
|
|
506
|
-
if (conditionStep.config.conditionType === "switch") return resolveSwitchBranch(outgoingConnections, conditionResult);
|
|
514
|
+
if (normalizeConditionConfig(conditionStep.config).conditionType === "switch") return resolveSwitchBranch(outgoingConnections, conditionResult);
|
|
507
515
|
return resolveIfElseBranch(outgoingConnections, conditionResult);
|
|
508
516
|
}
|
|
509
517
|
/**
|
|
@@ -540,7 +548,7 @@ function resolveSwitchBranch(connections, conditionResult) {
|
|
|
540
548
|
function validateBranchConnections(conditionStep, connections) {
|
|
541
549
|
const errors = [];
|
|
542
550
|
const warnings = [];
|
|
543
|
-
if (conditionStep.config.conditionType === "switch") {
|
|
551
|
+
if (normalizeConditionConfig(conditionStep.config).conditionType === "switch") {
|
|
544
552
|
const caseConnections = connections.filter((c) => c.branchType === "case");
|
|
545
553
|
const defaultConnection = connections.find((c) => c.branchType === "default");
|
|
546
554
|
if (caseConnections.length === 0 && !defaultConnection) errors.push("switch 조건에 case 또는 default 분기가 없습니다");
|
|
@@ -373,6 +373,22 @@ declare function findNearestFreeCell(anchor: GridPosition, steps: GridStep[]): G
|
|
|
373
373
|
* 세션)가 이 함수 **한 벌**을 쓴다.
|
|
374
374
|
*/
|
|
375
375
|
declare function validateConnection(from: GridStep, to: GridStep, connections: GridConnection[]): string | null;
|
|
376
|
+
/**
|
|
377
|
+
* 빈 칸에 스텝을 추가할 때의 **자동 연결**을 정한다 — 이을 수 없으면 null(스텝만 추가한다).
|
|
378
|
+
*
|
|
379
|
+
* 🔴 예전의 자동 연결은 순환만 보고 이웃 스텝에서 선을 그었다. 그래서
|
|
380
|
+
* - 조건 스텝 옆에 스텝을 추가하면 **분기 타입 없는 연결**이 생겼다. 타입 있는 형제 분기가
|
|
381
|
+
* 하나라도 있으면 실행기는 그 연결을 고르지 않는다(fail-closed) — 선은 보이는데 그 길로는
|
|
382
|
+
* 영영 가지 않았다.
|
|
383
|
+
* - 종료 스텝에서도, 이미 나가는 연결이 있는 일반 스텝에서도(실행기는 첫 번째만 따라간다)
|
|
384
|
+
* 아무 말 없이 선이 그어졌다.
|
|
385
|
+
* 수동 연결(`validateConnection` + 분기 선택 대화상자 + 두 번째 연결 경고)과 같은 규칙을
|
|
386
|
+
* 대화상자 없이 적용한다: 조건 스텝은 비어 있는 분기를 고르고(참 → 거짓, Switch는 기본),
|
|
387
|
+
* 고를 분기가 없으면 잇지 않는다.
|
|
388
|
+
*/
|
|
389
|
+
declare function planAutoConnection(from: GridStep, to: GridStep, connections: GridConnection[]): {
|
|
390
|
+
branchType?: BranchType;
|
|
391
|
+
} | null;
|
|
376
392
|
type IsCellOccupied = (position: GridPosition) => boolean;
|
|
377
393
|
/** 두 셀을 잇는 꺾임점 목록(콘텐츠 좌표계). 첫 점은 출발 카드의 변, 끝 점은 도착 카드의 변. */
|
|
378
394
|
declare function routeConnection(from: GridPosition, to: GridPosition, isOccupied: IsCellOccupied): Point[];
|
|
@@ -916,4 +932,4 @@ declare function maskPiiString(input: string): string;
|
|
|
916
932
|
* 순환 참조 / Map / Set / Date 같은 비-plain 값은 안전하게 통과시킨다.
|
|
917
933
|
*/
|
|
918
934
|
declare function maskPiiDeep<T>(value: T, depth?: number, seen?: WeakSet<object>): T;
|
|
919
|
-
export { selectAppliedGraph as $,
|
|
935
|
+
export { selectAppliedGraph as $, parseGridWorkflowDefinition as $t, triageFailedStep as A, ContentRect as At, exportTemplate as B, getStepsRect as Bt, FAILURE_CAUSE_COPY as C, ConnectionFocus as Ct, ResidualFailure as D, listStepConnections as Dt, FailureTriage as E, getConnectionFarEnd as Et, parseChoiceList as F, contentToViewport as Ft, ProposalOpResult as G, MAX_ROWS as Gt, serializeTemplate as H, viewportToContent as Ht, ImportResult as I, getCellCenter as It, resolveCatalogNode as J, deriveGridBounds as Jt, WorkflowProposalSession as K, MIN_COLS as Kt, ValidationError as L, getCellEdge as Lt, AiTextStreamData as M, Point as Mt, createThrottledEmitter as N, ViewportTransform as Nt, TriageOutcome as O, orderStepsByFlow as Ot, isAiTextStreamData as P, cellToViewportRect as Pt, computePreviewGraph as Q, EMPTY_GRID_WORKFLOW_DEFINITION as Qt, ValidationResult as R, getCellOrigin as Rt, defineTemplate as S, validateConnection as St, FailureCause as T, findStepInDirection as Tt, validateWorkflowDefinition as U, GridBounds as Ut, importTemplate as V, viewportPointToCell as Vt, buildWorkflowBrief as W, MAX_COLS as Wt, PreviewGraph as X, isWithinHardCap as Xt, validateStepConfig as Y, isWithinBounds as Yt, WorkflowProposalOp as Z, mergeBounds as Zt, validateConditionConfig as _, gridWorkflowDefinitionSchema as _n, routeLabelPoint as _t, hasVariables as a, GridPositionInput as an, ConnectionRunStatus as at, resolveBranchPath as b, SingleCondition as bn, findNearestFreeCell as bt, resolveValueReference as c, GridStepOutput as cn, deriveRunPath as ct, ConditionResult as d, branchTypeSchema as dn, PreviewStep as dt, parseGridWorkflowDefinitionStrict as en, missingRequiredFields as et, evaluateCondition as f, exportTemplateSchema as fn, orderStepsForPreview as ft, normalizeConditionConfig as g, gridStepTypeSchema as gn, routeLabelFallbackPoint as gt, findUnsupportedConditionExpression as h, gridStepSchema as hn, routeConnection as ht, extractVariablePaths as i, GridConnectionOutput as in, getStepSummary as it, AI_TEXT_STREAM_NAMESPACE as j, IDENTITY_TRANSFORM as jt, findFailedStep as k, resolveConnectionFocus as kt, resolveVariableValue as l, GridWorkflowDefinitionInput as ln, findRunBlockers as lt, evaluateConditionWithDetails as m, gridPositionSchema as mn, roundedPath as mt, maskPiiString as n, ExportTemplateOutput as nn, WorkflowSetupProblem as nt, resolveObjectVariables as o, GridPositionOutput as on, RunPath as ot, evaluateConditionGroup as p, gridConnectionSchema as pn, IsCellOccupied as pt, createWorkflowProposalSession as q, MIN_ROWS as qt, collectUnresolvedVariables as r, GridConnectionInput as rn, findWorkflowSetupProblems as rt, resolvePromptVariables as s, GridStepInput as sn, RunPathStepState as st, maskPiiDeep as t, ExportTemplateInput as tn, visibleConfigFields as tt, resolveVariables as u, GridWorkflowDefinitionOutput as un, OrderedPreviewSteps as ut, extractBranchInfo as v, ConditionConfig as vn, findFreeAdjacentCell as vt, FAILURE_CAUSES as w, cycleStepConnection as wt, validateBranchConnections as x, planAutoConnection as xt, getBranchLabel as y, ConditionGroup as yn, findFreeCommonNeighbor as yt, ValidationWarning as z, getContentSize as zt };
|
|
@@ -373,6 +373,22 @@ declare function findNearestFreeCell(anchor: GridPosition, steps: GridStep[]): G
|
|
|
373
373
|
* 세션)가 이 함수 **한 벌**을 쓴다.
|
|
374
374
|
*/
|
|
375
375
|
declare function validateConnection(from: GridStep, to: GridStep, connections: GridConnection[]): string | null;
|
|
376
|
+
/**
|
|
377
|
+
* 빈 칸에 스텝을 추가할 때의 **자동 연결**을 정한다 — 이을 수 없으면 null(스텝만 추가한다).
|
|
378
|
+
*
|
|
379
|
+
* 🔴 예전의 자동 연결은 순환만 보고 이웃 스텝에서 선을 그었다. 그래서
|
|
380
|
+
* - 조건 스텝 옆에 스텝을 추가하면 **분기 타입 없는 연결**이 생겼다. 타입 있는 형제 분기가
|
|
381
|
+
* 하나라도 있으면 실행기는 그 연결을 고르지 않는다(fail-closed) — 선은 보이는데 그 길로는
|
|
382
|
+
* 영영 가지 않았다.
|
|
383
|
+
* - 종료 스텝에서도, 이미 나가는 연결이 있는 일반 스텝에서도(실행기는 첫 번째만 따라간다)
|
|
384
|
+
* 아무 말 없이 선이 그어졌다.
|
|
385
|
+
* 수동 연결(`validateConnection` + 분기 선택 대화상자 + 두 번째 연결 경고)과 같은 규칙을
|
|
386
|
+
* 대화상자 없이 적용한다: 조건 스텝은 비어 있는 분기를 고르고(참 → 거짓, Switch는 기본),
|
|
387
|
+
* 고를 분기가 없으면 잇지 않는다.
|
|
388
|
+
*/
|
|
389
|
+
declare function planAutoConnection(from: GridStep, to: GridStep, connections: GridConnection[]): {
|
|
390
|
+
branchType?: BranchType;
|
|
391
|
+
} | null;
|
|
376
392
|
type IsCellOccupied = (position: GridPosition) => boolean;
|
|
377
393
|
/** 두 셀을 잇는 꺾임점 목록(콘텐츠 좌표계). 첫 점은 출발 카드의 변, 끝 점은 도착 카드의 변. */
|
|
378
394
|
declare function routeConnection(from: GridPosition, to: GridPosition, isOccupied: IsCellOccupied): Point[];
|
|
@@ -916,4 +932,4 @@ declare function maskPiiString(input: string): string;
|
|
|
916
932
|
* 순환 참조 / Map / Set / Date 같은 비-plain 값은 안전하게 통과시킨다.
|
|
917
933
|
*/
|
|
918
934
|
declare function maskPiiDeep<T>(value: T, depth?: number, seen?: WeakSet<object>): T;
|
|
919
|
-
export { selectAppliedGraph as $,
|
|
935
|
+
export { selectAppliedGraph as $, parseGridWorkflowDefinition as $t, triageFailedStep as A, ContentRect as At, exportTemplate as B, getStepsRect as Bt, FAILURE_CAUSE_COPY as C, ConnectionFocus as Ct, ResidualFailure as D, listStepConnections as Dt, FailureTriage as E, getConnectionFarEnd as Et, parseChoiceList as F, contentToViewport as Ft, ProposalOpResult as G, MAX_ROWS as Gt, serializeTemplate as H, viewportToContent as Ht, ImportResult as I, getCellCenter as It, resolveCatalogNode as J, deriveGridBounds as Jt, WorkflowProposalSession as K, MIN_COLS as Kt, ValidationError as L, getCellEdge as Lt, AiTextStreamData as M, Point as Mt, createThrottledEmitter as N, ViewportTransform as Nt, TriageOutcome as O, orderStepsByFlow as Ot, isAiTextStreamData as P, cellToViewportRect as Pt, computePreviewGraph as Q, EMPTY_GRID_WORKFLOW_DEFINITION as Qt, ValidationResult as R, getCellOrigin as Rt, defineTemplate as S, validateConnection as St, FailureCause as T, findStepInDirection as Tt, validateWorkflowDefinition as U, GridBounds as Ut, importTemplate as V, viewportPointToCell as Vt, buildWorkflowBrief as W, MAX_COLS as Wt, PreviewGraph as X, isWithinHardCap as Xt, validateStepConfig as Y, isWithinBounds as Yt, WorkflowProposalOp as Z, mergeBounds as Zt, validateConditionConfig as _, gridWorkflowDefinitionSchema as _n, routeLabelPoint as _t, hasVariables as a, GridPositionInput as an, ConnectionRunStatus as at, resolveBranchPath as b, SingleCondition as bn, findNearestFreeCell as bt, resolveValueReference as c, GridStepOutput as cn, deriveRunPath as ct, ConditionResult as d, branchTypeSchema as dn, PreviewStep as dt, parseGridWorkflowDefinitionStrict as en, missingRequiredFields as et, evaluateCondition as f, exportTemplateSchema as fn, orderStepsForPreview as ft, normalizeConditionConfig as g, gridStepTypeSchema as gn, routeLabelFallbackPoint as gt, findUnsupportedConditionExpression as h, gridStepSchema as hn, routeConnection as ht, extractVariablePaths as i, GridConnectionOutput as in, getStepSummary as it, AI_TEXT_STREAM_NAMESPACE as j, IDENTITY_TRANSFORM as jt, findFailedStep as k, resolveConnectionFocus as kt, resolveVariableValue as l, GridWorkflowDefinitionInput as ln, findRunBlockers as lt, evaluateConditionWithDetails as m, gridPositionSchema as mn, roundedPath as mt, maskPiiString as n, ExportTemplateOutput as nn, WorkflowSetupProblem as nt, resolveObjectVariables as o, GridPositionOutput as on, RunPath as ot, evaluateConditionGroup as p, gridConnectionSchema as pn, IsCellOccupied as pt, createWorkflowProposalSession as q, MIN_ROWS as qt, collectUnresolvedVariables as r, GridConnectionInput as rn, findWorkflowSetupProblems as rt, resolvePromptVariables as s, GridStepInput as sn, RunPathStepState as st, maskPiiDeep as t, ExportTemplateInput as tn, visibleConfigFields as tt, resolveVariables as u, GridWorkflowDefinitionOutput as un, OrderedPreviewSteps as ut, extractBranchInfo as v, ConditionConfig as vn, findFreeAdjacentCell as vt, FAILURE_CAUSES as w, cycleStepConnection as wt, validateBranchConnections as x, planAutoConnection as xt, getBranchLabel as y, ConditionGroup as yn, findFreeCommonNeighbor as yt, ValidationWarning as z, getContentSize as zt };
|
package/dist/core.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_ai_stream = require("./ai-stream-B_lk9_Rf.cjs");
|
|
3
|
-
const require_workflow_preview = require("./workflow-preview-
|
|
3
|
+
const require_workflow_preview = require("./workflow-preview-BtEThohd.cjs");
|
|
4
4
|
const require_step_type_for_node = require("./step-type-for-node-D9sdHfWA.cjs");
|
|
5
5
|
const require_node_definitions = require("./node-definitions-pS1Zp1dK.cjs");
|
|
6
6
|
const require_end_node_ids = require("./end-node-ids-D6WBaCLm.cjs");
|
|
7
7
|
const require_define_template = require("./define-template-Bmn96lF_.cjs");
|
|
8
|
-
const require_branch_resolver = require("./branch-resolver-
|
|
8
|
+
const require_branch_resolver = require("./branch-resolver-BMbNYMjx.cjs");
|
|
9
9
|
// src/lib/workflow-proposal-session.ts
|
|
10
10
|
/**
|
|
11
11
|
* AI 제안 세션 — 서버 도구가 op 하나를 받을 때마다 **캔버스 미리보기와 같은 계산**으로
|
|
@@ -275,6 +275,7 @@ exports.orderStepsForPreview = require_workflow_preview.orderStepsForPreview;
|
|
|
275
275
|
exports.parseChoiceList = require_ai_stream.parseChoiceList;
|
|
276
276
|
exports.parseGridWorkflowDefinition = require_ai_stream.parseGridWorkflowDefinition;
|
|
277
277
|
exports.parseGridWorkflowDefinitionStrict = require_ai_stream.parseGridWorkflowDefinitionStrict;
|
|
278
|
+
exports.planAutoConnection = require_workflow_preview.planAutoConnection;
|
|
278
279
|
exports.positionToIndex = require_ai_stream.positionToIndex;
|
|
279
280
|
exports.resolveBranchPath = require_branch_resolver.resolveBranchPath;
|
|
280
281
|
exports.resolveCatalogNode = resolveCatalogNode;
|
package/dist/core.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as getConnectionDirection, C as MAX_GRID_COLS, D as STEP_TYPE_COLORS, E as PreviewStatus, F as positionToIndex, M as indexToPosition, N as isSamePosition, O as WorkflowTemplate, P as isValidPosition, S as HistoryItem, T as MAX_STEPS, _ as GridStep, a as CELL_PITCH_X, b as GridWorkflowDto, c as ConditionType, d as GRID_SIZE, f as GridCellState, g as GridSelectionState, h as GridPosition, i as CELL_HEIGHT, j as hasCycle, k as getAdjacentPosition, l as ConnectionDirection, m as GridEditorState, n as BranchType, o as CELL_PITCH_Y, p as GridConnection, r as CELL_GAP, s as CELL_WIDTH, t as BRANCH_TYPE_COLORS, u as ConnectionModeState, v as GridStepType, w as MAX_GRID_ROWS, x as HistoryActionType, y as GridWorkflowDefinition } from "./grid-workflow-dto-C86EArJP.cjs";
|
|
2
2
|
import { a as ExecutionPath, c as StepExecutionResult, d as WorkflowExecutionContext, f as WorkflowExecutionOptions, h as FailureKind, i as ExecutionGraphNode, l as StepExecutionStatus, m as FAILURE_KINDS, n as ExecutionEvent, o as ResolvedValue, p as WorkflowExecutionResult, r as ExecutionEventType, s as StepExecutionRecord, t as ConditionEvalDetails, u as TriggerSource } from "./execution-context-DVeybULC.cjs";
|
|
3
|
-
import { $ as selectAppliedGraph, $t as
|
|
3
|
+
import { $ as selectAppliedGraph, $t as parseGridWorkflowDefinition, A as triageFailedStep, At as ContentRect, B as exportTemplate, Bt as getStepsRect, C as FAILURE_CAUSE_COPY, Ct as ConnectionFocus, D as ResidualFailure, Dt as listStepConnections, E as FailureTriage, Et as getConnectionFarEnd, F as parseChoiceList, Ft as contentToViewport, G as ProposalOpResult, Gt as MAX_ROWS, H as serializeTemplate, Ht as viewportToContent, I as ImportResult, It as getCellCenter, J as resolveCatalogNode, Jt as deriveGridBounds, K as WorkflowProposalSession, Kt as MIN_COLS, L as ValidationError, Lt as getCellEdge, M as AiTextStreamData, Mt as Point, N as createThrottledEmitter, Nt as ViewportTransform, O as TriageOutcome, Ot as orderStepsByFlow, P as isAiTextStreamData, Pt as cellToViewportRect, Q as computePreviewGraph, Qt as EMPTY_GRID_WORKFLOW_DEFINITION, R as ValidationResult, Rt as getCellOrigin, S as defineTemplate, St as validateConnection, T as FailureCause, Tt as findStepInDirection, U as validateWorkflowDefinition, Ut as GridBounds, V as importTemplate, Vt as viewportPointToCell, W as buildWorkflowBrief, Wt as MAX_COLS, X as PreviewGraph, Xt as isWithinHardCap, Y as validateStepConfig, Yt as isWithinBounds, Z as WorkflowProposalOp, Zt as mergeBounds, _ as validateConditionConfig, _n as gridWorkflowDefinitionSchema, _t as routeLabelPoint, a as hasVariables, an as GridPositionInput, at as ConnectionRunStatus, b as resolveBranchPath, bn as SingleCondition, bt as findNearestFreeCell, c as resolveValueReference, cn as GridStepOutput, ct as deriveRunPath, d as ConditionResult, dn as branchTypeSchema, dt as PreviewStep, en as parseGridWorkflowDefinitionStrict, et as missingRequiredFields, f as evaluateCondition, fn as exportTemplateSchema, ft as orderStepsForPreview, g as normalizeConditionConfig, gn as gridStepTypeSchema, gt as routeLabelFallbackPoint, h as findUnsupportedConditionExpression, hn as gridStepSchema, ht as routeConnection, i as extractVariablePaths, in as GridConnectionOutput, it as getStepSummary, j as AI_TEXT_STREAM_NAMESPACE, jt as IDENTITY_TRANSFORM, k as findFailedStep, kt as resolveConnectionFocus, l as resolveVariableValue, ln as GridWorkflowDefinitionInput, lt as findRunBlockers, m as evaluateConditionWithDetails, mn as gridPositionSchema, mt as roundedPath, n as maskPiiString, nn as ExportTemplateOutput, nt as WorkflowSetupProblem, o as resolveObjectVariables, on as GridPositionOutput, ot as RunPath, p as evaluateConditionGroup, pn as gridConnectionSchema, pt as IsCellOccupied, q as createWorkflowProposalSession, qt as MIN_ROWS, r as collectUnresolvedVariables, rn as GridConnectionInput, rt as findWorkflowSetupProblems, s as resolvePromptVariables, sn as GridStepInput, st as RunPathStepState, t as maskPiiDeep, tn as ExportTemplateInput, tt as visibleConfigFields, u as resolveVariables, un as GridWorkflowDefinitionOutput, ut as OrderedPreviewSteps, v as extractBranchInfo, vn as ConditionConfig, vt as findFreeAdjacentCell, w as FAILURE_CAUSES, wt as cycleStepConnection, x as validateBranchConnections, xt as planAutoConnection, y as getBranchLabel, yn as ConditionGroup, yt as findFreeCommonNeighbor, z as ValidationWarning, zt as getContentSize } from "./core-CG0cyIEY.cjs";
|
|
4
4
|
import { S as formatShare, _ as RunStepSample, a as TemplateMetadata, b as aggregateStepMetrics, c as getWorkflowPreflight, d as VariableTreeGroup, f as VariableTreeItem, g as getUpstreamSteps, h as flattenFields, i as TemplateIconKey, l as VARIABLE_TOKEN_PATTERN, m as findBrokenStepRefs, n as TemplateCategory, o as MULTI_OUTGOING_STEP_TYPES, p as buildVariableTree, r as TemplateDefinition, s as WorkflowPreflightIssue, t as ExtendedWorkflowTemplate, u as VariableRefIssue, v as StepMetric, x as formatDurationMs, y as WorkflowStepMetrics } from "./types-Bj0VWFny.cjs";
|
|
5
|
-
export { AI_TEXT_STREAM_NAMESPACE, AiTextStreamData, BRANCH_TYPE_COLORS, BranchType, CELL_GAP, CELL_HEIGHT, CELL_PITCH_X, CELL_PITCH_Y, CELL_WIDTH, ConditionConfig, ConditionEvalDetails, ConditionGroup, ConditionResult, ConditionType, ConnectionDirection, ConnectionFocus, ConnectionModeState, ConnectionRunStatus, ContentRect, EMPTY_GRID_WORKFLOW_DEFINITION, ExecutionEvent, ExecutionEventType, ExecutionGraphNode, ExecutionPath, ExportTemplateInput, ExportTemplateOutput, ExtendedWorkflowTemplate, FAILURE_CAUSES, FAILURE_CAUSE_COPY, FAILURE_KINDS, FailureCause, FailureKind, FailureTriage, GRID_SIZE, GridBounds, GridCellState, GridConnection, GridConnectionInput, GridConnectionOutput, GridEditorState, GridPosition, GridPositionInput, GridPositionOutput, GridSelectionState, GridStep, GridStepInput, GridStepOutput, GridStepType, GridWorkflowDefinition, GridWorkflowDefinitionInput, GridWorkflowDefinitionOutput, GridWorkflowDto, HistoryActionType, HistoryItem, IDENTITY_TRANSFORM, ImportResult, IsCellOccupied, MAX_COLS, MAX_GRID_COLS, MAX_GRID_ROWS, MAX_ROWS, MAX_STEPS, MIN_COLS, MIN_ROWS, MULTI_OUTGOING_STEP_TYPES, OrderedPreviewSteps, Point, PreviewGraph, PreviewStatus, PreviewStep, ProposalOpResult, ResidualFailure, ResolvedValue, RunPath, RunPathStepState, RunStepSample, STEP_TYPE_COLORS, SingleCondition, StepExecutionRecord, StepExecutionResult, StepExecutionStatus, StepMetric, TemplateCategory, TemplateDefinition, TemplateIconKey, TemplateMetadata, TriageOutcome, TriggerSource, VARIABLE_TOKEN_PATTERN, ValidationError, ValidationResult, ValidationWarning, VariableRefIssue, VariableTreeGroup, VariableTreeItem, ViewportTransform, WorkflowExecutionContext, WorkflowExecutionOptions, WorkflowExecutionResult, WorkflowPreflightIssue, WorkflowProposalOp, WorkflowProposalSession, WorkflowSetupProblem, WorkflowStepMetrics, WorkflowTemplate, aggregateStepMetrics, branchTypeSchema, buildVariableTree, buildWorkflowBrief, cellToViewportRect, collectUnresolvedVariables, computePreviewGraph, contentToViewport, createThrottledEmitter, createWorkflowProposalSession, cycleStepConnection, defineTemplate, deriveGridBounds, deriveRunPath, evaluateCondition, evaluateConditionGroup, evaluateConditionWithDetails, exportTemplate, exportTemplateSchema, extractBranchInfo, extractVariablePaths, findBrokenStepRefs, findFailedStep, findFreeAdjacentCell, findFreeCommonNeighbor, findNearestFreeCell, findRunBlockers, findStepInDirection, findUnsupportedConditionExpression, findWorkflowSetupProblems, flattenFields, formatDurationMs, formatShare, getAdjacentPosition, getBranchLabel, getCellCenter, getCellEdge, getCellOrigin, getConnectionDirection, getConnectionFarEnd, getContentSize, getStepSummary, getStepsRect, getUpstreamSteps, getWorkflowPreflight, gridConnectionSchema, gridPositionSchema, gridStepSchema, gridStepTypeSchema, gridWorkflowDefinitionSchema, hasCycle, hasVariables, importTemplate, indexToPosition, isAiTextStreamData, isSamePosition, isValidPosition, isWithinBounds, isWithinHardCap, listStepConnections, maskPiiDeep, maskPiiString, mergeBounds, missingRequiredFields, normalizeConditionConfig, orderStepsByFlow, orderStepsForPreview, parseChoiceList, parseGridWorkflowDefinition, parseGridWorkflowDefinitionStrict, positionToIndex, resolveBranchPath, resolveCatalogNode, resolveConnectionFocus, resolveObjectVariables, resolvePromptVariables, resolveValueReference, resolveVariableValue, resolveVariables, roundedPath, routeConnection, routeLabelFallbackPoint, routeLabelPoint, selectAppliedGraph, serializeTemplate, triageFailedStep, validateBranchConnections, validateConditionConfig, validateConnection, validateStepConfig, validateWorkflowDefinition, viewportPointToCell, viewportToContent, visibleConfigFields };
|
|
5
|
+
export { AI_TEXT_STREAM_NAMESPACE, AiTextStreamData, BRANCH_TYPE_COLORS, BranchType, CELL_GAP, CELL_HEIGHT, CELL_PITCH_X, CELL_PITCH_Y, CELL_WIDTH, ConditionConfig, ConditionEvalDetails, ConditionGroup, ConditionResult, ConditionType, ConnectionDirection, ConnectionFocus, ConnectionModeState, ConnectionRunStatus, ContentRect, EMPTY_GRID_WORKFLOW_DEFINITION, ExecutionEvent, ExecutionEventType, ExecutionGraphNode, ExecutionPath, ExportTemplateInput, ExportTemplateOutput, ExtendedWorkflowTemplate, FAILURE_CAUSES, FAILURE_CAUSE_COPY, FAILURE_KINDS, FailureCause, FailureKind, FailureTriage, GRID_SIZE, GridBounds, GridCellState, GridConnection, GridConnectionInput, GridConnectionOutput, GridEditorState, GridPosition, GridPositionInput, GridPositionOutput, GridSelectionState, GridStep, GridStepInput, GridStepOutput, GridStepType, GridWorkflowDefinition, GridWorkflowDefinitionInput, GridWorkflowDefinitionOutput, GridWorkflowDto, HistoryActionType, HistoryItem, IDENTITY_TRANSFORM, ImportResult, IsCellOccupied, MAX_COLS, MAX_GRID_COLS, MAX_GRID_ROWS, MAX_ROWS, MAX_STEPS, MIN_COLS, MIN_ROWS, MULTI_OUTGOING_STEP_TYPES, OrderedPreviewSteps, Point, PreviewGraph, PreviewStatus, PreviewStep, ProposalOpResult, ResidualFailure, ResolvedValue, RunPath, RunPathStepState, RunStepSample, STEP_TYPE_COLORS, SingleCondition, StepExecutionRecord, StepExecutionResult, StepExecutionStatus, StepMetric, TemplateCategory, TemplateDefinition, TemplateIconKey, TemplateMetadata, TriageOutcome, TriggerSource, VARIABLE_TOKEN_PATTERN, ValidationError, ValidationResult, ValidationWarning, VariableRefIssue, VariableTreeGroup, VariableTreeItem, ViewportTransform, WorkflowExecutionContext, WorkflowExecutionOptions, WorkflowExecutionResult, WorkflowPreflightIssue, WorkflowProposalOp, WorkflowProposalSession, WorkflowSetupProblem, WorkflowStepMetrics, WorkflowTemplate, aggregateStepMetrics, branchTypeSchema, buildVariableTree, buildWorkflowBrief, cellToViewportRect, collectUnresolvedVariables, computePreviewGraph, contentToViewport, createThrottledEmitter, createWorkflowProposalSession, cycleStepConnection, defineTemplate, deriveGridBounds, deriveRunPath, evaluateCondition, evaluateConditionGroup, evaluateConditionWithDetails, exportTemplate, exportTemplateSchema, extractBranchInfo, extractVariablePaths, findBrokenStepRefs, findFailedStep, findFreeAdjacentCell, findFreeCommonNeighbor, findNearestFreeCell, findRunBlockers, findStepInDirection, findUnsupportedConditionExpression, findWorkflowSetupProblems, flattenFields, formatDurationMs, formatShare, getAdjacentPosition, getBranchLabel, getCellCenter, getCellEdge, getCellOrigin, getConnectionDirection, getConnectionFarEnd, getContentSize, getStepSummary, getStepsRect, getUpstreamSteps, getWorkflowPreflight, gridConnectionSchema, gridPositionSchema, gridStepSchema, gridStepTypeSchema, gridWorkflowDefinitionSchema, hasCycle, hasVariables, importTemplate, indexToPosition, isAiTextStreamData, isSamePosition, isValidPosition, isWithinBounds, isWithinHardCap, listStepConnections, maskPiiDeep, maskPiiString, mergeBounds, missingRequiredFields, normalizeConditionConfig, orderStepsByFlow, orderStepsForPreview, parseChoiceList, parseGridWorkflowDefinition, parseGridWorkflowDefinitionStrict, planAutoConnection, positionToIndex, resolveBranchPath, resolveCatalogNode, resolveConnectionFocus, resolveObjectVariables, resolvePromptVariables, resolveValueReference, resolveVariableValue, resolveVariables, roundedPath, routeConnection, routeLabelFallbackPoint, routeLabelPoint, selectAppliedGraph, serializeTemplate, triageFailedStep, validateBranchConnections, validateConditionConfig, validateConnection, validateStepConfig, validateWorkflowDefinition, viewportPointToCell, viewportToContent, visibleConfigFields };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as getConnectionDirection, C as MAX_GRID_COLS, D as STEP_TYPE_COLORS, E as PreviewStatus, F as positionToIndex, M as indexToPosition, N as isSamePosition, O as WorkflowTemplate, P as isValidPosition, S as HistoryItem, T as MAX_STEPS, _ as GridStep, a as CELL_PITCH_X, b as GridWorkflowDto, c as ConditionType, d as GRID_SIZE, f as GridCellState, g as GridSelectionState, h as GridPosition, i as CELL_HEIGHT, j as hasCycle, k as getAdjacentPosition, l as ConnectionDirection, m as GridEditorState, n as BranchType, o as CELL_PITCH_Y, p as GridConnection, r as CELL_GAP, s as CELL_WIDTH, t as BRANCH_TYPE_COLORS, u as ConnectionModeState, v as GridStepType, w as MAX_GRID_ROWS, x as HistoryActionType, y as GridWorkflowDefinition } from "./grid-workflow-dto-C86EArJP.js";
|
|
2
2
|
import { a as ExecutionPath, c as StepExecutionResult, d as WorkflowExecutionContext, f as WorkflowExecutionOptions, h as FailureKind, i as ExecutionGraphNode, l as StepExecutionStatus, m as FAILURE_KINDS, n as ExecutionEvent, o as ResolvedValue, p as WorkflowExecutionResult, r as ExecutionEventType, s as StepExecutionRecord, t as ConditionEvalDetails, u as TriggerSource } from "./execution-context-YFTRCj0y.js";
|
|
3
|
-
import { $ as selectAppliedGraph, $t as
|
|
3
|
+
import { $ as selectAppliedGraph, $t as parseGridWorkflowDefinition, A as triageFailedStep, At as ContentRect, B as exportTemplate, Bt as getStepsRect, C as FAILURE_CAUSE_COPY, Ct as ConnectionFocus, D as ResidualFailure, Dt as listStepConnections, E as FailureTriage, Et as getConnectionFarEnd, F as parseChoiceList, Ft as contentToViewport, G as ProposalOpResult, Gt as MAX_ROWS, H as serializeTemplate, Ht as viewportToContent, I as ImportResult, It as getCellCenter, J as resolveCatalogNode, Jt as deriveGridBounds, K as WorkflowProposalSession, Kt as MIN_COLS, L as ValidationError, Lt as getCellEdge, M as AiTextStreamData, Mt as Point, N as createThrottledEmitter, Nt as ViewportTransform, O as TriageOutcome, Ot as orderStepsByFlow, P as isAiTextStreamData, Pt as cellToViewportRect, Q as computePreviewGraph, Qt as EMPTY_GRID_WORKFLOW_DEFINITION, R as ValidationResult, Rt as getCellOrigin, S as defineTemplate, St as validateConnection, T as FailureCause, Tt as findStepInDirection, U as validateWorkflowDefinition, Ut as GridBounds, V as importTemplate, Vt as viewportPointToCell, W as buildWorkflowBrief, Wt as MAX_COLS, X as PreviewGraph, Xt as isWithinHardCap, Y as validateStepConfig, Yt as isWithinBounds, Z as WorkflowProposalOp, Zt as mergeBounds, _ as validateConditionConfig, _n as gridWorkflowDefinitionSchema, _t as routeLabelPoint, a as hasVariables, an as GridPositionInput, at as ConnectionRunStatus, b as resolveBranchPath, bn as SingleCondition, bt as findNearestFreeCell, c as resolveValueReference, cn as GridStepOutput, ct as deriveRunPath, d as ConditionResult, dn as branchTypeSchema, dt as PreviewStep, en as parseGridWorkflowDefinitionStrict, et as missingRequiredFields, f as evaluateCondition, fn as exportTemplateSchema, ft as orderStepsForPreview, g as normalizeConditionConfig, gn as gridStepTypeSchema, gt as routeLabelFallbackPoint, h as findUnsupportedConditionExpression, hn as gridStepSchema, ht as routeConnection, i as extractVariablePaths, in as GridConnectionOutput, it as getStepSummary, j as AI_TEXT_STREAM_NAMESPACE, jt as IDENTITY_TRANSFORM, k as findFailedStep, kt as resolveConnectionFocus, l as resolveVariableValue, ln as GridWorkflowDefinitionInput, lt as findRunBlockers, m as evaluateConditionWithDetails, mn as gridPositionSchema, mt as roundedPath, n as maskPiiString, nn as ExportTemplateOutput, nt as WorkflowSetupProblem, o as resolveObjectVariables, on as GridPositionOutput, ot as RunPath, p as evaluateConditionGroup, pn as gridConnectionSchema, pt as IsCellOccupied, q as createWorkflowProposalSession, qt as MIN_ROWS, r as collectUnresolvedVariables, rn as GridConnectionInput, rt as findWorkflowSetupProblems, s as resolvePromptVariables, sn as GridStepInput, st as RunPathStepState, t as maskPiiDeep, tn as ExportTemplateInput, tt as visibleConfigFields, u as resolveVariables, un as GridWorkflowDefinitionOutput, ut as OrderedPreviewSteps, v as extractBranchInfo, vn as ConditionConfig, vt as findFreeAdjacentCell, w as FAILURE_CAUSES, wt as cycleStepConnection, x as validateBranchConnections, xt as planAutoConnection, y as getBranchLabel, yn as ConditionGroup, yt as findFreeCommonNeighbor, z as ValidationWarning, zt as getContentSize } from "./core-9vFdaT2U.js";
|
|
4
4
|
import { S as formatShare, _ as RunStepSample, a as TemplateMetadata, b as aggregateStepMetrics, c as getWorkflowPreflight, d as VariableTreeGroup, f as VariableTreeItem, g as getUpstreamSteps, h as flattenFields, i as TemplateIconKey, l as VARIABLE_TOKEN_PATTERN, m as findBrokenStepRefs, n as TemplateCategory, o as MULTI_OUTGOING_STEP_TYPES, p as buildVariableTree, r as TemplateDefinition, s as WorkflowPreflightIssue, t as ExtendedWorkflowTemplate, u as VariableRefIssue, v as StepMetric, x as formatDurationMs, y as WorkflowStepMetrics } from "./types-DQcmIuAl.js";
|
|
5
|
-
export { AI_TEXT_STREAM_NAMESPACE, AiTextStreamData, BRANCH_TYPE_COLORS, BranchType, CELL_GAP, CELL_HEIGHT, CELL_PITCH_X, CELL_PITCH_Y, CELL_WIDTH, ConditionConfig, ConditionEvalDetails, ConditionGroup, ConditionResult, ConditionType, ConnectionDirection, ConnectionFocus, ConnectionModeState, ConnectionRunStatus, ContentRect, EMPTY_GRID_WORKFLOW_DEFINITION, ExecutionEvent, ExecutionEventType, ExecutionGraphNode, ExecutionPath, ExportTemplateInput, ExportTemplateOutput, ExtendedWorkflowTemplate, FAILURE_CAUSES, FAILURE_CAUSE_COPY, FAILURE_KINDS, FailureCause, FailureKind, FailureTriage, GRID_SIZE, GridBounds, GridCellState, GridConnection, GridConnectionInput, GridConnectionOutput, GridEditorState, GridPosition, GridPositionInput, GridPositionOutput, GridSelectionState, GridStep, GridStepInput, GridStepOutput, GridStepType, GridWorkflowDefinition, GridWorkflowDefinitionInput, GridWorkflowDefinitionOutput, GridWorkflowDto, HistoryActionType, HistoryItem, IDENTITY_TRANSFORM, ImportResult, IsCellOccupied, MAX_COLS, MAX_GRID_COLS, MAX_GRID_ROWS, MAX_ROWS, MAX_STEPS, MIN_COLS, MIN_ROWS, MULTI_OUTGOING_STEP_TYPES, OrderedPreviewSteps, Point, PreviewGraph, PreviewStatus, PreviewStep, ProposalOpResult, ResidualFailure, ResolvedValue, RunPath, RunPathStepState, RunStepSample, STEP_TYPE_COLORS, SingleCondition, StepExecutionRecord, StepExecutionResult, StepExecutionStatus, StepMetric, TemplateCategory, TemplateDefinition, TemplateIconKey, TemplateMetadata, TriageOutcome, TriggerSource, VARIABLE_TOKEN_PATTERN, ValidationError, ValidationResult, ValidationWarning, VariableRefIssue, VariableTreeGroup, VariableTreeItem, ViewportTransform, WorkflowExecutionContext, WorkflowExecutionOptions, WorkflowExecutionResult, WorkflowPreflightIssue, WorkflowProposalOp, WorkflowProposalSession, WorkflowSetupProblem, WorkflowStepMetrics, WorkflowTemplate, aggregateStepMetrics, branchTypeSchema, buildVariableTree, buildWorkflowBrief, cellToViewportRect, collectUnresolvedVariables, computePreviewGraph, contentToViewport, createThrottledEmitter, createWorkflowProposalSession, cycleStepConnection, defineTemplate, deriveGridBounds, deriveRunPath, evaluateCondition, evaluateConditionGroup, evaluateConditionWithDetails, exportTemplate, exportTemplateSchema, extractBranchInfo, extractVariablePaths, findBrokenStepRefs, findFailedStep, findFreeAdjacentCell, findFreeCommonNeighbor, findNearestFreeCell, findRunBlockers, findStepInDirection, findUnsupportedConditionExpression, findWorkflowSetupProblems, flattenFields, formatDurationMs, formatShare, getAdjacentPosition, getBranchLabel, getCellCenter, getCellEdge, getCellOrigin, getConnectionDirection, getConnectionFarEnd, getContentSize, getStepSummary, getStepsRect, getUpstreamSteps, getWorkflowPreflight, gridConnectionSchema, gridPositionSchema, gridStepSchema, gridStepTypeSchema, gridWorkflowDefinitionSchema, hasCycle, hasVariables, importTemplate, indexToPosition, isAiTextStreamData, isSamePosition, isValidPosition, isWithinBounds, isWithinHardCap, listStepConnections, maskPiiDeep, maskPiiString, mergeBounds, missingRequiredFields, normalizeConditionConfig, orderStepsByFlow, orderStepsForPreview, parseChoiceList, parseGridWorkflowDefinition, parseGridWorkflowDefinitionStrict, positionToIndex, resolveBranchPath, resolveCatalogNode, resolveConnectionFocus, resolveObjectVariables, resolvePromptVariables, resolveValueReference, resolveVariableValue, resolveVariables, roundedPath, routeConnection, routeLabelFallbackPoint, routeLabelPoint, selectAppliedGraph, serializeTemplate, triageFailedStep, validateBranchConnections, validateConditionConfig, validateConnection, validateStepConfig, validateWorkflowDefinition, viewportPointToCell, viewportToContent, visibleConfigFields };
|
|
5
|
+
export { AI_TEXT_STREAM_NAMESPACE, AiTextStreamData, BRANCH_TYPE_COLORS, BranchType, CELL_GAP, CELL_HEIGHT, CELL_PITCH_X, CELL_PITCH_Y, CELL_WIDTH, ConditionConfig, ConditionEvalDetails, ConditionGroup, ConditionResult, ConditionType, ConnectionDirection, ConnectionFocus, ConnectionModeState, ConnectionRunStatus, ContentRect, EMPTY_GRID_WORKFLOW_DEFINITION, ExecutionEvent, ExecutionEventType, ExecutionGraphNode, ExecutionPath, ExportTemplateInput, ExportTemplateOutput, ExtendedWorkflowTemplate, FAILURE_CAUSES, FAILURE_CAUSE_COPY, FAILURE_KINDS, FailureCause, FailureKind, FailureTriage, GRID_SIZE, GridBounds, GridCellState, GridConnection, GridConnectionInput, GridConnectionOutput, GridEditorState, GridPosition, GridPositionInput, GridPositionOutput, GridSelectionState, GridStep, GridStepInput, GridStepOutput, GridStepType, GridWorkflowDefinition, GridWorkflowDefinitionInput, GridWorkflowDefinitionOutput, GridWorkflowDto, HistoryActionType, HistoryItem, IDENTITY_TRANSFORM, ImportResult, IsCellOccupied, MAX_COLS, MAX_GRID_COLS, MAX_GRID_ROWS, MAX_ROWS, MAX_STEPS, MIN_COLS, MIN_ROWS, MULTI_OUTGOING_STEP_TYPES, OrderedPreviewSteps, Point, PreviewGraph, PreviewStatus, PreviewStep, ProposalOpResult, ResidualFailure, ResolvedValue, RunPath, RunPathStepState, RunStepSample, STEP_TYPE_COLORS, SingleCondition, StepExecutionRecord, StepExecutionResult, StepExecutionStatus, StepMetric, TemplateCategory, TemplateDefinition, TemplateIconKey, TemplateMetadata, TriageOutcome, TriggerSource, VARIABLE_TOKEN_PATTERN, ValidationError, ValidationResult, ValidationWarning, VariableRefIssue, VariableTreeGroup, VariableTreeItem, ViewportTransform, WorkflowExecutionContext, WorkflowExecutionOptions, WorkflowExecutionResult, WorkflowPreflightIssue, WorkflowProposalOp, WorkflowProposalSession, WorkflowSetupProblem, WorkflowStepMetrics, WorkflowTemplate, aggregateStepMetrics, branchTypeSchema, buildVariableTree, buildWorkflowBrief, cellToViewportRect, collectUnresolvedVariables, computePreviewGraph, contentToViewport, createThrottledEmitter, createWorkflowProposalSession, cycleStepConnection, defineTemplate, deriveGridBounds, deriveRunPath, evaluateCondition, evaluateConditionGroup, evaluateConditionWithDetails, exportTemplate, exportTemplateSchema, extractBranchInfo, extractVariablePaths, findBrokenStepRefs, findFailedStep, findFreeAdjacentCell, findFreeCommonNeighbor, findNearestFreeCell, findRunBlockers, findStepInDirection, findUnsupportedConditionExpression, findWorkflowSetupProblems, flattenFields, formatDurationMs, formatShare, getAdjacentPosition, getBranchLabel, getCellCenter, getCellEdge, getCellOrigin, getConnectionDirection, getConnectionFarEnd, getContentSize, getStepSummary, getStepsRect, getUpstreamSteps, getWorkflowPreflight, gridConnectionSchema, gridPositionSchema, gridStepSchema, gridStepTypeSchema, gridWorkflowDefinitionSchema, hasCycle, hasVariables, importTemplate, indexToPosition, isAiTextStreamData, isSamePosition, isValidPosition, isWithinBounds, isWithinHardCap, listStepConnections, maskPiiDeep, maskPiiString, mergeBounds, missingRequiredFields, normalizeConditionConfig, orderStepsByFlow, orderStepsForPreview, parseChoiceList, parseGridWorkflowDefinition, parseGridWorkflowDefinitionStrict, planAutoConnection, positionToIndex, resolveBranchPath, resolveCatalogNode, resolveConnectionFocus, resolveObjectVariables, resolvePromptVariables, resolveValueReference, resolveVariableValue, resolveVariables, roundedPath, routeConnection, routeLabelFallbackPoint, routeLabelPoint, selectAppliedGraph, serializeTemplate, triageFailedStep, validateBranchConnections, validateConditionConfig, validateConnection, validateStepConfig, validateWorkflowDefinition, viewportPointToCell, viewportToContent, visibleConfigFields };
|
package/dist/core.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { A as MAX_GRID_COLS, B as positionToIndex, C as BRANCH_TYPE_COLORS, D as CELL_PITCH_Y, E as CELL_PITCH_X, F as getConnectionDirection, I as hasCycle, L as indexToPosition, M as MAX_STEPS, N as STEP_TYPE_COLORS, O as CELL_WIDTH, P as getAdjacentPosition, R as isSamePosition, S as mergeBounds, T as CELL_HEIGHT, _ as MIN_COLS, a as EMPTY_GRID_WORKFLOW_DEFINITION, b as isWithinBounds, c as branchTypeSchema, d as gridPositionSchema, f as gridStepSchema, g as MAX_ROWS, h as MAX_COLS, i as parseChoiceList, j as MAX_GRID_ROWS, k as GRID_SIZE, l as exportTemplateSchema, m as gridWorkflowDefinitionSchema, n as createThrottledEmitter, o as parseGridWorkflowDefinition, p as gridStepTypeSchema, r as isAiTextStreamData, s as parseGridWorkflowDefinitionStrict, t as AI_TEXT_STREAM_NAMESPACE, u as gridConnectionSchema, v as MIN_ROWS, w as CELL_GAP, x as isWithinHardCap, y as deriveGridBounds, z as isValidPosition } from "./ai-stream-APc3uCiQ.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as getStepsRect, A as routeConnection, B as cycleStepConnection, C as triageFailedStep, D as flattenFields, E as findBrokenStepRefs, F as visibleConfigFields, G as resolveConnectionFocus, H as getConnectionFarEnd, I as deriveRunPath, J as contentToViewport, K as IDENTITY_TRANSFORM, L as maskPiiDeep, M as routeLabelPoint, N as getStepSummary, O as getUpstreamSteps, P as missingRequiredFields, Q as getContentSize, R as maskPiiString, S as findFailedStep, T as buildVariableTree, U as listStepConnections, V as findStepInDirection, W as orderStepsByFlow, X as getCellEdge, Y as getCellCenter, Z as getCellOrigin, _ as aggregateStepMetrics, a as findNearestFreeCell, b as FAILURE_CAUSE_COPY, c as MULTI_OUTGOING_STEP_TYPES, d as findRunBlockers, et as viewportPointToCell, f as buildWorkflowBrief, g as validateWorkflowDefinition, h as serializeTemplate, i as findFreeCommonNeighbor, j as routeLabelFallbackPoint, k as roundedPath, l as getWorkflowPreflight, m as importTemplate, n as selectAppliedGraph, o as planAutoConnection, p as exportTemplate, q as cellToViewportRect, r as findFreeAdjacentCell, s as validateConnection, t as computePreviewGraph, tt as viewportToContent, u as findWorkflowSetupProblems, v as formatDurationMs, w as VARIABLE_TOKEN_PATTERN, x as FAILURE_CAUSES, y as formatShare, z as orderStepsForPreview } from "./workflow-preview-DP-VqUqM.js";
|
|
3
3
|
import { a as endDefinitions, i as conditionDefinitions, n as stepTypeForNode, r as getStepNodeDefinition } from "./step-type-for-node-Blf5DKrp.js";
|
|
4
4
|
import { t as getNodeDefinition } from "./node-definitions-C-GMfjMm.js";
|
|
5
5
|
import { r as _objectSpread2 } from "./end-node-ids-p85jFEcP.js";
|
|
6
6
|
import { t as defineTemplate } from "./define-template-BvGNB5Tv.js";
|
|
7
|
-
import { _ as resolveVariableValue, a as evaluateCondition, c as findUnsupportedConditionExpression, d as collectUnresolvedVariables, f as extractVariablePaths, g as resolveValueReference, h as resolvePromptVariables, i as validateBranchConnections, l as normalizeConditionConfig, m as resolveObjectVariables, n as getBranchLabel, o as evaluateConditionGroup, p as hasVariables, r as resolveBranchPath, s as evaluateConditionWithDetails, t as extractBranchInfo, u as validateConditionConfig, v as resolveVariables } from "./branch-resolver-
|
|
7
|
+
import { _ as resolveVariableValue, a as evaluateCondition, c as findUnsupportedConditionExpression, d as collectUnresolvedVariables, f as extractVariablePaths, g as resolveValueReference, h as resolvePromptVariables, i as validateBranchConnections, l as normalizeConditionConfig, m as resolveObjectVariables, n as getBranchLabel, o as evaluateConditionGroup, p as hasVariables, r as resolveBranchPath, s as evaluateConditionWithDetails, t as extractBranchInfo, u as validateConditionConfig, v as resolveVariables } from "./branch-resolver-d5DC_s2D.js";
|
|
8
8
|
// src/lib/workflow-proposal-session.ts
|
|
9
9
|
/**
|
|
10
10
|
* AI 제안 세션 — 서버 도구가 op 하나를 받을 때마다 **캔버스 미리보기와 같은 계산**으로
|
|
@@ -181,4 +181,4 @@ const FAILURE_KINDS = [
|
|
|
181
181
|
"missing-handler",
|
|
182
182
|
"unknown"
|
|
183
183
|
];
|
|
184
|
-
export { AI_TEXT_STREAM_NAMESPACE, BRANCH_TYPE_COLORS, CELL_GAP, CELL_HEIGHT, CELL_PITCH_X, CELL_PITCH_Y, CELL_WIDTH, EMPTY_GRID_WORKFLOW_DEFINITION, FAILURE_CAUSES, FAILURE_CAUSE_COPY, FAILURE_KINDS, GRID_SIZE, IDENTITY_TRANSFORM, MAX_COLS, MAX_GRID_COLS, MAX_GRID_ROWS, MAX_ROWS, MAX_STEPS, MIN_COLS, MIN_ROWS, MULTI_OUTGOING_STEP_TYPES, STEP_TYPE_COLORS, VARIABLE_TOKEN_PATTERN, aggregateStepMetrics, branchTypeSchema, buildVariableTree, buildWorkflowBrief, cellToViewportRect, collectUnresolvedVariables, computePreviewGraph, contentToViewport, createThrottledEmitter, createWorkflowProposalSession, cycleStepConnection, defineTemplate, deriveGridBounds, deriveRunPath, evaluateCondition, evaluateConditionGroup, evaluateConditionWithDetails, exportTemplate, exportTemplateSchema, extractBranchInfo, extractVariablePaths, findBrokenStepRefs, findFailedStep, findFreeAdjacentCell, findFreeCommonNeighbor, findNearestFreeCell, findRunBlockers, findStepInDirection, findUnsupportedConditionExpression, findWorkflowSetupProblems, flattenFields, formatDurationMs, formatShare, getAdjacentPosition, getBranchLabel, getCellCenter, getCellEdge, getCellOrigin, getConnectionDirection, getConnectionFarEnd, getContentSize, getStepSummary, getStepsRect, getUpstreamSteps, getWorkflowPreflight, gridConnectionSchema, gridPositionSchema, gridStepSchema, gridStepTypeSchema, gridWorkflowDefinitionSchema, hasCycle, hasVariables, importTemplate, indexToPosition, isAiTextStreamData, isSamePosition, isValidPosition, isWithinBounds, isWithinHardCap, listStepConnections, maskPiiDeep, maskPiiString, mergeBounds, missingRequiredFields, normalizeConditionConfig, orderStepsByFlow, orderStepsForPreview, parseChoiceList, parseGridWorkflowDefinition, parseGridWorkflowDefinitionStrict, positionToIndex, resolveBranchPath, resolveCatalogNode, resolveConnectionFocus, resolveObjectVariables, resolvePromptVariables, resolveValueReference, resolveVariableValue, resolveVariables, roundedPath, routeConnection, routeLabelFallbackPoint, routeLabelPoint, selectAppliedGraph, serializeTemplate, triageFailedStep, validateBranchConnections, validateConditionConfig, validateConnection, validateStepConfig, validateWorkflowDefinition, viewportPointToCell, viewportToContent, visibleConfigFields };
|
|
184
|
+
export { AI_TEXT_STREAM_NAMESPACE, BRANCH_TYPE_COLORS, CELL_GAP, CELL_HEIGHT, CELL_PITCH_X, CELL_PITCH_Y, CELL_WIDTH, EMPTY_GRID_WORKFLOW_DEFINITION, FAILURE_CAUSES, FAILURE_CAUSE_COPY, FAILURE_KINDS, GRID_SIZE, IDENTITY_TRANSFORM, MAX_COLS, MAX_GRID_COLS, MAX_GRID_ROWS, MAX_ROWS, MAX_STEPS, MIN_COLS, MIN_ROWS, MULTI_OUTGOING_STEP_TYPES, STEP_TYPE_COLORS, VARIABLE_TOKEN_PATTERN, aggregateStepMetrics, branchTypeSchema, buildVariableTree, buildWorkflowBrief, cellToViewportRect, collectUnresolvedVariables, computePreviewGraph, contentToViewport, createThrottledEmitter, createWorkflowProposalSession, cycleStepConnection, defineTemplate, deriveGridBounds, deriveRunPath, evaluateCondition, evaluateConditionGroup, evaluateConditionWithDetails, exportTemplate, exportTemplateSchema, extractBranchInfo, extractVariablePaths, findBrokenStepRefs, findFailedStep, findFreeAdjacentCell, findFreeCommonNeighbor, findNearestFreeCell, findRunBlockers, findStepInDirection, findUnsupportedConditionExpression, findWorkflowSetupProblems, flattenFields, formatDurationMs, formatShare, getAdjacentPosition, getBranchLabel, getCellCenter, getCellEdge, getCellOrigin, getConnectionDirection, getConnectionFarEnd, getContentSize, getStepSummary, getStepsRect, getUpstreamSteps, getWorkflowPreflight, gridConnectionSchema, gridPositionSchema, gridStepSchema, gridStepTypeSchema, gridWorkflowDefinitionSchema, hasCycle, hasVariables, importTemplate, indexToPosition, isAiTextStreamData, isSamePosition, isValidPosition, isWithinBounds, isWithinHardCap, listStepConnections, maskPiiDeep, maskPiiString, mergeBounds, missingRequiredFields, normalizeConditionConfig, orderStepsByFlow, orderStepsForPreview, parseChoiceList, parseGridWorkflowDefinition, parseGridWorkflowDefinitionStrict, planAutoConnection, positionToIndex, resolveBranchPath, resolveCatalogNode, resolveConnectionFocus, resolveObjectVariables, resolvePromptVariables, resolveValueReference, resolveVariableValue, resolveVariables, roundedPath, routeConnection, routeLabelFallbackPoint, routeLabelPoint, selectAppliedGraph, serializeTemplate, triageFailedStep, validateBranchConnections, validateConditionConfig, validateConnection, validateStepConfig, validateWorkflowDefinition, viewportPointToCell, viewportToContent, visibleConfigFields };
|
package/dist/index.cjs
CHANGED
|
@@ -21,13 +21,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
value: mod,
|
|
22
22
|
enumerable: true
|
|
23
23
|
}) : target, mod));
|
|
24
|
-
const require_branch_resolver = require("./branch-resolver-
|
|
24
|
+
const require_branch_resolver = require("./branch-resolver-BMbNYMjx.cjs");
|
|
25
25
|
const require_end_node_ids = require("./end-node-ids-D6WBaCLm.cjs");
|
|
26
26
|
const require_node_definitions = require("./node-definitions-pS1Zp1dK.cjs");
|
|
27
27
|
const require_step_type_for_node = require("./step-type-for-node-D9sdHfWA.cjs");
|
|
28
28
|
const require_ai_stream = require("./ai-stream-B_lk9_Rf.cjs");
|
|
29
|
-
const require_workflow_preview = require("./workflow-preview-
|
|
30
|
-
const require_test_executor = require("./test-executor-
|
|
29
|
+
const require_workflow_preview = require("./workflow-preview-BtEThohd.cjs");
|
|
30
|
+
const require_test_executor = require("./test-executor-DkBxQ-2s.cjs");
|
|
31
31
|
let react = require("react");
|
|
32
32
|
react = __toESM(react, 1);
|
|
33
33
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -390,6 +390,9 @@ const EN_MESSAGES = {
|
|
|
390
390
|
"스텝이 삭제되었습니다.": "Step deleted.",
|
|
391
391
|
"스텝이 수정되었습니다.": "Step updated.",
|
|
392
392
|
"스텝이 추가되고 자동으로 연결되었습니다.": "Step added and connected automatically.",
|
|
393
|
+
"스텝이 추가되고 참 분기로 연결되었습니다.": "Step added and connected on the true branch.",
|
|
394
|
+
"스텝이 추가되고 거짓 분기로 연결되었습니다.": "Step added and connected on the false branch.",
|
|
395
|
+
"스텝이 추가되고 기본 분기로 연결되었습니다.": "Step added and connected on the default branch.",
|
|
393
396
|
"스텝이 추가되었습니다.": "Step added.",
|
|
394
397
|
시간: "Hours",
|
|
395
398
|
"시간 단위": "Time unit",
|
|
@@ -9654,19 +9657,17 @@ function useStepMutations({ steps, connections, history, findAdjacentStep, setSe
|
|
|
9654
9657
|
const newStep = require_end_node_ids._objectSpread2(require_end_node_ids._objectSpread2({}, stepData), {}, { id: require_test_executor.createId() });
|
|
9655
9658
|
if (newStep.type !== "trigger") {
|
|
9656
9659
|
const adjacent = findAdjacentStep(newStep.position);
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
})) {
|
|
9661
|
-
const newConnection = {
|
|
9660
|
+
const plan = adjacent ? require_workflow_preview.planAutoConnection(adjacent.step, newStep, connections) : null;
|
|
9661
|
+
if (adjacent && plan) {
|
|
9662
|
+
const newConnection = require_end_node_ids._objectSpread2({
|
|
9662
9663
|
id: require_test_executor.createId(),
|
|
9663
9664
|
fromStepId: adjacent.step.id,
|
|
9664
9665
|
toStepId: newStep.id,
|
|
9665
9666
|
fromPosition: adjacent.step.position,
|
|
9666
9667
|
toPosition: newStep.position
|
|
9667
|
-
};
|
|
9668
|
+
}, plan.branchType ? { branchType: plan.branchType } : {});
|
|
9668
9669
|
addStep(newStep, newConnection);
|
|
9669
|
-
if (!silent) toast.success(t("스텝이 추가되고 자동으로 연결되었습니다."));
|
|
9670
|
+
if (!silent) toast.success(plan.branchType === "true" ? t("스텝이 추가되고 참 분기로 연결되었습니다.") : plan.branchType === "false" ? t("스텝이 추가되고 거짓 분기로 연결되었습니다.") : plan.branchType === "default" ? t("스텝이 추가되고 기본 분기로 연결되었습니다.") : t("스텝이 추가되고 자동으로 연결되었습니다."));
|
|
9670
9671
|
return {
|
|
9671
9672
|
steps: [...steps, newStep],
|
|
9672
9673
|
connections: [...connections, newConnection]
|
|
@@ -11529,11 +11530,11 @@ function GridWorkflowEditorInner({ workflowId, bridge, menuExtras, reserveLeadin
|
|
|
11529
11530
|
isOpen: ui.importExportDialog.isOpen,
|
|
11530
11531
|
mode: ui.importExportDialog.mode,
|
|
11531
11532
|
onClose: ui.closeImportExportDialog,
|
|
11532
|
-
currentDefinition: {
|
|
11533
|
+
currentDefinition: require_end_node_ids._objectSpread2({
|
|
11533
11534
|
steps,
|
|
11534
11535
|
connections,
|
|
11535
11536
|
gridSize: Math.max(bounds.rows, bounds.cols)
|
|
11536
|
-
},
|
|
11537
|
+
}, testParams ? { testParams } : {}),
|
|
11537
11538
|
currentName: workflowName,
|
|
11538
11539
|
prepareReturnFocus: focusCanvas,
|
|
11539
11540
|
onImport: (definition, metadata) => {
|
|
@@ -11541,6 +11542,7 @@ function GridWorkflowEditorInner({ workflowId, bridge, menuExtras, reserveLeadin
|
|
|
11541
11542
|
steps: definition.steps,
|
|
11542
11543
|
connections: definition.connections
|
|
11543
11544
|
});
|
|
11545
|
+
setTestParams(definition.testParams);
|
|
11544
11546
|
if (metadata === null || metadata === void 0 ? void 0 : metadata.name) setWorkflowName(metadata.name);
|
|
11545
11547
|
toast.success(t("템플릿을 가져왔습니다."));
|
|
11546
11548
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as WorkflowExtensionContext, c as WorkflowHost, d as WorkflowRunsSource, f as WorkflowNotice, h as WorkflowToast, i as WorkflowEditorExtension, l as WorkflowRunDetail, m as WorkflowNoticeSink, n as RunRequestResult, o as WorkflowFieldRenderer, p as WorkflowNoticeKind, r as RunStartResult, s as WorkflowFieldRendererProps, t as RunEventStream, u as WorkflowRunner } from "./types-C5744w6f.cjs";
|
|
2
2
|
import { J as NodeDefinition, R as NodeContractRegistration, S as HistoryItem, Y as NodeOutputField, _ as GridStep, c as ConditionType, et as NodeIcon, f as GridCellState, h as GridPosition, l as ConnectionDirection, n as BranchType, p as GridConnection, v as GridStepType, y as GridWorkflowDefinition } from "./grid-workflow-dto-C86EArJP.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { Nt as ViewportTransform, Ut as GridBounds, X as PreviewGraph, Z as WorkflowProposalOp, ut as OrderedPreviewSteps } from "./core-CG0cyIEY.cjs";
|
|
4
4
|
import { l as StepExecutionStatus, n as ExecutionEvent, s as StepExecutionRecord } from "./execution-context-DVeybULC.cjs";
|
|
5
5
|
import { s as WorkflowPreflightIssue, t as ExtendedWorkflowTemplate, y as WorkflowStepMetrics } from "./types-Bj0VWFny.cjs";
|
|
6
6
|
import * as React$1 from "react";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as WorkflowExtensionContext, c as WorkflowHost, d as WorkflowRunsSource, f as WorkflowNotice, h as WorkflowToast, i as WorkflowEditorExtension, l as WorkflowRunDetail, m as WorkflowNoticeSink, n as RunRequestResult, o as WorkflowFieldRenderer, p as WorkflowNoticeKind, r as RunStartResult, s as WorkflowFieldRendererProps, t as RunEventStream, u as WorkflowRunner } from "./types-dVHX2CyI.js";
|
|
2
2
|
import { J as NodeDefinition, R as NodeContractRegistration, S as HistoryItem, Y as NodeOutputField, _ as GridStep, c as ConditionType, et as NodeIcon, f as GridCellState, h as GridPosition, l as ConnectionDirection, n as BranchType, p as GridConnection, v as GridStepType, y as GridWorkflowDefinition } from "./grid-workflow-dto-C86EArJP.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Nt as ViewportTransform, Ut as GridBounds, X as PreviewGraph, Z as WorkflowProposalOp, ut as OrderedPreviewSteps } from "./core-9vFdaT2U.js";
|
|
4
4
|
import { l as StepExecutionStatus, n as ExecutionEvent, s as StepExecutionRecord } from "./execution-context-YFTRCj0y.js";
|
|
5
5
|
import { s as WorkflowPreflightIssue, t as ExtendedWorkflowTemplate, y as WorkflowStepMetrics } from "./types-DQcmIuAl.js";
|
|
6
6
|
import * as React$1 from "react";
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { b as lookupFormattedMessage, l as normalizeConditionConfig, y as formatMessage } from "./branch-resolver-
|
|
2
|
+
import { b as lookupFormattedMessage, l as normalizeConditionConfig, y as formatMessage } from "./branch-resolver-d5DC_s2D.js";
|
|
3
3
|
import { i as toPropertyKey, n as _objectWithoutProperties, r as _objectSpread2 } from "./end-node-ids-p85jFEcP.js";
|
|
4
4
|
import { c as registerNodeContracts, l as releaseNodeScope, o as getNodeCatalogVersion, s as listVisibleNodeDefinitions, u as subscribeNodeCatalog } from "./node-definitions-C-GMfjMm.js";
|
|
5
5
|
import { a as endDefinitions, i as conditionDefinitions, l as registerNodeOutputs, r as getStepNodeDefinition, t as NODE_ID_TO_STEP_TYPE } from "./step-type-for-node-Blf5DKrp.js";
|
|
6
|
-
import { C as BRANCH_TYPE_COLORS,
|
|
7
|
-
import { $ as
|
|
8
|
-
import { a as createId, n as analyzeExecutionPaths, r as executeTestMode } from "./test-executor-
|
|
6
|
+
import { C as BRANCH_TYPE_COLORS, N as STEP_TYPE_COLORS, P as getAdjacentPosition, R as isSamePosition, S as mergeBounds, a as EMPTY_GRID_WORKFLOW_DEFINITION, b as isWithinBounds, g as MAX_ROWS, h as MAX_COLS, o as parseGridWorkflowDefinition, r as isAiTextStreamData, y as deriveGridBounds } from "./ai-stream-APc3uCiQ.js";
|
|
7
|
+
import { $ as getStepsRect, A as routeConnection, B as cycleStepConnection, C as triageFailedStep, E as findBrokenStepRefs, F as visibleConfigFields, G as resolveConnectionFocus, H as getConnectionFarEnd, I as deriveRunPath, K as IDENTITY_TRANSFORM, L as maskPiiDeep, M as routeLabelPoint, N as getStepSummary, P as missingRequiredFields, Q as getContentSize, T as buildVariableTree, V as findStepInDirection, W as orderStepsByFlow, Y as getCellCenter, _ as aggregateStepMetrics, a as findNearestFreeCell, b as FAILURE_CAUSE_COPY, c as MULTI_OUTGOING_STEP_TYPES, et as viewportPointToCell, f as buildWorkflowBrief, h as serializeTemplate, j as routeLabelFallbackPoint, k as roundedPath, l as getWorkflowPreflight, m as importTemplate, n as selectAppliedGraph, o as planAutoConnection, q as cellToViewportRect, s as validateConnection, t as computePreviewGraph, v as formatDurationMs, w as VARIABLE_TOKEN_PATTERN, y as formatShare, z as orderStepsForPreview } from "./workflow-preview-DP-VqUqM.js";
|
|
8
|
+
import { a as createId, n as analyzeExecutionPaths, r as executeTestMode } from "./test-executor-hX0VIrtP.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { Component, createContext, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -368,6 +368,9 @@ const EN_MESSAGES = {
|
|
|
368
368
|
"스텝이 삭제되었습니다.": "Step deleted.",
|
|
369
369
|
"스텝이 수정되었습니다.": "Step updated.",
|
|
370
370
|
"스텝이 추가되고 자동으로 연결되었습니다.": "Step added and connected automatically.",
|
|
371
|
+
"스텝이 추가되고 참 분기로 연결되었습니다.": "Step added and connected on the true branch.",
|
|
372
|
+
"스텝이 추가되고 거짓 분기로 연결되었습니다.": "Step added and connected on the false branch.",
|
|
373
|
+
"스텝이 추가되고 기본 분기로 연결되었습니다.": "Step added and connected on the default branch.",
|
|
371
374
|
"스텝이 추가되었습니다.": "Step added.",
|
|
372
375
|
시간: "Hours",
|
|
373
376
|
"시간 단위": "Time unit",
|
|
@@ -9632,19 +9635,17 @@ function useStepMutations({ steps, connections, history, findAdjacentStep, setSe
|
|
|
9632
9635
|
const newStep = _objectSpread2(_objectSpread2({}, stepData), {}, { id: createId() });
|
|
9633
9636
|
if (newStep.type !== "trigger") {
|
|
9634
9637
|
const adjacent = findAdjacentStep(newStep.position);
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
})) {
|
|
9639
|
-
const newConnection = {
|
|
9638
|
+
const plan = adjacent ? planAutoConnection(adjacent.step, newStep, connections) : null;
|
|
9639
|
+
if (adjacent && plan) {
|
|
9640
|
+
const newConnection = _objectSpread2({
|
|
9640
9641
|
id: createId(),
|
|
9641
9642
|
fromStepId: adjacent.step.id,
|
|
9642
9643
|
toStepId: newStep.id,
|
|
9643
9644
|
fromPosition: adjacent.step.position,
|
|
9644
9645
|
toPosition: newStep.position
|
|
9645
|
-
};
|
|
9646
|
+
}, plan.branchType ? { branchType: plan.branchType } : {});
|
|
9646
9647
|
addStep(newStep, newConnection);
|
|
9647
|
-
if (!silent) toast.success(t("스텝이 추가되고 자동으로 연결되었습니다."));
|
|
9648
|
+
if (!silent) toast.success(plan.branchType === "true" ? t("스텝이 추가되고 참 분기로 연결되었습니다.") : plan.branchType === "false" ? t("스텝이 추가되고 거짓 분기로 연결되었습니다.") : plan.branchType === "default" ? t("스텝이 추가되고 기본 분기로 연결되었습니다.") : t("스텝이 추가되고 자동으로 연결되었습니다."));
|
|
9648
9649
|
return {
|
|
9649
9650
|
steps: [...steps, newStep],
|
|
9650
9651
|
connections: [...connections, newConnection]
|
|
@@ -11507,11 +11508,11 @@ function GridWorkflowEditorInner({ workflowId, bridge, menuExtras, reserveLeadin
|
|
|
11507
11508
|
isOpen: ui.importExportDialog.isOpen,
|
|
11508
11509
|
mode: ui.importExportDialog.mode,
|
|
11509
11510
|
onClose: ui.closeImportExportDialog,
|
|
11510
|
-
currentDefinition: {
|
|
11511
|
+
currentDefinition: _objectSpread2({
|
|
11511
11512
|
steps,
|
|
11512
11513
|
connections,
|
|
11513
11514
|
gridSize: Math.max(bounds.rows, bounds.cols)
|
|
11514
|
-
},
|
|
11515
|
+
}, testParams ? { testParams } : {}),
|
|
11515
11516
|
currentName: workflowName,
|
|
11516
11517
|
prepareReturnFocus: focusCanvas,
|
|
11517
11518
|
onImport: (definition, metadata) => {
|
|
@@ -11519,6 +11520,7 @@ function GridWorkflowEditorInner({ workflowId, bridge, menuExtras, reserveLeadin
|
|
|
11519
11520
|
steps: definition.steps,
|
|
11520
11521
|
connections: definition.connections
|
|
11521
11522
|
});
|
|
11523
|
+
setTestParams(definition.testParams);
|
|
11522
11524
|
if (metadata === null || metadata === void 0 ? void 0 : metadata.name) setWorkflowName(metadata.name);
|
|
11523
11525
|
toast.success(t("템플릿을 가져왔습니다."));
|
|
11524
11526
|
}
|
package/dist/mock.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_test_executor = require("./test-executor-
|
|
2
|
+
const require_test_executor = require("./test-executor-DkBxQ-2s.cjs");
|
|
3
3
|
const require_ai_stream = require("./ai-stream-B_lk9_Rf.cjs");
|
|
4
4
|
const require_end_node_ids = require("./end-node-ids-D6WBaCLm.cjs");
|
|
5
5
|
const require_define_template = require("./define-template-Bmn96lF_.cjs");
|
package/dist/mock.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createId, r as executeTestMode } from "./test-executor-
|
|
1
|
+
import { a as createId, r as executeTestMode } from "./test-executor-hX0VIrtP.js";
|
|
2
2
|
import { s as parseGridWorkflowDefinitionStrict, t as AI_TEXT_STREAM_NAMESPACE } from "./ai-stream-APc3uCiQ.js";
|
|
3
3
|
import { r as _objectSpread2 } from "./end-node-ids-p85jFEcP.js";
|
|
4
4
|
import { t as defineTemplate } from "./define-template-BvGNB5Tv.js";
|
package/dist/simulate.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_test_executor = require("./test-executor-
|
|
2
|
+
const require_test_executor = require("./test-executor-DkBxQ-2s.cjs");
|
|
3
3
|
exports.TestExecutor = require_test_executor.TestExecutor;
|
|
4
4
|
exports.analyzeExecutionPaths = require_test_executor.analyzeExecutionPaths;
|
|
5
5
|
exports.executeTestMode = require_test_executor.executeTestMode;
|
package/dist/simulate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as TestExecutor, n as analyzeExecutionPaths, r as executeTestMode, i as validateWorkflow } from "./test-executor-
|
|
1
|
+
export { t as TestExecutor, n as analyzeExecutionPaths, r as executeTestMode, i as validateWorkflow } from "./test-executor-hX0VIrtP.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as evaluateCondition, d as collectUnresolvedVariables, m as resolveObjectVariables, r as resolveBranchPath, u as validateConditionConfig, x as msgf } from "./branch-resolver-
|
|
1
|
+
import { a as evaluateCondition, d as collectUnresolvedVariables, m as resolveObjectVariables, r as resolveBranchPath, u as validateConditionConfig, x as msgf } from "./branch-resolver-d5DC_s2D.js";
|
|
2
2
|
import { r as _objectSpread2 } from "./end-node-ids-p85jFEcP.js";
|
|
3
3
|
// src/lib/id.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_branch_resolver = require("./branch-resolver-
|
|
1
|
+
const require_branch_resolver = require("./branch-resolver-BMbNYMjx.cjs");
|
|
2
2
|
const require_end_node_ids = require("./end-node-ids-D6WBaCLm.cjs");
|
|
3
3
|
const require_node_definitions = require("./node-definitions-pS1Zp1dK.cjs");
|
|
4
4
|
const require_step_type_for_node = require("./step-type-for-node-D9sdHfWA.cjs");
|
|
@@ -1532,6 +1532,31 @@ function validateConnection(from, to, connections) {
|
|
|
1532
1532
|
})) return "순환 연결은 허용되지 않습니다.";
|
|
1533
1533
|
return null;
|
|
1534
1534
|
}
|
|
1535
|
+
/**
|
|
1536
|
+
* 빈 칸에 스텝을 추가할 때의 **자동 연결**을 정한다 — 이을 수 없으면 null(스텝만 추가한다).
|
|
1537
|
+
*
|
|
1538
|
+
* 🔴 예전의 자동 연결은 순환만 보고 이웃 스텝에서 선을 그었다. 그래서
|
|
1539
|
+
* - 조건 스텝 옆에 스텝을 추가하면 **분기 타입 없는 연결**이 생겼다. 타입 있는 형제 분기가
|
|
1540
|
+
* 하나라도 있으면 실행기는 그 연결을 고르지 않는다(fail-closed) — 선은 보이는데 그 길로는
|
|
1541
|
+
* 영영 가지 않았다.
|
|
1542
|
+
* - 종료 스텝에서도, 이미 나가는 연결이 있는 일반 스텝에서도(실행기는 첫 번째만 따라간다)
|
|
1543
|
+
* 아무 말 없이 선이 그어졌다.
|
|
1544
|
+
* 수동 연결(`validateConnection` + 분기 선택 대화상자 + 두 번째 연결 경고)과 같은 규칙을
|
|
1545
|
+
* 대화상자 없이 적용한다: 조건 스텝은 비어 있는 분기를 고르고(참 → 거짓, Switch는 기본),
|
|
1546
|
+
* 고를 분기가 없으면 잇지 않는다.
|
|
1547
|
+
*/
|
|
1548
|
+
function planAutoConnection(from, to, connections) {
|
|
1549
|
+
if (validateConnection(from, to, connections)) return null;
|
|
1550
|
+
if (from.type === "end") return null;
|
|
1551
|
+
const outgoing = connections.filter((c) => c.fromStepId === from.id);
|
|
1552
|
+
if (from.type === "condition") {
|
|
1553
|
+
const used = new Set(outgoing.map((c) => c.branchType));
|
|
1554
|
+
const branchType = (require_branch_resolver.normalizeConditionConfig(from.config).conditionType === "switch" ? ["default"] : ["true", "false"]).find((candidate) => !used.has(candidate));
|
|
1555
|
+
return branchType ? { branchType } : null;
|
|
1556
|
+
}
|
|
1557
|
+
if (from.type !== "parallel" && outgoing.length > 0) return null;
|
|
1558
|
+
return {};
|
|
1559
|
+
}
|
|
1535
1560
|
// src/lib/workflow-preview.ts
|
|
1536
1561
|
/**
|
|
1537
1562
|
* AI 제안 미리보기 — committed 그래프 + 제안 op 목록을 합쳐 "적용하면 이렇게 된다"를
|
|
@@ -1985,6 +2010,12 @@ Object.defineProperty(exports, "orderStepsForPreview", {
|
|
|
1985
2010
|
return orderStepsForPreview;
|
|
1986
2011
|
}
|
|
1987
2012
|
});
|
|
2013
|
+
Object.defineProperty(exports, "planAutoConnection", {
|
|
2014
|
+
enumerable: true,
|
|
2015
|
+
get: function() {
|
|
2016
|
+
return planAutoConnection;
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
1988
2019
|
Object.defineProperty(exports, "resolveConnectionFocus", {
|
|
1989
2020
|
enumerable: true,
|
|
1990
2021
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as validateBranchConnections, l as normalizeConditionConfig, u as validateConditionConfig, x as msgf } from "./branch-resolver-
|
|
1
|
+
import { i as validateBranchConnections, l as normalizeConditionConfig, u as validateConditionConfig, x as msgf } from "./branch-resolver-d5DC_s2D.js";
|
|
2
2
|
import { n as _objectWithoutProperties, r as _objectSpread2 } from "./end-node-ids-p85jFEcP.js";
|
|
3
3
|
import { t as getNodeDefinition } from "./node-definitions-C-GMfjMm.js";
|
|
4
4
|
import { a as endDefinitions, c as TRIGGER_PAYLOADS, i as conditionDefinitions, o as NODE_OUTPUTS, r as getStepNodeDefinition, s as SPECIAL_VARIABLES } from "./step-type-for-node-Blf5DKrp.js";
|
|
@@ -1532,6 +1532,31 @@ function validateConnection(from, to, connections) {
|
|
|
1532
1532
|
})) return "순환 연결은 허용되지 않습니다.";
|
|
1533
1533
|
return null;
|
|
1534
1534
|
}
|
|
1535
|
+
/**
|
|
1536
|
+
* 빈 칸에 스텝을 추가할 때의 **자동 연결**을 정한다 — 이을 수 없으면 null(스텝만 추가한다).
|
|
1537
|
+
*
|
|
1538
|
+
* 🔴 예전의 자동 연결은 순환만 보고 이웃 스텝에서 선을 그었다. 그래서
|
|
1539
|
+
* - 조건 스텝 옆에 스텝을 추가하면 **분기 타입 없는 연결**이 생겼다. 타입 있는 형제 분기가
|
|
1540
|
+
* 하나라도 있으면 실행기는 그 연결을 고르지 않는다(fail-closed) — 선은 보이는데 그 길로는
|
|
1541
|
+
* 영영 가지 않았다.
|
|
1542
|
+
* - 종료 스텝에서도, 이미 나가는 연결이 있는 일반 스텝에서도(실행기는 첫 번째만 따라간다)
|
|
1543
|
+
* 아무 말 없이 선이 그어졌다.
|
|
1544
|
+
* 수동 연결(`validateConnection` + 분기 선택 대화상자 + 두 번째 연결 경고)과 같은 규칙을
|
|
1545
|
+
* 대화상자 없이 적용한다: 조건 스텝은 비어 있는 분기를 고르고(참 → 거짓, Switch는 기본),
|
|
1546
|
+
* 고를 분기가 없으면 잇지 않는다.
|
|
1547
|
+
*/
|
|
1548
|
+
function planAutoConnection(from, to, connections) {
|
|
1549
|
+
if (validateConnection(from, to, connections)) return null;
|
|
1550
|
+
if (from.type === "end") return null;
|
|
1551
|
+
const outgoing = connections.filter((c) => c.fromStepId === from.id);
|
|
1552
|
+
if (from.type === "condition") {
|
|
1553
|
+
const used = new Set(outgoing.map((c) => c.branchType));
|
|
1554
|
+
const branchType = (normalizeConditionConfig(from.config).conditionType === "switch" ? ["default"] : ["true", "false"]).find((candidate) => !used.has(candidate));
|
|
1555
|
+
return branchType ? { branchType } : null;
|
|
1556
|
+
}
|
|
1557
|
+
if (from.type !== "parallel" && outgoing.length > 0) return null;
|
|
1558
|
+
return {};
|
|
1559
|
+
}
|
|
1535
1560
|
// src/lib/workflow-preview.ts
|
|
1536
1561
|
/**
|
|
1537
1562
|
* AI 제안 미리보기 — committed 그래프 + 제안 op 목록을 합쳐 "적용하면 이렇게 된다"를
|
|
@@ -1739,4 +1764,4 @@ function selectAppliedGraph(preview) {
|
|
|
1739
1764
|
connections: preview.previewConnections.filter((c) => preview.statusByConnectionId.get(c.id) !== "deleted")
|
|
1740
1765
|
};
|
|
1741
1766
|
}
|
|
1742
|
-
export {
|
|
1767
|
+
export { getStepsRect as $, routeConnection as A, cycleStepConnection as B, triageFailedStep as C, flattenFields as D, findBrokenStepRefs as E, visibleConfigFields as F, resolveConnectionFocus as G, getConnectionFarEnd as H, deriveRunPath as I, contentToViewport as J, IDENTITY_TRANSFORM as K, maskPiiDeep as L, routeLabelPoint as M, getStepSummary as N, getUpstreamSteps as O, missingRequiredFields as P, getContentSize as Q, maskPiiString as R, findFailedStep as S, buildVariableTree as T, listStepConnections as U, findStepInDirection as V, orderStepsByFlow as W, getCellEdge as X, getCellCenter as Y, getCellOrigin as Z, aggregateStepMetrics as _, findNearestFreeCell as a, FAILURE_CAUSE_COPY as b, MULTI_OUTGOING_STEP_TYPES as c, findRunBlockers as d, viewportPointToCell as et, buildWorkflowBrief as f, validateWorkflowDefinition as g, serializeTemplate as h, findFreeCommonNeighbor as i, routeLabelFallbackPoint as j, roundedPath as k, getWorkflowPreflight as l, importTemplate as m, selectAppliedGraph as n, planAutoConnection as o, exportTemplate as p, cellToViewportRect as q, findFreeAdjacentCell as r, validateConnection as s, computePreviewGraph as t, viewportToContent as tt, findWorkflowSetupProblems as u, formatDurationMs as v, VARIABLE_TOKEN_PATTERN as w, FAILURE_CAUSES as x, formatShare as y, orderStepsForPreview as z };
|
package/package.json
CHANGED