@agentic-surfaces/server 0.1.14 → 0.1.16

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.
@@ -4,8 +4,8 @@
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-BhX7mWfK.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-D-xfnLrs.css">
7
+ <script type="module" crossorigin src="/assets/index-DM7JIMkr.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index--mzjNaL0.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
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
- name: w.name,
98
- nodeCount: w.nodes.length,
99
- triggerType: w.nodes.find((n) => n.type.startsWith("trigger."))?.type ?? null,
100
- // Full graph so the editor can render each workflow without a second fetch.
101
- nodes: w.nodes,
102
- edges: w.edges,
103
- // Whether the browser may trigger this workflow (a run-trigger is wired).
104
- runnable: Boolean(onRun),
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.14",
3
+ "version": "0.1.16",
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.14"
24
+ "@agentic-surfaces/core": "0.1.16"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "tsc -b",