@netnodeag/kraftwerk 0.7.0 → 0.8.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/dist/cli/init.js
CHANGED
|
@@ -13,7 +13,8 @@ import { initBundle, writeConcept } from "../okf.js";
|
|
|
13
13
|
const DATA_DIR = "kraftwerk-data";
|
|
14
14
|
const configTemplate = (name) => `# kraftwerk project config — also marks the project root for the CLI.
|
|
15
15
|
# All fields optional. Docs: https://github.com/NETNODEAG/kraftwerk
|
|
16
|
-
name: ${JSON.stringify(name)} # display name, shown in the inspector header
|
|
16
|
+
name: ${JSON.stringify(name)} # display name, shown in the inspector header + browser tab
|
|
17
|
+
icon: "⚡" # emoji shown as the inspector favicon
|
|
17
18
|
workflows: ${DATA_DIR}/workflows # where workflows live
|
|
18
19
|
output: ${DATA_DIR}/output # where run artifacts land (git-ignored)
|
|
19
20
|
knowledge: ${DATA_DIR}/knowledge # OKF knowledge bundles
|
package/dist/config.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* All fields are optional — a valid kraftwerk.yml may be empty:
|
|
11
11
|
*
|
|
12
12
|
* name: my-project # display name (inspector header, "environment")
|
|
13
|
+
* icon: "⚡" # emoji shown as inspector favicon
|
|
13
14
|
* workflows: src/workflows # workflows root, relative to the file
|
|
14
15
|
* output: output # run-artifact directory, relative to the file
|
|
15
16
|
* knowledge: knowledge # OKF knowledge-bundle root, relative to the file
|
|
@@ -21,6 +22,8 @@ export declare const CONFIG_FILENAMES: string[];
|
|
|
21
22
|
export interface ProjectConfig {
|
|
22
23
|
/** Display name of the project ("environment"), shown in the inspector header. */
|
|
23
24
|
name?: string;
|
|
25
|
+
/** Emoji used as the inspector favicon (browser-tab icon). */
|
|
26
|
+
icon?: string;
|
|
24
27
|
/** Workflows root relative to the project root. */
|
|
25
28
|
workflows?: string;
|
|
26
29
|
/** Run-artifact directory relative to the project root. Default: output */
|
package/dist/config.js
CHANGED
|
@@ -13,6 +13,7 @@ import { parse } from "yaml";
|
|
|
13
13
|
* All fields are optional — a valid kraftwerk.yml may be empty:
|
|
14
14
|
*
|
|
15
15
|
* name: my-project # display name (inspector header, "environment")
|
|
16
|
+
* icon: "⚡" # emoji shown as inspector favicon
|
|
16
17
|
* workflows: src/workflows # workflows root, relative to the file
|
|
17
18
|
* output: output # run-artifact directory, relative to the file
|
|
18
19
|
* knowledge: knowledge # OKF knowledge-bundle root, relative to the file
|
|
@@ -84,10 +85,10 @@ async function loadConfig(configPath) {
|
|
|
84
85
|
if (raw === null || raw === undefined)
|
|
85
86
|
return {};
|
|
86
87
|
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
87
|
-
throw new Error(`${path.basename(configPath)}: expected a mapping (name, workflows, output, knowledge, agents)`);
|
|
88
|
+
throw new Error(`${path.basename(configPath)}: expected a mapping (name, icon, workflows, output, knowledge, agents)`);
|
|
88
89
|
}
|
|
89
90
|
const config = raw;
|
|
90
|
-
const known = ["name", "workflows", "output", "knowledge", "agents"];
|
|
91
|
+
const known = ["name", "icon", "workflows", "output", "knowledge", "agents"];
|
|
91
92
|
for (const key of Object.keys(config)) {
|
|
92
93
|
if (!known.includes(key)) {
|
|
93
94
|
throw new Error(`${path.basename(configPath)}: unknown key "${key}" (allowed: ${known.join(", ")})`);
|
package/dist/inspector/server.js
CHANGED
|
@@ -76,7 +76,7 @@ async function handleApi(req, res, url) {
|
|
|
76
76
|
if (seg.length === 2 && seg[1] === "meta" && method === "GET") {
|
|
77
77
|
const project = await resolveProject(getProjectRoot()).catch(() => null);
|
|
78
78
|
const projectName = project?.config.name ?? (project ? path.basename(project.root) : "");
|
|
79
|
-
return json(res, { version: await getPkgVersion(), projectName });
|
|
79
|
+
return json(res, { version: await getPkgVersion(), projectName, projectIcon: project?.config.icon ?? "" });
|
|
80
80
|
}
|
|
81
81
|
// GET /api/runs
|
|
82
82
|
if (seg.length === 2 && seg[1] === "runs" && method === "GET") {
|