@atom-workflow-agent/workflow-ui 0.1.0
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/LICENSE +201 -0
- package/README.md +51 -0
- package/README.zh-CN.md +51 -0
- package/dist/client/assets/index-Cd_L3xuw.css +1 -0
- package/dist/client/assets/index-CwXq-gUK.js +38 -0
- package/dist/client/index.html +14 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/server/workflow-inspector-server.d.ts +27 -0
- package/dist/server/server/workflow-inspector-server.d.ts.map +1 -0
- package/dist/server/server/workflow-inspector-server.js +183 -0
- package/dist/server/server/workflow-inspector-server.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="color-scheme" content="dark" />
|
|
7
|
+
<title>Atom Workflow Inspector</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CwXq-gUK.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Cd_L3xuw.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ArtifactRecord, type WorkflowGraphView } from "@atom-workflow-agent/contracts";
|
|
2
|
+
export interface WorkflowInspectorEventCursor {
|
|
3
|
+
readonly sequence: number;
|
|
4
|
+
}
|
|
5
|
+
export interface WorkflowInspectorDataSource {
|
|
6
|
+
getGraph(runId: string): Promise<WorkflowGraphView>;
|
|
7
|
+
getArtifact(runId: string, artifactId: string): Promise<ArtifactRecord | undefined>;
|
|
8
|
+
getPersistedEvents(runId: string, after: number): Promise<readonly WorkflowInspectorEventCursor[]>;
|
|
9
|
+
}
|
|
10
|
+
export interface WorkflowInspectorServerOptions {
|
|
11
|
+
readonly runId: string;
|
|
12
|
+
readonly dataSource: WorkflowInspectorDataSource;
|
|
13
|
+
readonly host?: string;
|
|
14
|
+
readonly port?: number;
|
|
15
|
+
readonly pollIntervalMs?: number;
|
|
16
|
+
readonly maxInlineArtifactBytes?: number;
|
|
17
|
+
readonly signal?: AbortSignal;
|
|
18
|
+
}
|
|
19
|
+
export interface WorkflowInspectorServerHandle {
|
|
20
|
+
readonly host: string;
|
|
21
|
+
readonly port: number;
|
|
22
|
+
readonly url: string;
|
|
23
|
+
readonly closed: Promise<void>;
|
|
24
|
+
close(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export declare function startWorkflowInspectorServer(options: WorkflowInspectorServerOptions): Promise<WorkflowInspectorServerHandle>;
|
|
27
|
+
//# sourceMappingURL=workflow-inspector-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-inspector-server.d.ts","sourceRoot":"","sources":["../../../src/server/workflow-inspector-server.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACpD,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;IACpF,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,4BAA4B,EAAE,CAAC,CAAC;CACpG;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;IACjD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AA2CD,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAmHlI"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { createServer } from "node:http";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { extname, resolve, sep } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { ArtifactRecordSchema, WorkflowGraphInvalidationSchema, WorkflowGraphViewSchema, } from "@atom-workflow-agent/contracts";
|
|
6
|
+
const LOOPBACK = new Set(["127.0.0.1", "::1", "localhost"]);
|
|
7
|
+
const MIME = {
|
|
8
|
+
".css": "text/css; charset=utf-8",
|
|
9
|
+
".html": "text/html; charset=utf-8",
|
|
10
|
+
".js": "text/javascript; charset=utf-8",
|
|
11
|
+
".json": "application/json; charset=utf-8",
|
|
12
|
+
".svg": "image/svg+xml",
|
|
13
|
+
};
|
|
14
|
+
function sendJson(response, status, value) {
|
|
15
|
+
response.writeHead(status, { "content-type": "application/json; charset=utf-8", "cache-control": "no-store" });
|
|
16
|
+
response.end(JSON.stringify(value));
|
|
17
|
+
}
|
|
18
|
+
function errorCode(error) {
|
|
19
|
+
return typeof error?.code === "string" ? error.code : "INSPECTOR_REQUEST_FAILED";
|
|
20
|
+
}
|
|
21
|
+
function decodePathPart(value) {
|
|
22
|
+
try {
|
|
23
|
+
return decodeURIComponent(value);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
throw Object.assign(new Error("Request path contains invalid percent encoding"), {
|
|
27
|
+
code: "INSPECTOR_PATH_INVALID",
|
|
28
|
+
cause: error,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function errorStatus(error) {
|
|
33
|
+
const code = errorCode(error);
|
|
34
|
+
if (code === "RUN_NOT_FOUND" || code === "ARTIFACT_NOT_FOUND" || code === "INSPECTOR_ASSET_NOT_FOUND")
|
|
35
|
+
return 404;
|
|
36
|
+
if (code === "ARTIFACT_CONTENT_TOO_LARGE")
|
|
37
|
+
return 413;
|
|
38
|
+
if (code === "INSPECTOR_PATH_INVALID" || code === "INSPECTOR_EVENT_CURSOR_INVALID")
|
|
39
|
+
return 400;
|
|
40
|
+
return 500;
|
|
41
|
+
}
|
|
42
|
+
async function closeServer(server) {
|
|
43
|
+
if (!server.listening)
|
|
44
|
+
return;
|
|
45
|
+
await new Promise((resolveClose, rejectClose) => server.close((error) => error ? rejectClose(error) : resolveClose()));
|
|
46
|
+
}
|
|
47
|
+
export async function startWorkflowInspectorServer(options) {
|
|
48
|
+
const host = options.host ?? "127.0.0.1";
|
|
49
|
+
const port = options.port ?? 4317;
|
|
50
|
+
const pollIntervalMs = options.pollIntervalMs ?? 500;
|
|
51
|
+
const maxInlineArtifactBytes = options.maxInlineArtifactBytes ?? 2 * 1024 * 1024;
|
|
52
|
+
if (!LOOPBACK.has(host))
|
|
53
|
+
throw Object.assign(new Error("Workflow Inspector may only listen on a loopback address"), { code: "INSPECTOR_HOST_FORBIDDEN" });
|
|
54
|
+
if (!Number.isInteger(port) || port < 0 || port > 65_535)
|
|
55
|
+
throw Object.assign(new Error("Inspector port must be an integer from 0 to 65535"), { code: "INSPECTOR_PORT_INVALID" });
|
|
56
|
+
if (!Number.isInteger(pollIntervalMs) || pollIntervalMs < 100 || pollIntervalMs > 60_000)
|
|
57
|
+
throw Object.assign(new Error("Inspector poll interval must be from 100 to 60000ms"), { code: "INSPECTOR_POLL_INTERVAL_INVALID" });
|
|
58
|
+
if (!Number.isInteger(maxInlineArtifactBytes) || maxInlineArtifactBytes < 1 || maxInlineArtifactBytes > 16 * 1024 * 1024)
|
|
59
|
+
throw Object.assign(new Error("Inspector inline Artifact limit must be from 1 byte to 16 MiB"), { code: "INSPECTOR_ARTIFACT_LIMIT_INVALID" });
|
|
60
|
+
await options.dataSource.getGraph(options.runId);
|
|
61
|
+
const clientRoot = fileURLToPath(new URL("../../client/", import.meta.url));
|
|
62
|
+
const server = createServer(async (request, response) => {
|
|
63
|
+
try {
|
|
64
|
+
if (!request.url)
|
|
65
|
+
return sendJson(response, 400, { error: { code: "INSPECTOR_URL_INVALID", message: "Request URL is missing" } });
|
|
66
|
+
const url = new URL(request.url, `http://${host}`);
|
|
67
|
+
if (request.method !== "GET")
|
|
68
|
+
return sendJson(response, 405, { error: { code: "INSPECTOR_METHOD_NOT_ALLOWED", message: "Inspector is read-only" } });
|
|
69
|
+
if (url.pathname === "/api/health")
|
|
70
|
+
return sendJson(response, 200, { ok: true, runId: options.runId });
|
|
71
|
+
const graphMatch = /^\/api\/runs\/([^/]+)\/graph$/.exec(url.pathname);
|
|
72
|
+
if (graphMatch) {
|
|
73
|
+
const runId = decodePathPart(graphMatch[1]);
|
|
74
|
+
if (runId !== options.runId)
|
|
75
|
+
return sendJson(response, 404, { error: { code: "RUN_NOT_FOUND", message: `Run not served: ${runId}` } });
|
|
76
|
+
return sendJson(response, 200, WorkflowGraphViewSchema.parse(await options.dataSource.getGraph(runId)));
|
|
77
|
+
}
|
|
78
|
+
const artifactMatch = /^\/api\/runs\/([^/]+)\/artifacts\/([^/]+)$/.exec(url.pathname);
|
|
79
|
+
if (artifactMatch) {
|
|
80
|
+
const runId = decodePathPart(artifactMatch[1]);
|
|
81
|
+
const artifactId = decodePathPart(artifactMatch[2]);
|
|
82
|
+
if (runId !== options.runId)
|
|
83
|
+
return sendJson(response, 404, { error: { code: "RUN_NOT_FOUND", message: `Run not served: ${runId}` } });
|
|
84
|
+
const artifact = await options.dataSource.getArtifact(runId, artifactId);
|
|
85
|
+
if (!artifact)
|
|
86
|
+
return sendJson(response, 404, { error: { code: "ARTIFACT_NOT_FOUND", message: `Artifact not found: ${artifactId}` } });
|
|
87
|
+
const parsed = ArtifactRecordSchema.parse(artifact);
|
|
88
|
+
if (parsed.data !== undefined) {
|
|
89
|
+
const byteLength = Buffer.byteLength(JSON.stringify(parsed.data), "utf8");
|
|
90
|
+
if (byteLength > maxInlineArtifactBytes) {
|
|
91
|
+
return sendJson(response, 413, { error: { code: "ARTIFACT_CONTENT_TOO_LARGE", message: `Inline Artifact content is ${byteLength} bytes; Inspector limit is ${maxInlineArtifactBytes} bytes`, details: { byteLength, limit: maxInlineArtifactBytes } } });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return sendJson(response, 200, parsed);
|
|
95
|
+
}
|
|
96
|
+
const streamMatch = /^\/api\/runs\/([^/]+)\/stream$/.exec(url.pathname);
|
|
97
|
+
if (streamMatch) {
|
|
98
|
+
const runId = decodePathPart(streamMatch[1]);
|
|
99
|
+
if (runId !== options.runId)
|
|
100
|
+
return sendJson(response, 404, { error: { code: "RUN_NOT_FOUND", message: `Run not served: ${runId}` } });
|
|
101
|
+
const requestedAfter = url.searchParams.get("after") ?? request.headers["last-event-id"] ?? "-1";
|
|
102
|
+
let after = Number(requestedAfter);
|
|
103
|
+
if (!Number.isInteger(after) || after < -1)
|
|
104
|
+
return sendJson(response, 400, { error: { code: "INSPECTOR_EVENT_CURSOR_INVALID", message: "after must be an integer >= -1" } });
|
|
105
|
+
response.writeHead(200, {
|
|
106
|
+
"content-type": "text/event-stream; charset=utf-8",
|
|
107
|
+
"cache-control": "no-cache, no-transform",
|
|
108
|
+
connection: "keep-alive",
|
|
109
|
+
"x-accel-buffering": "no",
|
|
110
|
+
});
|
|
111
|
+
response.write(": connected\n\n");
|
|
112
|
+
let closed = false;
|
|
113
|
+
let polling = false;
|
|
114
|
+
const poll = async () => {
|
|
115
|
+
if (closed || polling)
|
|
116
|
+
return;
|
|
117
|
+
polling = true;
|
|
118
|
+
try {
|
|
119
|
+
const events = await options.dataSource.getPersistedEvents(runId, after);
|
|
120
|
+
const latest = events.reduce((maximum, event) => Math.max(maximum, event.sequence), after);
|
|
121
|
+
if (latest > after) {
|
|
122
|
+
after = latest;
|
|
123
|
+
const invalidation = WorkflowGraphInvalidationSchema.parse({ schemaVersion: "1.0", runId, lastEventSequence: latest });
|
|
124
|
+
response.write(`id: ${latest}\nevent: graph-invalidated\ndata: ${JSON.stringify(invalidation)}\n\n`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
response.write(`event: inspector-error\ndata: ${JSON.stringify({ code: errorCode(error) })}\n\n`);
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
polling = false;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
await poll();
|
|
135
|
+
const timer = setInterval(() => void poll(), pollIntervalMs);
|
|
136
|
+
const heartbeat = setInterval(() => response.write(": heartbeat\n\n"), 15_000);
|
|
137
|
+
request.once("close", () => { closed = true; clearInterval(timer); clearInterval(heartbeat); });
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const requested = url.pathname === "/" ? "index.html" : decodePathPart(url.pathname.slice(1));
|
|
141
|
+
const asset = resolve(clientRoot, requested);
|
|
142
|
+
if (asset !== clientRoot && !asset.startsWith(`${clientRoot.endsWith(sep) ? clientRoot.slice(0, -1) : clientRoot}${sep}`)) {
|
|
143
|
+
return sendJson(response, 404, { error: { code: "INSPECTOR_ASSET_NOT_FOUND", message: "Asset not found" } });
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
const content = await readFile(asset);
|
|
147
|
+
response.writeHead(200, { "content-type": MIME[extname(asset)] ?? "application/octet-stream", "cache-control": requested === "index.html" ? "no-store" : "public, max-age=31536000, immutable" });
|
|
148
|
+
response.end(content);
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
if (error.code !== "ENOENT")
|
|
152
|
+
throw error;
|
|
153
|
+
const content = await readFile(resolve(clientRoot, "index.html"));
|
|
154
|
+
response.writeHead(200, { "content-type": MIME[".html"], "cache-control": "no-store" });
|
|
155
|
+
response.end(content);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
sendJson(response, errorStatus(error), { error: { code: errorCode(error), message: error instanceof Error ? error.message : String(error) } });
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
let closeResolve;
|
|
163
|
+
const closed = new Promise((resolveClosed) => { closeResolve = resolveClosed; });
|
|
164
|
+
server.once("close", closeResolve);
|
|
165
|
+
try {
|
|
166
|
+
await new Promise((resolveListen, rejectListen) => {
|
|
167
|
+
server.once("error", rejectListen);
|
|
168
|
+
server.listen(port, host, () => { server.off("error", rejectListen); resolveListen(); });
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
throw Object.assign(new Error(`Failed to start Workflow Inspector: ${error instanceof Error ? error.message : String(error)}`), { code: "INSPECTOR_LISTEN_FAILED", cause: error });
|
|
173
|
+
}
|
|
174
|
+
const address = server.address();
|
|
175
|
+
const actualPort = typeof address === "object" && address ? address.port : port;
|
|
176
|
+
const close = () => closeServer(server);
|
|
177
|
+
if (options.signal?.aborted)
|
|
178
|
+
await close();
|
|
179
|
+
else
|
|
180
|
+
options.signal?.addEventListener("abort", () => void close(), { once: true });
|
|
181
|
+
return { host, port: actualPort, url: `http://${host.includes(":") ? `[${host}]` : host}:${actualPort}/?runId=${encodeURIComponent(options.runId)}`, closed, close };
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=workflow-inspector-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-inspector-server.js","sourceRoot":"","sources":["../../../src/server/workflow-inspector-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoC,MAAM,WAAW,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,uBAAuB,GAGxB,MAAM,gCAAgC,CAAC;AA8BxC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;AAC5D,MAAM,IAAI,GAAqC;IAC7C,MAAM,EAAE,yBAAyB;IACjC,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,gCAAgC;IACvC,OAAO,EAAE,iCAAiC;IAC1C,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,SAAS,QAAQ,CAAC,QAAwB,EAAE,MAAc,EAAE,KAAc;IACxE,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE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,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,UAAU,WAAW,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACvK,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atom-workflow-agent/workflow-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Read-only local inspector for workflow definitions and runs.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/joekbits/atom-workflow-agent.git",
|
|
9
|
+
"directory": "apps/workflow-ui"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/joekbits/atom-workflow-agent/tree/main/apps/workflow-ui#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/joekbits/atom-workflow-agent/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"atom",
|
|
17
|
+
"workflow",
|
|
18
|
+
"inspector",
|
|
19
|
+
"visualization"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md",
|
|
25
|
+
"README.zh-CN.md"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/server/index.d.ts",
|
|
30
|
+
"default": "./dist/server/index.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public",
|
|
35
|
+
"provenance": true
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=22"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@xyflow/react": "^12.0.0",
|
|
42
|
+
"elkjs": "^0.11.0",
|
|
43
|
+
"react": "^19.0.0",
|
|
44
|
+
"react-dom": "^19.0.0",
|
|
45
|
+
"@atom-workflow-agent/contracts": "0.1.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/react": "^19.0.0",
|
|
49
|
+
"@types/react-dom": "^19.0.0",
|
|
50
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
51
|
+
"vite": "^7.0.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsc -p tsconfig.server.json && tsc -p tsconfig.client.json --noEmit && vite build",
|
|
55
|
+
"typecheck": "tsc -p tsconfig.server.json --noEmit && tsc -p tsconfig.client.json --noEmit",
|
|
56
|
+
"test": "vitest run --config vitest.config.ts"
|
|
57
|
+
}
|
|
58
|
+
}
|