@fieldwangai/agentflow 0.1.95 → 0.1.96
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/bin/lib/ui-server.mjs +20 -9
- package/builtin/web-ui/dist/assets/index-9buaezau.js +346 -0
- package/builtin/web-ui/dist/assets/index-DKaacU6h.css +1 -0
- package/builtin/web-ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/builtin/web-ui/dist/assets/index-DV-QkHHi.css +0 -1
- package/builtin/web-ui/dist/assets/index-b0Rwi6Tw.js +0 -346
package/bin/lib/ui-server.mjs
CHANGED
|
@@ -4347,13 +4347,17 @@ function workspaceCachedOutputValueExists(value, scopedRoot = "") {
|
|
|
4347
4347
|
}
|
|
4348
4348
|
|
|
4349
4349
|
function workspaceUpstreamText(graph, nodeId, outputs, scopedRoot = "") {
|
|
4350
|
+
const contentEdge = workspaceContentInputEdge(graph, nodeId);
|
|
4351
|
+
if (!contentEdge) return "";
|
|
4352
|
+
return workspaceOutputSlotValueForEdge(graph, outputs, contentEdge, scopedRoot);
|
|
4353
|
+
}
|
|
4354
|
+
|
|
4355
|
+
function workspaceContentInputEdge(graph, nodeId) {
|
|
4350
4356
|
const edges = Array.isArray(graph?.edges) ? graph.edges : [];
|
|
4351
4357
|
const incoming = edges
|
|
4352
4358
|
.filter((edge) => String(edge?.target || "") === String(nodeId))
|
|
4353
4359
|
.filter((edge) => !isWorkspaceSemanticInputSlot(workspaceTargetSlotForEdge(graph, edge)));
|
|
4354
|
-
|
|
4355
|
-
if (!contentEdge) return "";
|
|
4356
|
-
return workspaceOutputSlotValueForEdge(graph, outputs, contentEdge, scopedRoot);
|
|
4360
|
+
return incoming.find((edge) => String(edge?.targetHandle || "") === "input-1") || incoming[0] || null;
|
|
4357
4361
|
}
|
|
4358
4362
|
|
|
4359
4363
|
function workspaceHandleIndex(handle, prefix) {
|
|
@@ -6089,6 +6093,11 @@ async function runWorkspaceGraph(root, scopedRoot, payload, userCtx = {}, opts =
|
|
|
6089
6093
|
}
|
|
6090
6094
|
|
|
6091
6095
|
if (workspaceDisplayKind(defId)) {
|
|
6096
|
+
if (!workspaceContentInputEdge(graph, nodeId)) {
|
|
6097
|
+
emit({ type: "status", nodeId, line: "Display unchanged: no content input edge" });
|
|
6098
|
+
emit({ type: "node-done", nodeId, definitionId: defId, unchanged: true });
|
|
6099
|
+
continue;
|
|
6100
|
+
}
|
|
6092
6101
|
const content = workspaceUpstreamText(graph, nodeId, outputs, scopedRoot);
|
|
6093
6102
|
graph.instances[nodeId] = workspaceWriteDisplayContent(instance, content);
|
|
6094
6103
|
const updatedDisplays = publishNodeOutput(nodeId, content);
|
|
@@ -7436,13 +7445,15 @@ function prdWorkflowReviewHtml(title, markdown, meta = {}) {
|
|
|
7436
7445
|
function prdWorkflowCreateReview(scopedRoot, tapdId, payload = {}, urlBase = "") {
|
|
7437
7446
|
const content = String(payload.markdown || payload.content || payload.rawOutput || "").slice(0, 500000);
|
|
7438
7447
|
if (!content.trim()) throw new Error("Missing review markdown");
|
|
7439
|
-
const requestedReviewId = String(payload.reviewId || payload.review_id || "").trim();
|
|
7440
|
-
const reviewId = requestedReviewId
|
|
7441
|
-
? prdWorkflowSafeStateId(requestedReviewId)
|
|
7442
|
-
: `review_${Date.now().toString(36)}_${crypto.randomBytes(4).toString("hex")}`;
|
|
7443
|
-
const paths = prdWorkflowReviewPaths(scopedRoot, tapdId, reviewId);
|
|
7444
7448
|
const title = String(payload.title || payload.label || "PRD Workflow Review").trim().slice(0, 160) || "PRD Workflow Review";
|
|
7445
7449
|
const durability = String(payload.durability || (payload.durable === true || payload.permanent === true ? "durable" : "temporary")).trim().toLowerCase() || "temporary";
|
|
7450
|
+
const requestedReviewId = String(payload.reviewId || payload.review_id || "").trim();
|
|
7451
|
+
const reviewId = durability === "temporary"
|
|
7452
|
+
? `r-${crypto.randomBytes(5).toString("hex")}`
|
|
7453
|
+
: requestedReviewId
|
|
7454
|
+
? prdWorkflowSafeStateId(requestedReviewId)
|
|
7455
|
+
: `review_${Date.now().toString(36)}_${crypto.randomBytes(4).toString("hex")}`;
|
|
7456
|
+
const paths = prdWorkflowReviewPaths(scopedRoot, tapdId, reviewId);
|
|
7446
7457
|
const ttlDaysRaw = Number(payload.ttlDays || payload.ttl_days || (durability === "temporary" ? 7 : 0));
|
|
7447
7458
|
const ttlDays = Number.isFinite(ttlDaysRaw) && ttlDaysRaw > 0 ? ttlDaysRaw : 0;
|
|
7448
7459
|
const createdAt = new Date();
|
|
@@ -10342,7 +10353,7 @@ export function startUiServer({
|
|
|
10342
10353
|
const review = prdWorkflowCreateReview(scopedRoot, tapdId, payload, serverPublicBaseUrl(req, host, uiPort, payload));
|
|
10343
10354
|
const query = new URLSearchParams();
|
|
10344
10355
|
if (flowId) query.set("flowId", flowId);
|
|
10345
|
-
if (flowSource) query.set("flowSource", flowSource);
|
|
10356
|
+
if (flowId && flowSource && flowSource !== "user") query.set("flowSource", flowSource);
|
|
10346
10357
|
if (archived) query.set("archived", "1");
|
|
10347
10358
|
const reviewUrl = query.toString() ? `${review.url}?${query.toString()}` : review.url;
|
|
10348
10359
|
const durability = review.durability || "temporary";
|