@agentic-surfaces/server 0.1.8 → 0.1.9
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/assets/{index-tZEgT0Bn.css → index-BgnkW1wX.css} +1 -1
- package/dist/editor/assets/{index-DdFJEpVW.js → index-CaahXTxn.js} +54 -54
- package/dist/editor/index.html +2 -2
- package/dist/http.d.ts +3 -1
- package/dist/http.js +9 -1
- package/dist/serve.d.ts +3 -1
- package/dist/serve.js +1 -0
- package/package.json +2 -2
package/dist/editor/index.html
CHANGED
|
@@ -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-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CaahXTxn.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BgnkW1wX.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/http.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import http from "node:http";
|
|
2
|
-
import type { Workflow } from "@agentic-surfaces/core";
|
|
2
|
+
import type { Workflow, AgentDefinition } from "@agentic-surfaces/core";
|
|
3
3
|
import type { StreamingObserver } from "./streaming-observer.js";
|
|
4
4
|
/** Minimal run record kept in-memory for the /api/runs endpoint. */
|
|
5
5
|
export interface RunRecord {
|
|
@@ -29,6 +29,8 @@ export interface ServerOptions {
|
|
|
29
29
|
effort?: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
/** File-based agent definitions, surfaced at GET /api/agents (for the node detail view). */
|
|
33
|
+
agents?: AgentDefinition[];
|
|
32
34
|
}
|
|
33
35
|
/** Build an http.Server that serves the workflow-engine API and optional static files. */
|
|
34
36
|
export declare function createServer(opts: ServerOptions): http.Server;
|
package/dist/http.js
CHANGED
|
@@ -26,7 +26,7 @@ function writeEvent(res, event) {
|
|
|
26
26
|
}
|
|
27
27
|
/** Build an http.Server that serves the workflow-engine API and optional static files. */
|
|
28
28
|
export function createServer(opts) {
|
|
29
|
-
const { observer, workflows = [], staticDir, onRun, config } = opts;
|
|
29
|
+
const { observer, workflows = [], staticDir, onRun, config, agents = [] } = opts;
|
|
30
30
|
const workflowByName = new Map(workflows.map((w) => [w.name, w]));
|
|
31
31
|
// In-memory run registry — populated by listening to the observer.
|
|
32
32
|
const runs = new Map();
|
|
@@ -137,6 +137,14 @@ export function createServer(opts) {
|
|
|
137
137
|
json(res, config ?? {});
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
|
+
if (pathname === "/api/agents") {
|
|
141
|
+
// Metadata only — not the full instructions body.
|
|
142
|
+
json(res, agents.map((a) => ({
|
|
143
|
+
name: a.name, model: a.model, effort: a.effort,
|
|
144
|
+
commands: a.commands ?? null, fallback: a.fallback ?? null,
|
|
145
|
+
})));
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
140
148
|
if (pathname === "/api/runs") {
|
|
141
149
|
json(res, [...runs.values()].sort((a, b) => b.startedAt - a.startedAt));
|
|
142
150
|
return;
|
package/dist/serve.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import type { Workflow } from "@agentic-surfaces/core";
|
|
2
|
+
import type { Workflow, AgentDefinition } from "@agentic-surfaces/core";
|
|
3
3
|
import { StreamingObserver } from "./streaming-observer.js";
|
|
4
4
|
export interface ServeOptions {
|
|
5
5
|
port?: number;
|
|
@@ -19,6 +19,8 @@ export interface ServeOptions {
|
|
|
19
19
|
effort?: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
/** Agent definitions surfaced at GET /api/agents. */
|
|
23
|
+
agents?: AgentDefinition[];
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Locate the built editor assets to serve. Checks, in order:
|
package/dist/serve.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-surfaces/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
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.9"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc -b",
|