@agentic-surfaces/server 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/editor/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>agentic-surfaces — workflow editor</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-DeFJLzQ_.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-D-uLRZZ-.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/dist/http.js
CHANGED
|
@@ -131,6 +131,24 @@ export function createServer(opts) {
|
|
|
131
131
|
}
|
|
132
132
|
// ── API routes ──────────────────────────────────────────────────────────
|
|
133
133
|
if (pathname === "/api/workflows") {
|
|
134
|
+
// Sub-flow detection: scan ALL workflows' `task.foreach` nodes for the sub-workflow they
|
|
135
|
+
// fan out into (`config.workflow`), and record which parent(s) invoke each one. A workflow
|
|
136
|
+
// with a non-empty `invokedBy` is a "sub-flow" — it only runs per-item from a parent and
|
|
137
|
+
// needs that parent's payload, so the dashboard renders it nested + non-runnable.
|
|
138
|
+
const invokedBy = new Map();
|
|
139
|
+
for (const w of workflows) {
|
|
140
|
+
for (const n of w.nodes) {
|
|
141
|
+
if (n.type !== "task.foreach")
|
|
142
|
+
continue;
|
|
143
|
+
const target = n.config.workflow;
|
|
144
|
+
if (typeof target !== "string" || target.trim() === "")
|
|
145
|
+
continue;
|
|
146
|
+
const parents = invokedBy.get(target) ?? [];
|
|
147
|
+
if (!parents.includes(w.name))
|
|
148
|
+
parents.push(w.name);
|
|
149
|
+
invokedBy.set(target, parents);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
134
152
|
json(res, workflows.map((w) => {
|
|
135
153
|
const triggerType = w.nodes.find((n) => n.type.startsWith("trigger."))?.type ?? null;
|
|
136
154
|
return {
|
|
@@ -147,6 +165,8 @@ export function createServer(opts) {
|
|
|
147
165
|
// needs a payload (the editor prompts for one); entry workflows run with no payload.
|
|
148
166
|
runnable: Boolean(onRun),
|
|
149
167
|
needsPayload: triggerType === "trigger.command",
|
|
168
|
+
// Names of workflows whose `task.foreach` fans out into this one (empty = entry/top-level).
|
|
169
|
+
invokedBy: invokedBy.get(w.name) ?? [],
|
|
150
170
|
};
|
|
151
171
|
}));
|
|
152
172
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-surfaces/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agentic-surfaces/core": "0.1.
|
|
25
|
+
"@agentic-surfaces/core": "0.1.31"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|