@agentic-surfaces/server 0.1.7 → 0.1.8

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,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-CsNSnoPS.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-DdFJEpVW.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-tZEgT0Bn.css">
9
9
  </head>
10
10
  <body>
package/dist/http.d.ts CHANGED
@@ -21,6 +21,14 @@ export interface ServerOptions {
21
21
  * (the editor renders read-only).
22
22
  */
23
23
  onRun?: (name: string) => void | Promise<unknown>;
24
+ /** Project-level config surfaced at GET /api/config (so the UI shows effective agent defaults). */
25
+ config?: {
26
+ dryRun?: boolean;
27
+ agent?: {
28
+ model?: string;
29
+ effort?: string;
30
+ };
31
+ };
24
32
  }
25
33
  /** Build an http.Server that serves the workflow-engine API and optional static files. */
26
34
  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 } = opts;
29
+ const { observer, workflows = [], staticDir, onRun, config } = 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();
@@ -133,6 +133,10 @@ export function createServer(opts) {
133
133
  });
134
134
  return;
135
135
  }
136
+ if (pathname === "/api/config") {
137
+ json(res, config ?? {});
138
+ return;
139
+ }
136
140
  if (pathname === "/api/runs") {
137
141
  json(res, [...runs.values()].sort((a, b) => b.startedAt - a.startedAt));
138
142
  return;
package/dist/serve.d.ts CHANGED
@@ -11,6 +11,14 @@ export interface ServeOptions {
11
11
  workflows?: Workflow[];
12
12
  /** Trigger a run by name from the UI (POST /api/run). */
13
13
  onRun?: (name: string) => void | Promise<unknown>;
14
+ /** Project config surfaced at GET /api/config (effective agent defaults, dryRun). */
15
+ config?: {
16
+ dryRun?: boolean;
17
+ agent?: {
18
+ model?: string;
19
+ effort?: string;
20
+ };
21
+ };
14
22
  }
15
23
  /**
16
24
  * Locate the built editor assets to serve. Checks, in order:
package/dist/serve.js CHANGED
@@ -34,6 +34,7 @@ export function serve(opts = {}) {
34
34
  observer, port, host, staticDir,
35
35
  workflows: opts.workflows,
36
36
  onRun: opts.onRun,
37
+ config: opts.config,
37
38
  });
38
39
  server.listen(port, host, () => {
39
40
  console.log(`[flow-server] listening on http://${host}:${port}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-surfaces/server",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
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.7"
24
+ "@agentic-surfaces/core": "0.1.8"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "tsc -b",