@agentic-surfaces/server 0.1.15 → 0.1.17
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/http.js +15 -10
- package/package.json +2 -2
package/dist/http.js
CHANGED
|
@@ -93,16 +93,21 @@ export function createServer(opts) {
|
|
|
93
93
|
}
|
|
94
94
|
// ── API routes ──────────────────────────────────────────────────────────
|
|
95
95
|
if (pathname === "/api/workflows") {
|
|
96
|
-
json(res, workflows.map((w) =>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
json(res, workflows.map((w) => {
|
|
97
|
+
const triggerType = w.nodes.find((n) => n.type.startsWith("trigger."))?.type ?? null;
|
|
98
|
+
return {
|
|
99
|
+
name: w.name,
|
|
100
|
+
nodeCount: w.nodes.length,
|
|
101
|
+
triggerType,
|
|
102
|
+
// Full graph so the editor can render each workflow without a second fetch.
|
|
103
|
+
nodes: w.nodes,
|
|
104
|
+
edges: w.edges,
|
|
105
|
+
// Runnable from the browser only for ENTRY workflows. A `trigger.command` workflow is a
|
|
106
|
+
// sub-workflow invoked by foreach/run-workflow with a payload — running it standalone
|
|
107
|
+
// gives it no trigger payload (empty keys → bad requests), so it isn't directly runnable.
|
|
108
|
+
runnable: Boolean(onRun) && triggerType !== "trigger.command",
|
|
109
|
+
};
|
|
110
|
+
}));
|
|
106
111
|
return;
|
|
107
112
|
}
|
|
108
113
|
// Trigger a run from the UI. Fire-and-forget: progress streams via /api/events.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-surfaces/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@agentic-surfaces/core": "0.1.
|
|
24
|
+
"@agentic-surfaces/core": "0.1.17"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc -b",
|