@agentic-surfaces/server 0.1.16 → 0.1.18
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,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-CKayDw1h.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BFmyefsd.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
|
@@ -3,6 +3,8 @@ import type { RunObserver } from "@agentic-surfaces/core";
|
|
|
3
3
|
export interface RunEvent {
|
|
4
4
|
type: "run:start" | "node:start" | "node:finish" | "run:finish";
|
|
5
5
|
workflow: string;
|
|
6
|
+
/** Short human label for the content this run is processing (from the trigger payload). */
|
|
7
|
+
label?: string;
|
|
6
8
|
nodeId?: string;
|
|
7
9
|
status?: "success" | "failed";
|
|
8
10
|
meta?: unknown;
|
|
@@ -22,7 +24,7 @@ export declare class StreamingObserver implements RunObserver {
|
|
|
22
24
|
getEvents(): readonly RunEvent[];
|
|
23
25
|
/** Clear the event buffer (useful between test runs). */
|
|
24
26
|
clear(): void;
|
|
25
|
-
onRunStart(workflow: string): void;
|
|
27
|
+
onRunStart(workflow: string, payload?: unknown): void;
|
|
26
28
|
onNodeStart(nodeId: string): void;
|
|
27
29
|
onNodeFinish(nodeId: string, status: "success" | "failed", meta?: unknown): void;
|
|
28
30
|
onRunFinish(workflow: string, status: "success" | "failed"): void;
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A short label for what a run is processing, derived from its trigger payload — so a fan-out
|
|
3
|
+
* sub-run reads as e.g. "intake-idea · PD-109" instead of just the workflow name. Prefers a
|
|
4
|
+
* recognisable id field (Jira key/id), else a small JSON preview.
|
|
5
|
+
*/
|
|
6
|
+
function runLabel(payload) {
|
|
7
|
+
if (payload == null || typeof payload !== "object") {
|
|
8
|
+
return payload == null ? undefined : String(payload).slice(0, 80);
|
|
9
|
+
}
|
|
10
|
+
const p = payload;
|
|
11
|
+
if (typeof p.key === "string")
|
|
12
|
+
return p.key; // Jira issue/JPD key (e.g. PD-109)
|
|
13
|
+
if (typeof p.id === "string" || typeof p.id === "number")
|
|
14
|
+
return String(p.id);
|
|
15
|
+
try {
|
|
16
|
+
const s = JSON.stringify(p);
|
|
17
|
+
return s.length > 80 ? s.slice(0, 80) + "…" : s;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
1
23
|
/** Max characters of a node's output we put on the wire — enough to debug, bounded
|
|
2
24
|
* so a large HTTP response (e.g. a full comment thread) can't bloat the SSE stream. */
|
|
3
25
|
const OUTPUT_PREVIEW_CAP = 16_000;
|
|
@@ -50,8 +72,8 @@ export class StreamingObserver {
|
|
|
50
72
|
this.events = [];
|
|
51
73
|
}
|
|
52
74
|
// ── RunObserver interface ──────────────────────────────────────────────────
|
|
53
|
-
onRunStart(workflow) {
|
|
54
|
-
this.emit({ type: "run:start", workflow, ts: Date.now() });
|
|
75
|
+
onRunStart(workflow, payload) {
|
|
76
|
+
this.emit({ type: "run:start", workflow, label: runLabel(payload), ts: Date.now() });
|
|
55
77
|
}
|
|
56
78
|
onNodeStart(nodeId) {
|
|
57
79
|
// workflow name is unknown at this call-site in the core interface;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-surfaces/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
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.18"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc -b",
|