@ngocsangairvds/vsaf 5.6.2 → 5.7.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/README.md +2 -2
- package/package.json +2 -1
- package/packages/cli/dist/adapters/claude.d.ts.map +1 -1
- package/packages/cli/dist/adapters/claude.js +49 -3
- package/packages/cli/dist/adapters/claude.js.map +1 -1
- package/packages/cli/dist/adapters/codex.d.ts.map +1 -1
- package/packages/cli/dist/adapters/codex.js +54 -6
- package/packages/cli/dist/adapters/codex.js.map +1 -1
- package/packages/cli/dist/server/routes/runs.d.ts +12 -0
- package/packages/cli/dist/server/routes/runs.d.ts.map +1 -1
- package/packages/cli/dist/server/routes/runs.js +53 -8
- package/packages/cli/dist/server/routes/runs.js.map +1 -1
- package/packages/web/dist/web/3rdpartylicenses.txt +0 -26
- package/packages/web/dist/web/browser/{chunk-OBMUVQWL.js → chunk-FFYMNCCZ.js} +1 -1
- package/packages/web/dist/web/browser/{chunk-VJ3UNUDS.js → chunk-IBSRIWBK.js} +1 -1
- package/packages/web/dist/web/browser/{chunk-K4VRVZWF.js → chunk-LPQARKUF.js} +1 -1
- package/packages/web/dist/web/browser/{chunk-FQUOTTEA.js → chunk-NSKD5KW7.js} +1 -1
- package/packages/web/dist/web/browser/chunk-S76O6O57.js +1 -0
- package/packages/web/dist/web/browser/{chunk-4LHJGOIU.js → chunk-TTPORHEG.js} +1 -1
- package/packages/web/dist/web/browser/{chunk-FWLQWWZ3.js → chunk-UN7U5NAR.js} +1 -1
- package/packages/web/dist/web/browser/chunk-VA6YRKIE.js +1 -0
- package/packages/web/dist/web/browser/chunk-WDOCF7IL.js +5 -0
- package/packages/web/dist/web/browser/{chunk-3LPWUDNW.js → chunk-YBYKUHHQ.js} +1 -1
- package/packages/web/dist/web/browser/index.html +2 -2
- package/packages/web/dist/web/browser/{main-7FONYLE6.js → main-7PKVTIG7.js} +1 -1
- package/packages/web/dist/web/browser/styles-MG7ITKTI.css +1 -0
- package/packages/web/dist/web/browser/chunk-UJHVWNPU.js +0 -1
- package/packages/web/dist/web/browser/chunk-UXRT7NQK.js +0 -1
- package/packages/web/dist/web/browser/chunk-W7ZKECPT.js +0 -5
- package/packages/web/dist/web/browser/styles-PWTTI45T.css +0 -1
package/README.md
CHANGED
|
@@ -175,7 +175,7 @@ Starts a Model Context Protocol (MCP) server that exposes VSAF workflows and ski
|
|
|
175
175
|
### `vsaf install`
|
|
176
176
|
|
|
177
177
|
```bash
|
|
178
|
-
vsaf install sdlc # Deploy
|
|
178
|
+
vsaf install sdlc # Deploy skills/workflows to .vsaf/; pick IDEs (claude/cursor/codex/antigravity) to add command proxies
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
### `vsaf skill`
|
|
@@ -789,7 +789,7 @@ Strict dependency direction: **web → (HTTP) → cli → core**. Published as a
|
|
|
789
789
|
| AI adapter | Shell out to `claude` CLI | No SDK dependency, simple to test |
|
|
790
790
|
| Schema validation | AJV | Industry standard JSON Schema |
|
|
791
791
|
| MCP integration | Stdio-based MCP server | Native Claude Code protocol, zero network config |
|
|
792
|
-
| Skill distribution | `vsaf install` → `.
|
|
792
|
+
| Skill distribution | `vsaf install` → `.vsaf/skills` (canonical) + per-IDE command proxies | Skills stay in `.vsaf/`; selected IDEs get thin command/skill proxies (`.claude/commands`, `.agents/skills`, …) that drive runs via the vsaf MCP |
|
|
793
793
|
|
|
794
794
|
### Tech Stack
|
|
795
795
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngocsangairvds/vsaf",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "logging step",
|
|
5
5
|
"main": "packages/core/dist/index.js",
|
|
6
6
|
"types": "packages/core/dist/index.d.ts",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"postinstall": "node scripts/postinstall.js",
|
|
34
34
|
"prepack": "node -e \"require('fs').copyFileSync('package.json','package.json.bak');const f='package.json',j=JSON.parse(require('fs').readFileSync(f));delete j.workspaces;require('fs').writeFileSync(f,JSON.stringify(j,null,2)+'\\n')\"",
|
|
35
35
|
"postpack": "node -e \"require('fs').renameSync('package.json.bak','package.json')\"",
|
|
36
|
+
"pretest": "npm run build -w packages/core",
|
|
36
37
|
"test": "bun test --timeout 60000 tests",
|
|
37
38
|
"test:watch": "bun test --timeout 60000 --watch tests",
|
|
38
39
|
"lint": "tsc --noEmit",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,eAAe,EAAwD,MAAM,cAAc,CAAC;AAI1G,eAAO,MAAM,aAAa,EAAE,eAqE3B,CAAC"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// packages/cli/src/adapters/claude.ts
|
|
3
|
-
// Claude Code adapter. Writes
|
|
4
|
-
//
|
|
3
|
+
// Claude Code adapter. Writes slash-command proxies (.claude/commands/*.md) that
|
|
4
|
+
// drive runs via the vsaf MCP, plus MCP config and a CLAUDE.md instruction marker.
|
|
5
|
+
// Skill CONTENT stays canonical under .vsaf/skills — the commands are thin proxies.
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
5
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
10
|
exports.claudeAdapter = void 0;
|
|
7
11
|
const fs_1 = require("fs");
|
|
8
12
|
const path_1 = require("path");
|
|
13
|
+
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
9
14
|
const adapter_js_1 = require("./adapter.js");
|
|
10
15
|
const install_js_1 = require("../commands/install.js");
|
|
11
16
|
const shared_js_1 = require("./shared.js");
|
|
@@ -20,9 +25,50 @@ exports.claudeAdapter = {
|
|
|
20
25
|
},
|
|
21
26
|
install(ctx) {
|
|
22
27
|
const result = (0, adapter_js_1.emptyResult)('claude');
|
|
28
|
+
const commandsDir = (0, path_1.join)(ctx.projectPath, '.claude', 'commands');
|
|
29
|
+
(0, fs_1.mkdirSync)(commandsDir, { recursive: true });
|
|
30
|
+
// 1a. Workflow proxies → /<wfName> slash commands. Each drives the run through
|
|
31
|
+
// the vsaf MCP engine; node content is always read from canonical .vsaf/.
|
|
32
|
+
for (const [filename, yamlContent] of Object.entries(ctx.packInfo.workflows ?? {})) {
|
|
33
|
+
const wfName = (0, path_1.basename)(filename, '.yaml');
|
|
34
|
+
let desc = `Run the VSAF ${wfName} workflow`;
|
|
35
|
+
try {
|
|
36
|
+
const parsed = js_yaml_1.default.load(yamlContent);
|
|
37
|
+
if (parsed?.description)
|
|
38
|
+
desc = parsed.description.trim().split('\n')[0];
|
|
39
|
+
}
|
|
40
|
+
catch { /* use fallback description */ }
|
|
41
|
+
const body = `---\ndescription: ${desc}\n---\n\n`
|
|
42
|
+
+ `# /${wfName} — VSAF Workflow\n\n`
|
|
43
|
+
+ `Execute the VSAF workflow \`${ctx.packName}/${wfName}\` (definition: \`.vsaf/workflows/${ctx.packName}/${wfName}.yaml\`).\n\n`
|
|
44
|
+
+ `1. Call the \`vsaf\` MCP tool \`vsaf_start\` with \`workflow: "${ctx.packName}/${wfName}"\`, \`args: <user arguments>\`, \`projectPath: <project root>\`.\n`
|
|
45
|
+
+ `2. For each returned AI node, read \`.vsaf/commands/<node.command>.md\` and \`.vsaf/skills/<node.command>/SKILL.md\` (single source of truth) and execute the node.\n`
|
|
46
|
+
+ `3. Report results with \`vsaf_next\` and repeat until \`done: true\`. Check progress with \`vsaf_status\`; continue interrupted runs with \`vsaf_resume\`.\n`;
|
|
47
|
+
const target = (0, path_1.join)(commandsDir, `${wfName}.md`);
|
|
48
|
+
if (!(0, fs_1.existsSync)(target) || ctx.options.force)
|
|
49
|
+
(0, fs_1.writeFileSync)(target, body, 'utf-8');
|
|
50
|
+
result.commands.push(wfName);
|
|
51
|
+
}
|
|
52
|
+
// 1b. Top-level skill proxies → /<pack>-<skill> (e.g. /sdlc-onboard-docs).
|
|
53
|
+
// Step-level skills (a/b/c, contain "/") and bundled helpers stay engine-internal:
|
|
54
|
+
// the agent reaches them through workflow nodes, never as IDE entry points.
|
|
55
|
+
for (const skill of ctx.packInfo.skillNames.filter(s => !shared_js_1.SKIP_SKILLS.includes(s) && !/[\\/]/.test(s))) {
|
|
56
|
+
const name = `${ctx.packName}-${skill}`;
|
|
57
|
+
const body = `---\ndescription: Run VSAF skill ${name}\n---\n\n`
|
|
58
|
+
+ `# /${name}\n\n`
|
|
59
|
+
+ `Read \`.vsaf/commands/${name}.md\` if it exists, then \`.vsaf/skills/${name}/SKILL.md\` and any referenced files before acting. `
|
|
60
|
+
+ `Treat \`.vsaf/skills/${name}\` as the single source of truth; do not copy it into \`.claude/skills/\`.\n`;
|
|
61
|
+
const target = (0, path_1.join)(commandsDir, `${name}.md`);
|
|
62
|
+
if (!(0, fs_1.existsSync)(target) || ctx.options.force)
|
|
63
|
+
(0, fs_1.writeFileSync)(target, body, 'utf-8');
|
|
64
|
+
result.commands.push(name);
|
|
65
|
+
}
|
|
66
|
+
// 2. MCP (project-level .mcp.json).
|
|
23
67
|
(0, install_js_1.ensureMcpConfig)(ctx.projectPath);
|
|
24
68
|
result.mcp = { path: (0, path_1.join)(ctx.projectPath, '.mcp.json'), servers: ['vsaf', 'gitnexus'] };
|
|
25
|
-
|
|
69
|
+
// 3. Instruction marker block in CLAUDE.md.
|
|
70
|
+
(0, shared_js_1.writeMarkerFile)((0, path_1.join)(ctx.projectPath, 'CLAUDE.md'), `pack=${ctx.packName} ide=claude`, `## VSAF \`${ctx.packName}\` (Claude)\n\nSlash commands in \`.claude/commands/\` (e.g. \`/${ctx.packName}-onboard-docs\`, workflow \`/master-sdlc-headless\`) proxy to the canonical \`.vsaf/\` flows and drive runs via the \`vsaf\` MCP tools (vsaf_start/vsaf_next/vsaf_status/vsaf_resume). Canonical skills live in \`.vsaf/skills/\`; do not copy them into \`.claude/skills/\`. When executing a node, read \`.vsaf/commands/<name>.md\` then \`.vsaf/skills/<name>/SKILL.md\`.\n\nArtifact boundary: generated knowledge/docs/artifacts stay at project root beside \`.vsaf\` or inside root \`.vsaf/\`; never auto-write them inside service/subproject folders unless explicitly authorized.`);
|
|
71
|
+
// 4. Binaries.
|
|
26
72
|
if (!ctx.options._skipGraphify && !(0, shared_js_1.installGraphifyPlatform)('claude')) {
|
|
27
73
|
result.warnings.push('graphify claude install failed — run: graphify install');
|
|
28
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/adapters/claude.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,iFAAiF;AACjF,mFAAmF;AACnF,oFAAoF;;;;;;AAEpF,2BAA0D;AAC1D,+BAAsC;AACtC,sDAA2B;AAC3B,6CAA0G;AAC1G,uDAAyD;AACzD,2CAAoF;AAEvE,QAAA,aAAa,GAAoB;IAC5C,EAAE,EAAE,QAAQ;IACZ,gBAAgB,EAAE,QAAQ;IAE1B,MAAM,CAAC,WAAmB;QACxB,OAAO,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,gBAAgB,CAAC,IAAY;QAC3B,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,CAAC;IAED,OAAO,CAAC,GAAmB;QACzB,MAAM,MAAM,GAAG,IAAA,wBAAW,EAAC,QAAQ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W,CAAC,EAClC,QAAQ,GAAG,CAAC,QAAQ,aAAa,EACjC,aAAa,GAAG,CAAC,QAAQ,mEAAmE,GAAG,CAAC,QAAQ,+jBAA+jB,CACxqB,CAAC;QAEF,eAAe;QACf,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,IAAI,CAAC,IAAA,mCAAuB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACrE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/adapters/codex.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/adapters/codex.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,eAAe,EAAwD,MAAM,cAAc,CAAC;AAW1G,eAAO,MAAM,YAAY,EAAE,eAgF1B,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// packages/cli/src/adapters/codex.ts
|
|
3
|
-
// Codex adapter. Writes
|
|
4
|
-
//
|
|
3
|
+
// Codex adapter. Writes Codex skill proxies (.agents/skills/<name>/SKILL.md —
|
|
4
|
+
// invoked via the `$` skill mention), MCP into .codex/config.toml, and an AGENTS.md
|
|
5
|
+
// marker. Skill CONTENT stays canonical under .vsaf/skills; the proxies are thin.
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
5
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
10
|
exports.codexAdapter = void 0;
|
|
7
11
|
const fs_1 = require("fs");
|
|
8
12
|
const path_1 = require("path");
|
|
9
13
|
const os_1 = require("os");
|
|
14
|
+
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
10
15
|
const adapter_js_1 = require("./adapter.js");
|
|
11
16
|
const shared_js_1 = require("./shared.js");
|
|
12
17
|
const toml_mcp_js_1 = require("./toml-mcp.js");
|
|
@@ -27,7 +32,50 @@ exports.codexAdapter = {
|
|
|
27
32
|
},
|
|
28
33
|
install(ctx) {
|
|
29
34
|
const result = (0, adapter_js_1.emptyResult)('codex');
|
|
30
|
-
// 1.
|
|
35
|
+
// 1. Codex skill proxies → .agents/skills/<name>/SKILL.md (invoke with `$<name>`).
|
|
36
|
+
// Codex discovers skills from `.agents/skills` at repo/cwd; these are thin
|
|
37
|
+
// proxies that drive runs via the vsaf MCP. Content stays canonical in .vsaf/.
|
|
38
|
+
const skillsRoot = (0, path_1.join)(ctx.projectPath, '.agents', 'skills');
|
|
39
|
+
for (const [filename, yamlContent] of Object.entries(ctx.packInfo.workflows ?? {})) {
|
|
40
|
+
const wfName = (0, path_1.basename)(filename, '.yaml');
|
|
41
|
+
let desc = `Run the VSAF ${ctx.packName}/${wfName} workflow`;
|
|
42
|
+
try {
|
|
43
|
+
const parsed = js_yaml_1.default.load(yamlContent);
|
|
44
|
+
if (parsed?.description)
|
|
45
|
+
desc = parsed.description.trim().split('\n')[0];
|
|
46
|
+
}
|
|
47
|
+
catch { /* use fallback description */ }
|
|
48
|
+
const body = `---\nname: ${wfName}\ndescription: ${desc}\n---\n\n`
|
|
49
|
+
+ `# ${wfName} — VSAF Workflow\n\n`
|
|
50
|
+
+ `Execute the VSAF workflow \`${ctx.packName}/${wfName}\` (definition: \`.vsaf/workflows/${ctx.packName}/${wfName}.yaml\`).\n\n`
|
|
51
|
+
+ `1. Call the \`vsaf\` MCP tool \`vsaf_start\` with \`workflow: "${ctx.packName}/${wfName}"\`, \`args: <user arguments>\`, \`projectPath: <project root>\`.\n`
|
|
52
|
+
+ `2. For each returned AI node, read \`.vsaf/commands/<node.command>.md\` and \`.vsaf/skills/<node.command>/SKILL.md\` (single source of truth) and execute the node.\n`
|
|
53
|
+
+ `3. Report results with \`vsaf_next\` and repeat until \`done: true\`. Check progress with \`vsaf_status\`; continue interrupted runs with \`vsaf_resume\`.\n`;
|
|
54
|
+
const dir = (0, path_1.join)(skillsRoot, wfName);
|
|
55
|
+
const target = (0, path_1.join)(dir, 'SKILL.md');
|
|
56
|
+
if (!(0, fs_1.existsSync)(target) || ctx.options.force) {
|
|
57
|
+
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
58
|
+
(0, fs_1.writeFileSync)(target, body, 'utf-8');
|
|
59
|
+
}
|
|
60
|
+
result.commands.push(wfName);
|
|
61
|
+
}
|
|
62
|
+
// Top-level skill proxies → .agents/skills/<pack>-<skill>/SKILL.md (e.g. sdlc-onboard-docs).
|
|
63
|
+
// Step-level (contain "/") and bundled skills stay engine-internal.
|
|
64
|
+
for (const skill of ctx.packInfo.skillNames.filter(s => !shared_js_1.SKIP_SKILLS.includes(s) && !/[\\/]/.test(s))) {
|
|
65
|
+
const name = `${ctx.packName}-${skill}`;
|
|
66
|
+
const body = `---\nname: ${name}\ndescription: Run VSAF skill ${name}\n---\n\n`
|
|
67
|
+
+ `# ${name}\n\n`
|
|
68
|
+
+ `Read \`.vsaf/commands/${name}.md\` if it exists, then \`.vsaf/skills/${name}/SKILL.md\` and any referenced files before acting. `
|
|
69
|
+
+ `Treat \`.vsaf/skills/${name}\` as the single source of truth; do not copy it here.\n`;
|
|
70
|
+
const dir = (0, path_1.join)(skillsRoot, name);
|
|
71
|
+
const target = (0, path_1.join)(dir, 'SKILL.md');
|
|
72
|
+
if (!(0, fs_1.existsSync)(target) || ctx.options.force) {
|
|
73
|
+
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
74
|
+
(0, fs_1.writeFileSync)(target, body, 'utf-8');
|
|
75
|
+
}
|
|
76
|
+
result.commands.push(name);
|
|
77
|
+
}
|
|
78
|
+
// 2. MCP → project .codex/config.toml (surgical merge, preserves trust).
|
|
31
79
|
const tomlPath = (0, path_1.join)(ctx.projectPath, '.codex', 'config.toml');
|
|
32
80
|
try {
|
|
33
81
|
result.mcp = (0, toml_mcp_js_1.writeTomlMcp)(tomlPath, {
|
|
@@ -39,9 +87,9 @@ exports.codexAdapter = {
|
|
|
39
87
|
catch (err) {
|
|
40
88
|
result.warnings.push(`Không cập nhật được .codex/config.toml: ${err.message}`);
|
|
41
89
|
}
|
|
42
|
-
//
|
|
43
|
-
(0, shared_js_1.writeMarkerFile)((0, path_1.join)(ctx.projectPath, 'AGENTS.md'), `pack=${ctx.packName} ide=codex`, `## VSAF \`${ctx.packName}\` (Codex)\n\
|
|
44
|
-
//
|
|
90
|
+
// 3. Instruction marker block in AGENTS.md.
|
|
91
|
+
(0, shared_js_1.writeMarkerFile)((0, path_1.join)(ctx.projectPath, 'AGENTS.md'), `pack=${ctx.packName} ide=codex`, `## VSAF \`${ctx.packName}\` (Codex)\n\nSkill proxies in \`.agents/skills/\` (invoke with \`$<name>\`, e.g. \`$${ctx.packName}-onboard-docs\`, workflow \`$master-sdlc-headless\`) drive runs via the \`vsaf\` MCP (\`.codex/config.toml\` [mcp_servers], vsaf + gitnexus). Canonical skills: \`.vsaf/skills/\` · Commands: \`.vsaf/commands/\` · Workflows: \`.vsaf/workflows/\`.\n\nWhen a node references a skill, read \`.vsaf/commands/<name>.md\` first, then \`.vsaf/skills/<name>/SKILL.md\` and any files it includes. Do not copy canonical skill content into \`.agents/skills/\` — the proxies are references only.\n\nArtifact boundary: generated knowledge/docs/artifacts stay at project root beside \`.vsaf\` or inside root \`.vsaf/\`; never auto-write them inside service/subproject folders unless explicitly authorized.`);
|
|
92
|
+
// 4. Binaries.
|
|
45
93
|
if (!ctx.options._skipGraphify && !(0, shared_js_1.installGraphifyPlatform)('codex')) {
|
|
46
94
|
result.warnings.push('graphify codex install failed — run: graphify install --platform codex');
|
|
47
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/adapters/codex.ts"],"names":[],"mappings":";AAAA,q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,WAAW,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;QAChE,IAAI,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,IAAA,0BAAY,EAAC,QAAQ,EAAE;gBAClC,IAAI,EAAE,WAAW,CAAC,IAAA,2BAAe,GAAE,CAAC;gBACpC,QAAQ,EAAE,WAAW,CAAC,IAAA,+BAAmB,GAAE,CAAC;aAC7C,CAAC,CAAC;YACH,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,gGAAgG,CAAC,CAAC;QACzH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,2CAA4C,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5F,CAAC;QAED,4CAA4C;QAC5C,IAAA,2BAAe,EACb,IAAA,WAAI,EAAC,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,EAClC,QAAQ,GAAG,CAAC,QAAQ,YAAY,EAChC,aAAa,GAAG,CAAC,QAAQ,wFAAwF,GAAG,CAAC,QAAQ,mrBAAmrB,CACjzB,CAAC;QAEF,eAAe;QACf,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,IAAI,CAAC,IAAA,mCAAuB,EAAC,OAAO,CAAC,EAAE,CAAC;YACpE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAC;QACjG,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { FastifyInstance } from 'fastify';
|
|
2
2
|
import type { ResolveProjectContext } from '../app.js';
|
|
3
|
+
export interface RunGraphNode {
|
|
4
|
+
id: string;
|
|
5
|
+
dependsOn: string[];
|
|
6
|
+
type?: string;
|
|
7
|
+
provider?: string;
|
|
8
|
+
model?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Parse a run's persisted (already-expanded) workflow YAML into a flat node
|
|
11
|
+
* graph for the DAG view. Returns undefined when absent or unparseable. */
|
|
12
|
+
export declare function buildRunGraph(workflowYaml: string | undefined): {
|
|
13
|
+
nodes: RunGraphNode[];
|
|
14
|
+
} | undefined;
|
|
3
15
|
export declare function runRoutes(app: FastifyInstance, opts: {
|
|
4
16
|
resolveContext: ResolveProjectContext;
|
|
5
17
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../../src/server/routes/runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,SAAS,CAAC;AAI/D,OAAO,KAAK,EAAE,qBAAqB,EAAkB,MAAM,WAAW,CAAC;AAKvE,wBAAsB,SAAS,CAC7B,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE;IAAE,cAAc,EAAE,qBAAqB,CAAA;CAAE,GAC9C,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../../src/server/routes/runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,SAAS,CAAC;AAI/D,OAAO,KAAK,EAAE,qBAAqB,EAAkB,MAAM,WAAW,CAAC;AAKvE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;4EAC4E;AAC5E,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG;IAAE,KAAK,EAAE,YAAY,EAAE,CAAA;CAAE,GAAG,SAAS,CAgBrG;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE;IAAE,cAAc,EAAE,qBAAqB,CAAA;CAAE,GAC9C,OAAO,CAAC,IAAI,CAAC,CAyOf"}
|
|
@@ -52,12 +52,34 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
52
52
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
+
exports.buildRunGraph = buildRunGraph;
|
|
55
56
|
exports.runRoutes = runRoutes;
|
|
56
57
|
const fs_1 = require("fs");
|
|
57
58
|
const path_1 = require("path");
|
|
58
59
|
const core_1 = require("@vsaf/core");
|
|
59
60
|
const project_registry_js_1 = require("../services/project-registry.js");
|
|
60
61
|
const OUTPUT_LIMIT = 200 * 1024;
|
|
62
|
+
/** Parse a run's persisted (already-expanded) workflow YAML into a flat node
|
|
63
|
+
* graph for the DAG view. Returns undefined when absent or unparseable. */
|
|
64
|
+
function buildRunGraph(workflowYaml) {
|
|
65
|
+
if (!workflowYaml)
|
|
66
|
+
return undefined;
|
|
67
|
+
try {
|
|
68
|
+
const graph = (0, core_1.parseWorkflow)(workflowYaml);
|
|
69
|
+
return {
|
|
70
|
+
nodes: [...graph.nodes.values()].map((n) => ({
|
|
71
|
+
id: n.id,
|
|
72
|
+
dependsOn: n.dependsOn ?? [],
|
|
73
|
+
type: n.type,
|
|
74
|
+
provider: n.provider,
|
|
75
|
+
model: n.model,
|
|
76
|
+
})),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
61
83
|
async function runRoutes(app, opts) {
|
|
62
84
|
const contextFor = (request) => opts.resolveContext((0, project_registry_js_1.requestProject)(request));
|
|
63
85
|
const storeDirFor = (context) => (0, path_1.join)(context.project.path, '.vsaf', 'storage');
|
|
@@ -71,12 +93,35 @@ async function runRoutes(app, opts) {
|
|
|
71
93
|
return store ? store.listWithHistory() : [];
|
|
72
94
|
});
|
|
73
95
|
app.get('/runs/:runId', async (request, reply) => {
|
|
74
|
-
const
|
|
96
|
+
const context = contextFor(request);
|
|
97
|
+
const store = storeFor(context);
|
|
75
98
|
const run = store?.load(request.params.runId);
|
|
76
99
|
if (!run) {
|
|
77
100
|
return reply.status(404).send({ error: `Run not found: ${request.params.runId}` });
|
|
78
101
|
}
|
|
79
|
-
|
|
102
|
+
let conversationId;
|
|
103
|
+
// Avoid creating .vsaf/storage/vsaf.db as a side effect when the project has none
|
|
104
|
+
const sqliteDbPath = (0, path_1.join)(context.project.path, '.vsaf', 'storage', 'vsaf.db');
|
|
105
|
+
if ((0, fs_1.existsSync)(sqliteDbPath)) {
|
|
106
|
+
try {
|
|
107
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
108
|
+
try {
|
|
109
|
+
const sqlite = __addDisposableResource(env_1, core_1.SqliteWorkflowStore.openProject(context.project.path), false);
|
|
110
|
+
conversationId = (await sqlite.getWorkflowRun(request.params.runId))?.conversation_id;
|
|
111
|
+
}
|
|
112
|
+
catch (e_1) {
|
|
113
|
+
env_1.error = e_1;
|
|
114
|
+
env_1.hasError = true;
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
__disposeResources(env_1);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
conversationId = undefined;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return { ...run, graph: buildRunGraph(run.workflowYaml), conversationId };
|
|
80
125
|
});
|
|
81
126
|
app.get('/runs/:runId/nodes/:nodeId/output', async (request, reply) => {
|
|
82
127
|
const store = storeFor(contextFor(request));
|
|
@@ -211,14 +256,14 @@ async function runRoutes(app, opts) {
|
|
|
211
256
|
return reply.status(204).send();
|
|
212
257
|
});
|
|
213
258
|
app.get('/runs/:runId/artifacts/*', async (request, reply) => {
|
|
214
|
-
const
|
|
259
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
215
260
|
try {
|
|
216
261
|
const context = contextFor(request);
|
|
217
262
|
const artifactRelPath = request.params['*'];
|
|
218
263
|
if (isUnsafeRelativePath(artifactRelPath)) {
|
|
219
264
|
return reply.status(400).send({ error: 'Invalid artifact path' });
|
|
220
265
|
}
|
|
221
|
-
const sqlite = __addDisposableResource(
|
|
266
|
+
const sqlite = __addDisposableResource(env_2, core_1.SqliteWorkflowStore.openProject(context.project.path), false);
|
|
222
267
|
const run = await sqlite.getWorkflowRun(request.params.runId);
|
|
223
268
|
if (!run?.artifact_path) {
|
|
224
269
|
return reply.status(404).send({ error: `Run artifact path not found: ${request.params.runId}` });
|
|
@@ -232,12 +277,12 @@ async function runRoutes(app, opts) {
|
|
|
232
277
|
}
|
|
233
278
|
return reply.type('text/plain').send((0, fs_1.readFileSync)(filePath, 'utf-8'));
|
|
234
279
|
}
|
|
235
|
-
catch (
|
|
236
|
-
|
|
237
|
-
|
|
280
|
+
catch (e_2) {
|
|
281
|
+
env_2.error = e_2;
|
|
282
|
+
env_2.hasError = true;
|
|
238
283
|
}
|
|
239
284
|
finally {
|
|
240
|
-
__disposeResources(
|
|
285
|
+
__disposeResources(env_2);
|
|
241
286
|
}
|
|
242
287
|
});
|
|
243
288
|
app.post('/runs', async (request, reply) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../../src/server/routes/runs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,8BAgOC;AAxOD,2BAA8C;AAC9C,+BAAiD;AACjD,qCAA2D;AAE3D,yEAAiE;AAEjE,MAAM,YAAY,GAAG,GAAG,GAAG,IAAI,CAAC;AAEzB,KAAK,UAAU,SAAS,CAC7B,GAAoB,EACpB,IAA+C;IAE/C,MAAM,UAAU,GAAG,CAAC,OAAuB,EAAkB,EAAE,CAC7D,IAAI,CAAC,cAAc,CAAC,IAAA,oCAAc,EAAC,OAAO,CAAC,CAAC,CAAC;IAE/C,MAAM,WAAW,GAAG,CAAC,OAAuB,EAAU,EAAE,CACtD,I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,EAAE,KAAK,CAAC,CAAC;QAE1D,sCAAsC;QACtC,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,GAAG,EAAE,CAAC;YACR,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACxE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB,EAAE,QAAgB;IACvD,MAAM,GAAG,GAAG,IAAA,eAAQ,EAAC,IAAA,gBAAS,EAAC,QAAQ,CAAC,EAAE,IAAA,gBAAS,EAAC,QAAQ,CAAC,CAAC,CAAC;IAC/D,OAAO,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,IAAI,CAAC;AAC9C,CAAC"}
|
|
@@ -379,29 +379,3 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
379
379
|
THE SOFTWARE.
|
|
380
380
|
|
|
381
381
|
--------------------------------------------------------------------------------
|
|
382
|
-
Package: tailwindcss
|
|
383
|
-
License: "MIT"
|
|
384
|
-
|
|
385
|
-
MIT License
|
|
386
|
-
|
|
387
|
-
Copyright (c) Tailwind Labs, Inc.
|
|
388
|
-
|
|
389
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
390
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
391
|
-
in the Software without restriction, including without limitation the rights
|
|
392
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
393
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
394
|
-
furnished to do so, subject to the following conditions:
|
|
395
|
-
|
|
396
|
-
The above copyright notice and this permission notice shall be included in all
|
|
397
|
-
copies or substantial portions of the Software.
|
|
398
|
-
|
|
399
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
400
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
401
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
402
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
403
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
404
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
405
|
-
SOFTWARE.
|
|
406
|
-
|
|
407
|
-
--------------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as A,e as R}from"./chunk-FWLQWWZ3.js";import{a as B,b as j,c as q,d as $,e as D,f as Q,g as G,h as J,i as Y,j as H,k as K}from"./chunk-K4VRVZWF.js";import{Ba as W,Fa as u,Ib as z,Jb as N,Mb as L,O as P,Qa as c,Ra as n,Sa as t,T as m,U as f,Ua as v,Va as M,Xa as x,Ya as _,Za as s,bb as F,cb as I,db as h,fb as o,gb as g,hb as V,ib as y,jb as w,k as O,kb as b,lb as C,ob as k,qa as l,rb as T,u as S,w as E}from"./chunk-W7ZKECPT.js";var X=a=>({folder:a}),Z=a=>({id:a});function te(a,i){a&1&&(n(0,"div",7),o(1,"Loading workflows..."),t())}function ne(a,i){if(a&1&&(n(0,"div",8),o(1),t()),a&2){let e=s();l(),g(e.loadError)}}function oe(a,i){if(a&1&&(n(0,"p"),o(1),t()),a&2){let e=s(3);l(),g(e.folderError)}}function re(a,i){if(a&1){let e=x();n(0,"form",30),_("ngSubmit",function(){m(e);let d=s(2);return f(d.createFolder())}),n(1,"span"),o(2),t(),n(3,"input",31),C("ngModelChange",function(d){m(e);let p=s(2);return b(p.newFolderName,d)||(p.newFolderName=d),f(d)}),t(),n(4,"div")(5,"button",32),o(6,"Create"),t(),n(7,"button",22),_("click",function(){m(e);let d=s(2);return f(d.cancelFolder())}),o(8,"Cancel"),t()(),u(9,oe,2,1,"p",33),t()}if(a&2){let e=s(2);l(2),g(e.selectedFolder?e.selectedFolder+"/":""),l(),w("ngModel",e.newFolderName),l(2),c("disabled",e.creatingFolder),l(4),c("ngIf",e.folderError)}}function ie(a,i){if(a&1){let e=x();n(0,"button",34),_("click",function(){let d=m(e).$implicit,p=s(2);return f(p.selectFolder(d.path))}),n(1,"span",16),o(2,"\u203A"),t(),n(3,"span"),o(4),t(),n(5,"strong"),o(6),t()()}if(a&2){let e=i.$implicit,r=s(2);I("padding-left",14+e.depth*16,"px"),h("active",r.selectedFolder===e.path),l(4),g(e.name),l(2),g(e.count)}}function le(a,i){if(a&1){let e=x();v(0),n(1,"span"),o(2,"/"),t(),n(3,"button",22),_("click",function(){let d=m(e).$implicit,p=s(2);return f(p.selectFolder(d.path))}),o(4),t(),M()}if(a&2){let e=i.$implicit,r=i.last;l(3),h("current",r),l(),g(e.name)}}function ae(a,i){if(a&1){let e=x();n(0,"article",35),_("click",function(){let d=m(e).$implicit,p=s(2);return f(p.selectWorkflow(d))}),n(1,"div",36)(2,"span",37),o(3,"Y"),t(),n(4,"div")(5,"strong"),o(6),t(),n(7,"p"),o(8),t()()(),n(9,"span",38),o(10),t(),n(11,"code"),o(12),t(),n(13,"div",39)(14,"a",40),_("click",function(d){return d.stopPropagation()}),o(15,"Details"),t(),n(16,"button",22),_("click",function(d){let p=m(e).$implicit,ee=s(2);return d.stopPropagation(),f(ee.selectWorkflow(p))}),o(17,"Run"),t()()()}if(a&2){let e=i.$implicit,r=s(2);h("selected",(r.selectedWorkflow==null?null:r.selectedWorkflow.id)===e.id),l(6),g(e.name),l(2),g(e.description||"No description provided."),l(2),g(e.nodeCount),l(2),g(e.file),l(2),c("queryParams",k(7,Z,e.id))}}function de(a,i){a&1&&(n(0,"div",41),o(1,"No workflows match this folder and search."),t())}function ce(a,i){if(a&1&&(n(0,"option",55),o(1),t()),a&2){let e=i.$implicit;c("value",e.name)("disabled",!e.available),l(),y(" ",e.name,"",e.available?"":" \u2014 not available on this machine"," ")}}function se(a,i){if(a&1&&(n(0,"option",56),o(1),t()),a&2){let e=i.$implicit;c("value",e),l(),g(e)}}function pe(a,i){if(a&1){let e=x();v(0),n(1,"label",48),o(2,"Provider"),t(),n(3,"select",49),C("ngModelChange",function(d){m(e);let p=s(3);return b(p.runProvider,d)||(p.runProvider=d),f(d)}),_("ngModelChange",function(){m(e);let d=s(3);return f(d.onRunProviderChange())}),n(4,"option",50),o(5,"(workflow default)"),t(),u(6,ce,2,4,"option",51),t(),n(7,"label",52),o(8,"Model"),t(),n(9,"select",53),C("ngModelChange",function(d){m(e);let p=s(3);return b(p.runModel,d)||(p.runModel=d),f(d)}),n(10,"option",50),o(11,"(workflow default)"),t(),u(12,se,2,2,"option",54),t(),M()}if(a&2){let e=s(3);l(3),w("ngModel",e.runProvider),c("disabled",e.running),l(3),c("ngForOf",e.providers),l(3),w("ngModel",e.runModel),c("disabled",e.running),l(3),c("ngForOf",e.runModelOptions)}}function ge(a,i){if(a&1&&(n(0,"div",57),o(1),t()),a&2){let e=s(3);l(),g(e.runError)}}function me(a,i){if(a&1){let e=x();v(0),n(1,"div",12),o(2,"Run workflow"),t(),n(3,"span",42),o(4),t(),n(5,"h2"),o(6),t(),n(7,"p"),o(8),t(),n(9,"dl")(10,"div")(11,"dt"),o(12,"Nodes"),t(),n(13,"dd"),o(14),t()(),n(15,"div")(16,"dt"),o(17,"File"),t(),n(18,"dd"),o(19),t()()(),n(20,"label",43),o(21,"Arguments"),t(),n(22,"input",44),C("ngModelChange",function(d){m(e);let p=s(2);return b(p.runArgs,d)||(p.runArgs=d),f(d)}),t(),u(23,pe,13,6,"ng-container",33),n(24,"button",45),_("click",function(){m(e);let d=s(2);return f(d.runSelected())}),o(25),t(),n(26,"a",46),o(27,"Open details"),t(),u(28,ge,2,1,"div",47),M()}if(a&2){let e=s(2);l(4),g(e.selectedWorkflow.id),l(2),g(e.selectedWorkflow.name),l(2),g(e.selectedWorkflow.description||"No description provided."),l(6),g(e.selectedWorkflow.nodeCount),l(5),g(e.selectedWorkflow.file),l(3),w("ngModel",e.runArgs),c("disabled",e.running),l(),c("ngIf",e.providers.length),l(),c("disabled",e.running),l(),V(" ",e.running?"Starting...":"Run workflow"," "),l(),c("queryParams",k(12,Z,e.selectedWorkflow.id)),l(2),c("ngIf",e.runError)}}function fe(a,i){a&1&&(n(0,"div",12),o(1,"Inspector"),t(),n(2,"p"),o(3,"Select a workflow to inspect and run it."),t())}function _e(a,i){if(a&1){let e=x();n(0,"div",9)(1,"aside",10)(2,"div",11)(3,"div",12),o(4,"Folders"),t(),n(5,"button",13),_("click",function(){m(e);let d=s();return f(d.showFolderForm=!0)}),o(6,"+"),t()(),u(7,re,10,4,"form",14),n(8,"button",15),_("click",function(){m(e);let d=s();return f(d.selectFolder(""))}),n(9,"span",16),o(10,"\u2302"),t(),n(11,"span"),o(12,".vsaf/workflows"),t(),n(13,"strong"),o(14),t()(),u(15,ie,7,6,"button",17),n(16,"a",18),o(17,"+ Workflow in this folder"),t()(),n(18,"main",19)(19,"div",20)(20,"div")(21,"nav",21)(22,"button",22),_("click",function(){m(e);let d=s();return f(d.selectFolder(""))}),o(23,"workflows"),t(),u(24,le,5,3,"ng-container",23),t(),n(25,"p"),o(26),t()(),n(27,"input",24),C("ngModelChange",function(d){m(e);let p=s();return b(p.searchQuery,d)||(p.searchQuery=d),f(d)}),t()(),n(28,"div",25)(29,"span"),o(30,"Name"),t(),n(31,"span"),o(32,"Nodes"),t(),n(33,"span"),o(34,"Location"),t(),n(35,"span"),o(36,"Actions"),t()(),u(37,ae,18,9,"article",26)(38,de,2,0,"div",27),t(),n(39,"aside",28),u(40,me,29,14,"ng-container",29)(41,fe,4,0,"ng-template",null,0,T),t()()}if(a&2){let e=F(42),r=s();l(7),c("ngIf",r.showFolderForm),l(),h("active",r.selectedFolder===""),l(6),g(r.workflows.length),l(),c("ngForOf",r.folders),l(),c("queryParams",k(15,X,r.selectedFolder||null)),l(8),c("ngForOf",r.breadcrumbs),l(2),y("",r.visibleWorkflows.length," workflow",r.visibleWorkflows.length===1?"":"s"),l(),w("ngModel",r.searchQuery),l(10),c("ngForOf",r.visibleWorkflows)("ngForTrackBy",r.trackWorkflow),l(),c("ngIf",!r.visibleWorkflows.length),l(2),c("ngIf",r.selectedWorkflow)("ngIfElse",e)}}var U=class a{api=P(K);router=P(A);workflows=[];folderPaths=[];providers=[];loading=!0;loadError="";selectedFolder="";selectedWorkflow;searchQuery="";runArgs="";runProvider="";runModel="";running=!1;runError="";showFolderForm=!1;newFolderName="";creatingFolder=!1;folderError="";ngOnInit(){S({workflows:this.api.getWorkflows(),folders:this.api.getWorkflowFolders(),providers:this.api.getProviders().pipe(E(()=>O({providers:[]})))}).subscribe({next:i=>{this.workflows=i.workflows,this.folderPaths=i.folders,this.providers=i.providers.providers??[],this.loading=!1},error:i=>{this.loadError=i?.error?.error??"Failed to load workflows.",this.loading=!1}})}get runModelOptions(){return this.runProvider?this.providers.find(i=>i.name===this.runProvider)?.defaultModels??[]:[...new Set(this.providers.flatMap(i=>i.defaultModels))]}onRunProviderChange(){this.runModel&&!this.runModelOptions.includes(this.runModel)&&(this.runModel="")}get folders(){let i=new Set(this.folderPaths);for(let e of this.workflows){let r=e.directory.split("/").filter(Boolean);r.forEach((d,p)=>i.add(r.slice(0,p+1).join("/")))}return[...i].sort().map(e=>({path:e,name:e.slice(e.lastIndexOf("/")+1),depth:e.split("/").length-1,count:this.workflows.filter(r=>r.directory===e||r.directory.startsWith(`${e}/`)).length}))}get breadcrumbs(){let i=this.selectedFolder.split("/").filter(Boolean);return i.map((e,r)=>({name:e,path:i.slice(0,r+1).join("/")}))}get visibleWorkflows(){let i=this.searchQuery.trim().toLowerCase();return this.workflows.filter(e=>{let r=!this.selectedFolder||e.directory===this.selectedFolder,d=!i||`${e.name} ${e.id} ${e.description}`.toLowerCase().includes(i);return r&&d})}selectFolder(i){this.selectedFolder=i,this.selectedWorkflow=void 0,this.runError=""}createFolder(){let i=this.newFolderName.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");if(!i){this.folderError="Enter a valid folder name.";return}let e=this.selectedFolder?`${this.selectedFolder}/${i}`:i;this.creatingFolder=!0,this.folderError="",this.api.createWorkflowFolder(e).subscribe({next:()=>{this.creatingFolder=!1,this.folderPaths=[...new Set([...this.folderPaths,e])].sort(),this.selectFolder(e),this.cancelFolder()},error:r=>{this.creatingFolder=!1,this.folderError=r?.error?.error??"Failed to create folder."}})}cancelFolder(){this.showFolderForm=!1,this.newFolderName="",this.folderError=""}selectWorkflow(i){this.selectedWorkflow=i,this.runError=""}trackWorkflow(i,e){return e.id}runSelected(){!this.selectedWorkflow||this.running||(this.running=!0,this.api.startRun(this.selectedWorkflow.id,this.runArgs,{provider:this.runProvider||void 0,model:this.runModel||void 0}).subscribe({next:i=>this.router.navigate(["/runs",i.runId]),error:i=>{this.running=!1,this.runError=i?.error?.error??"Failed to start workflow."}}))}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=W({type:a,selectors:[["app-workflows"]],decls:14,vars:6,consts:[["noSelection",""],[1,"page"],[1,"page-header"],["routerLink","/workflows/builder",1,"primary-button",3,"queryParams"],["class","state",4,"ngIf"],["class","state error",4,"ngIf"],["class","explorer",4,"ngIf"],[1,"state"],[1,"state","error"],[1,"explorer"],[1,"folder-panel"],[1,"folder-heading"],[1,"panel-heading"],["type","button","title","Create subfolder",3,"click"],["class","folder-form",3,"ngSubmit",4,"ngIf"],["type","button",1,"folder-row","root",3,"click"],[1,"chevron"],["type","button","class","folder-row",3,"active","padding-left","click",4,"ngFor","ngForOf"],["routerLink","/workflows/builder",1,"folder-new-flow",3,"queryParams"],[1,"content-panel"],[1,"content-toolbar"],["aria-label","Workflow folder",1,"breadcrumb"],["type","button",3,"click"],[4,"ngFor","ngForOf"],["type","search","placeholder","Search this workspace",3,"ngModelChange","ngModel"],[1,"column-head"],["class","workflow-row",3,"selected","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","empty",4,"ngIf"],[1,"run-panel"],[4,"ngIf","ngIfElse"],[1,"folder-form",3,"ngSubmit"],["name","folderName","placeholder","folder-name","autofocus","",3,"ngModelChange","ngModel"],["type","submit",3,"disabled"],[4,"ngIf"],["type","button",1,"folder-row",3,"click"],[1,"workflow-row",3,"click"],[1,"workflow-name"],[1,"file-icon"],[1,"node-count"],[1,"row-actions"],["routerLink","/workflows/detail",3,"click","queryParams"],[1,"empty"],[1,"namespace"],["for","run-args"],["id","run-args","placeholder","Optional run args",3,"ngModelChange","ngModel","disabled"],["type","button",1,"run-button",3,"click","disabled"],["routerLink","/workflows/detail",1,"details-button",3,"queryParams"],["class","run-error",4,"ngIf"],["for","run-provider"],["id","run-provider",1,"run-select",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value","disabled",4,"ngFor","ngForOf"],["for","run-model"],["id","run-model",1,"run-select",3,"ngModelChange","ngModel","disabled"],[3,"value",4,"ngFor","ngForOf"],[3,"value","disabled"],[3,"value"],[1,"run-error"]],template:function(e,r){e&1&&(n(0,"section",1)(1,"header",2)(2,"div")(3,"h1"),o(4,"Workflows"),t(),n(5,"p"),o(6,"Browse workflow definitions by their directory structure."),t()(),n(7,"a",3)(8,"span"),o(9,"+"),t(),o(10," New workflow"),t()(),u(11,te,2,0,"div",4)(12,ne,2,1,"div",5)(13,_e,43,17,"div",6),t()),e&2&&(l(7),c("queryParams",k(4,X,r.selectedFolder||null)),l(4),c("ngIf",r.loading),l(),c("ngIf",r.loadError),l(),c("ngIf",!r.loading&&!r.loadError))},dependencies:[L,z,N,H,Q,J,Y,B,G,j,q,D,$,R],styles:["[_nghost-%COMP%]{display:block;min-height:calc(100vh - 56px);background:#101114;color:#e7e7ea}.page[_ngcontent-%COMP%]{padding:22px;max-width:1600px;margin:auto}.page-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.page-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:21px;margin:0}.page-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .content-toolbar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13px;color:#8f96a3;margin:4px 0 0}.primary-button[_ngcontent-%COMP%], .details-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;background:#6366f1;color:#fff;text-decoration:none;padding:9px 12px;border-radius:6px;font-size:13px;font-weight:700}.explorer[_ngcontent-%COMP%]{display:grid;grid-template-columns:240px minmax(500px,1fr) 280px;min-height:620px;border:1px solid #292c34;border-radius:7px;overflow:hidden;background:#15161a}.folder-panel[_ngcontent-%COMP%], .run-panel[_ngcontent-%COMP%]{background:#131419}.folder-panel[_ngcontent-%COMP%]{border-right:1px solid #292c34;padding:12px 8px}.run-panel[_ngcontent-%COMP%]{border-left:1px solid #292c34;padding:14px}.panel-heading[_ngcontent-%COMP%]{font-size:11px;color:#8f96a3;text-transform:uppercase;font-weight:800;margin:3px 7px 12px}.folder-heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.folder-heading[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:24px;height:24px;border:1px solid #353842;border-radius:4px;background:#202229;color:#fff;cursor:pointer}.folder-form[_ngcontent-%COMP%]{border:1px solid #383b45;background:#191b20;padding:8px;margin-bottom:8px;border-radius:5px}.folder-form[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#777e8b;font-size:10px;overflow-wrap:anywhere}.folder-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;margin:5px 0;border:1px solid #3b3e49;background:#101114;color:#fff;padding:6px;border-radius:4px}.folder-form[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;gap:5px}.folder-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:1px solid #3b3e49;background:#252731;color:#ddd;padding:4px 6px;border-radius:4px;font-size:10px}.folder-form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fca5a5;font-size:10px;margin:6px 0 0}.folder-new-flow[_ngcontent-%COMP%]{display:block;color:#a5b4fc;text-decoration:none;font-size:11px;padding:9px 12px;border-top:1px solid #292c34;margin-top:8px}.folder-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:16px minmax(0,1fr) auto;gap:7px;align-items:center;width:100%;height:34px;border:0;border-radius:5px;background:transparent;color:#b7bbc4;text-align:left;cursor:pointer;padding-right:9px}.folder-row[_ngcontent-%COMP%]:hover, .folder-row.active[_ngcontent-%COMP%]{background:#242630;color:#fff}.folder-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:10px;color:#6f7684}.chevron[_ngcontent-%COMP%]{color:#7c83ff}.content-panel[_ngcontent-%COMP%]{min-width:0;padding:0 16px 20px}.content-toolbar[_ngcontent-%COMP%]{min-height:72px;display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #292c34}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.breadcrumb[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;background:transparent;color:#949ba8;padding:0;cursor:pointer;font-weight:600}.breadcrumb[_ngcontent-%COMP%] button.current[_ngcontent-%COMP%]{color:#fff}.breadcrumb[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#555b67}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .run-panel[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;border:1px solid #343741;background:#101114;color:#eee;border-radius:5px;padding:8px 10px;outline:none}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:260px}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .run-panel[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:#6366f1}.column-head[_ngcontent-%COMP%], .workflow-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(220px,1.4fr) 60px minmax(150px,.8fr) 120px;gap:12px;align-items:center}.column-head[_ngcontent-%COMP%]{height:38px;color:#707784;font-size:10px;text-transform:uppercase;font-weight:800}.workflow-row[_ngcontent-%COMP%]{min-height:68px;border-top:1px solid #25272e;padding:10px 0;cursor:pointer}.workflow-row[_ngcontent-%COMP%]:hover, .workflow-row.selected[_ngcontent-%COMP%]{background:#1b1d23}.workflow-name[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;min-width:0;padding-left:8px}.workflow-name[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-width:0}.file-icon[_ngcontent-%COMP%]{display:grid;place-items:center;flex:0 0 28px;width:28px;height:32px;border:1px solid #4b4f5c;border-radius:4px;color:#a5b4fc;font-size:11px;font-weight:900}.workflow-name[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;font-size:13px;overflow-wrap:anywhere}.workflow-name[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:4px 0 0;color:#777e8b;font-size:11px;line-height:1.4;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.node-count[_ngcontent-%COMP%]{color:#aeb4bf;font-size:12px}.workflow-row[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:10px;color:#777e8b;overflow:hidden;text-overflow:ellipsis}.row-actions[_ngcontent-%COMP%]{display:flex;gap:6px}.row-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:1px solid #383b45;background:#202229;color:#c9ccd3;border-radius:4px;padding:5px 7px;text-decoration:none;font:inherit;font-size:11px;cursor:pointer}.run-panel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px;margin:7px 0}.run-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#9299a5;font-size:12px;line-height:1.5}.namespace[_ngcontent-%COMP%]{font:10px ui-monospace,monospace;color:#818cf8;overflow-wrap:anywhere}.run-panel[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{border-top:1px solid #292c34;border-bottom:1px solid #292c34;padding:8px 0;margin:14px 0}.run-panel[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:11px;padding:4px 0}.run-panel[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:#777e8b}.run-panel[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;max-width:170px;overflow-wrap:anywhere;text-align:right}.run-panel[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;font-size:10px;text-transform:uppercase;color:#8f96a3;font-weight:700;margin:12px 0 6px}.run-panel[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:first-of-type{margin-top:0}.run-panel[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.run-select[_ngcontent-%COMP%]{display:block;width:100%;box-sizing:border-box;border:1px solid #343741;background:#101114;color:#eee;border-radius:5px;padding:8px 10px;outline:none}.run-select[_ngcontent-%COMP%]:focus{border-color:#6366f1}.run-select[_ngcontent-%COMP%]:disabled{opacity:.55}.run-button[_ngcontent-%COMP%], .details-button[_ngcontent-%COMP%]{width:100%;justify-content:center;box-sizing:border-box;margin-top:9px;border:0}.run-button[_ngcontent-%COMP%]{background:#059669;color:#fff;padding:9px;border-radius:5px;font-weight:700;cursor:pointer}.run-button[_ngcontent-%COMP%]:disabled{opacity:.5}.details-button[_ngcontent-%COMP%]{background:#242630}.run-error[_ngcontent-%COMP%], .state.error[_ngcontent-%COMP%]{color:#fecaca}.run-error[_ngcontent-%COMP%]{font-size:11px;margin-top:10px}.state[_ngcontent-%COMP%], .empty[_ngcontent-%COMP%]{border:1px solid #292c34;padding:18px;color:#949ba8;border-radius:6px}.empty[_ngcontent-%COMP%]{text-align:center;margin-top:12px}.state[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#0b0c0f;padding:2px 5px}@media(max-width:1100px){.explorer[_ngcontent-%COMP%]{grid-template-columns:210px 1fr}.run-panel[_ngcontent-%COMP%]{display:none}}@media(max-width:720px){.page[_ngcontent-%COMP%]{padding:14px}.page-header[_ngcontent-%COMP%]{align-items:flex-start}.explorer[_ngcontent-%COMP%]{display:block}.folder-panel[_ngcontent-%COMP%]{border-right:0;border-bottom:1px solid #292c34}.content-toolbar[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;padding:14px 0}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.column-head[_ngcontent-%COMP%]{display:none}.workflow-row[_ngcontent-%COMP%]{grid-template-columns:1fr auto}.workflow-row[_ngcontent-%COMP%] > code[_ngcontent-%COMP%], .node-count[_ngcontent-%COMP%]{display:none}}"]})};export{U as WorkflowsComponent};
|
|
1
|
+
import{d as A,e as R}from"./chunk-UN7U5NAR.js";import{a as B,b as j,c as q,d as $,e as D,f as Q,g as G,h as J,i as Y,j as H,k as K}from"./chunk-LPQARKUF.js";import{Ba as W,Fa as u,Jb as z,Kb as N,O as P,Ob as L,Qa as c,Ra as n,Sa as t,T as m,U as f,Ua as v,Va as M,Xa as x,Ya as _,Za as s,cb as F,db as I,eb as h,gb as o,hb as g,ib as V,jb as y,k as O,kb as w,lb as b,mb as C,pb as k,qa as l,sb as T,u as S,w as E}from"./chunk-WDOCF7IL.js";var X=a=>({folder:a}),Z=a=>({id:a});function te(a,i){a&1&&(n(0,"div",7),o(1,"Loading workflows..."),t())}function ne(a,i){if(a&1&&(n(0,"div",8),o(1),t()),a&2){let e=s();l(),g(e.loadError)}}function oe(a,i){if(a&1&&(n(0,"p"),o(1),t()),a&2){let e=s(3);l(),g(e.folderError)}}function re(a,i){if(a&1){let e=x();n(0,"form",30),_("ngSubmit",function(){m(e);let d=s(2);return f(d.createFolder())}),n(1,"span"),o(2),t(),n(3,"input",31),C("ngModelChange",function(d){m(e);let p=s(2);return b(p.newFolderName,d)||(p.newFolderName=d),f(d)}),t(),n(4,"div")(5,"button",32),o(6,"Create"),t(),n(7,"button",22),_("click",function(){m(e);let d=s(2);return f(d.cancelFolder())}),o(8,"Cancel"),t()(),u(9,oe,2,1,"p",33),t()}if(a&2){let e=s(2);l(2),g(e.selectedFolder?e.selectedFolder+"/":""),l(),w("ngModel",e.newFolderName),l(2),c("disabled",e.creatingFolder),l(4),c("ngIf",e.folderError)}}function ie(a,i){if(a&1){let e=x();n(0,"button",34),_("click",function(){let d=m(e).$implicit,p=s(2);return f(p.selectFolder(d.path))}),n(1,"span",16),o(2,"\u203A"),t(),n(3,"span"),o(4),t(),n(5,"strong"),o(6),t()()}if(a&2){let e=i.$implicit,r=s(2);I("padding-left",14+e.depth*16,"px"),h("active",r.selectedFolder===e.path),l(4),g(e.name),l(2),g(e.count)}}function le(a,i){if(a&1){let e=x();v(0),n(1,"span"),o(2,"/"),t(),n(3,"button",22),_("click",function(){let d=m(e).$implicit,p=s(2);return f(p.selectFolder(d.path))}),o(4),t(),M()}if(a&2){let e=i.$implicit,r=i.last;l(3),h("current",r),l(),g(e.name)}}function ae(a,i){if(a&1){let e=x();n(0,"article",35),_("click",function(){let d=m(e).$implicit,p=s(2);return f(p.selectWorkflow(d))}),n(1,"div",36)(2,"span",37),o(3,"Y"),t(),n(4,"div")(5,"strong"),o(6),t(),n(7,"p"),o(8),t()()(),n(9,"span",38),o(10),t(),n(11,"code"),o(12),t(),n(13,"div",39)(14,"a",40),_("click",function(d){return d.stopPropagation()}),o(15,"Details"),t(),n(16,"button",22),_("click",function(d){let p=m(e).$implicit,ee=s(2);return d.stopPropagation(),f(ee.selectWorkflow(p))}),o(17,"Run"),t()()()}if(a&2){let e=i.$implicit,r=s(2);h("selected",(r.selectedWorkflow==null?null:r.selectedWorkflow.id)===e.id),l(6),g(e.name),l(2),g(e.description||"No description provided."),l(2),g(e.nodeCount),l(2),g(e.file),l(2),c("queryParams",k(7,Z,e.id))}}function de(a,i){a&1&&(n(0,"div",41),o(1,"No workflows match this folder and search."),t())}function ce(a,i){if(a&1&&(n(0,"option",55),o(1),t()),a&2){let e=i.$implicit;c("value",e.name)("disabled",!e.available),l(),y(" ",e.name,"",e.available?"":" \u2014 not available on this machine"," ")}}function se(a,i){if(a&1&&(n(0,"option",56),o(1),t()),a&2){let e=i.$implicit;c("value",e),l(),g(e)}}function pe(a,i){if(a&1){let e=x();v(0),n(1,"label",48),o(2,"Provider"),t(),n(3,"select",49),C("ngModelChange",function(d){m(e);let p=s(3);return b(p.runProvider,d)||(p.runProvider=d),f(d)}),_("ngModelChange",function(){m(e);let d=s(3);return f(d.onRunProviderChange())}),n(4,"option",50),o(5,"(workflow default)"),t(),u(6,ce,2,4,"option",51),t(),n(7,"label",52),o(8,"Model"),t(),n(9,"select",53),C("ngModelChange",function(d){m(e);let p=s(3);return b(p.runModel,d)||(p.runModel=d),f(d)}),n(10,"option",50),o(11,"(workflow default)"),t(),u(12,se,2,2,"option",54),t(),M()}if(a&2){let e=s(3);l(3),w("ngModel",e.runProvider),c("disabled",e.running),l(3),c("ngForOf",e.providers),l(3),w("ngModel",e.runModel),c("disabled",e.running),l(3),c("ngForOf",e.runModelOptions)}}function ge(a,i){if(a&1&&(n(0,"div",57),o(1),t()),a&2){let e=s(3);l(),g(e.runError)}}function me(a,i){if(a&1){let e=x();v(0),n(1,"div",12),o(2,"Run workflow"),t(),n(3,"span",42),o(4),t(),n(5,"h2"),o(6),t(),n(7,"p"),o(8),t(),n(9,"dl")(10,"div")(11,"dt"),o(12,"Nodes"),t(),n(13,"dd"),o(14),t()(),n(15,"div")(16,"dt"),o(17,"File"),t(),n(18,"dd"),o(19),t()()(),n(20,"label",43),o(21,"Arguments"),t(),n(22,"input",44),C("ngModelChange",function(d){m(e);let p=s(2);return b(p.runArgs,d)||(p.runArgs=d),f(d)}),t(),u(23,pe,13,6,"ng-container",33),n(24,"button",45),_("click",function(){m(e);let d=s(2);return f(d.runSelected())}),o(25),t(),n(26,"a",46),o(27,"Open details"),t(),u(28,ge,2,1,"div",47),M()}if(a&2){let e=s(2);l(4),g(e.selectedWorkflow.id),l(2),g(e.selectedWorkflow.name),l(2),g(e.selectedWorkflow.description||"No description provided."),l(6),g(e.selectedWorkflow.nodeCount),l(5),g(e.selectedWorkflow.file),l(3),w("ngModel",e.runArgs),c("disabled",e.running),l(),c("ngIf",e.providers.length),l(),c("disabled",e.running),l(),V(" ",e.running?"Starting...":"Run workflow"," "),l(),c("queryParams",k(12,Z,e.selectedWorkflow.id)),l(2),c("ngIf",e.runError)}}function fe(a,i){a&1&&(n(0,"div",12),o(1,"Inspector"),t(),n(2,"p"),o(3,"Select a workflow to inspect and run it."),t())}function _e(a,i){if(a&1){let e=x();n(0,"div",9)(1,"aside",10)(2,"div",11)(3,"div",12),o(4,"Folders"),t(),n(5,"button",13),_("click",function(){m(e);let d=s();return f(d.showFolderForm=!0)}),o(6,"+"),t()(),u(7,re,10,4,"form",14),n(8,"button",15),_("click",function(){m(e);let d=s();return f(d.selectFolder(""))}),n(9,"span",16),o(10,"\u2302"),t(),n(11,"span"),o(12,".vsaf/workflows"),t(),n(13,"strong"),o(14),t()(),u(15,ie,7,6,"button",17),n(16,"a",18),o(17,"+ Workflow in this folder"),t()(),n(18,"main",19)(19,"div",20)(20,"div")(21,"nav",21)(22,"button",22),_("click",function(){m(e);let d=s();return f(d.selectFolder(""))}),o(23,"workflows"),t(),u(24,le,5,3,"ng-container",23),t(),n(25,"p"),o(26),t()(),n(27,"input",24),C("ngModelChange",function(d){m(e);let p=s();return b(p.searchQuery,d)||(p.searchQuery=d),f(d)}),t()(),n(28,"div",25)(29,"span"),o(30,"Name"),t(),n(31,"span"),o(32,"Nodes"),t(),n(33,"span"),o(34,"Location"),t(),n(35,"span"),o(36,"Actions"),t()(),u(37,ae,18,9,"article",26)(38,de,2,0,"div",27),t(),n(39,"aside",28),u(40,me,29,14,"ng-container",29)(41,fe,4,0,"ng-template",null,0,T),t()()}if(a&2){let e=F(42),r=s();l(7),c("ngIf",r.showFolderForm),l(),h("active",r.selectedFolder===""),l(6),g(r.workflows.length),l(),c("ngForOf",r.folders),l(),c("queryParams",k(15,X,r.selectedFolder||null)),l(8),c("ngForOf",r.breadcrumbs),l(2),y("",r.visibleWorkflows.length," workflow",r.visibleWorkflows.length===1?"":"s"),l(),w("ngModel",r.searchQuery),l(10),c("ngForOf",r.visibleWorkflows)("ngForTrackBy",r.trackWorkflow),l(),c("ngIf",!r.visibleWorkflows.length),l(2),c("ngIf",r.selectedWorkflow)("ngIfElse",e)}}var U=class a{api=P(K);router=P(A);workflows=[];folderPaths=[];providers=[];loading=!0;loadError="";selectedFolder="";selectedWorkflow;searchQuery="";runArgs="";runProvider="";runModel="";running=!1;runError="";showFolderForm=!1;newFolderName="";creatingFolder=!1;folderError="";ngOnInit(){S({workflows:this.api.getWorkflows(),folders:this.api.getWorkflowFolders(),providers:this.api.getProviders().pipe(E(()=>O({providers:[]})))}).subscribe({next:i=>{this.workflows=i.workflows,this.folderPaths=i.folders,this.providers=i.providers.providers??[],this.loading=!1},error:i=>{this.loadError=i?.error?.error??"Failed to load workflows.",this.loading=!1}})}get runModelOptions(){return this.runProvider?this.providers.find(i=>i.name===this.runProvider)?.defaultModels??[]:[...new Set(this.providers.flatMap(i=>i.defaultModels))]}onRunProviderChange(){this.runModel&&!this.runModelOptions.includes(this.runModel)&&(this.runModel="")}get folders(){let i=new Set(this.folderPaths);for(let e of this.workflows){let r=e.directory.split("/").filter(Boolean);r.forEach((d,p)=>i.add(r.slice(0,p+1).join("/")))}return[...i].sort().map(e=>({path:e,name:e.slice(e.lastIndexOf("/")+1),depth:e.split("/").length-1,count:this.workflows.filter(r=>r.directory===e||r.directory.startsWith(`${e}/`)).length}))}get breadcrumbs(){let i=this.selectedFolder.split("/").filter(Boolean);return i.map((e,r)=>({name:e,path:i.slice(0,r+1).join("/")}))}get visibleWorkflows(){let i=this.searchQuery.trim().toLowerCase();return this.workflows.filter(e=>{let r=!this.selectedFolder||e.directory===this.selectedFolder,d=!i||`${e.name} ${e.id} ${e.description}`.toLowerCase().includes(i);return r&&d})}selectFolder(i){this.selectedFolder=i,this.selectedWorkflow=void 0,this.runError=""}createFolder(){let i=this.newFolderName.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");if(!i){this.folderError="Enter a valid folder name.";return}let e=this.selectedFolder?`${this.selectedFolder}/${i}`:i;this.creatingFolder=!0,this.folderError="",this.api.createWorkflowFolder(e).subscribe({next:()=>{this.creatingFolder=!1,this.folderPaths=[...new Set([...this.folderPaths,e])].sort(),this.selectFolder(e),this.cancelFolder()},error:r=>{this.creatingFolder=!1,this.folderError=r?.error?.error??"Failed to create folder."}})}cancelFolder(){this.showFolderForm=!1,this.newFolderName="",this.folderError=""}selectWorkflow(i){this.selectedWorkflow=i,this.runError=""}trackWorkflow(i,e){return e.id}runSelected(){!this.selectedWorkflow||this.running||(this.running=!0,this.api.startRun(this.selectedWorkflow.id,this.runArgs,{provider:this.runProvider||void 0,model:this.runModel||void 0}).subscribe({next:i=>this.router.navigate(["/runs",i.runId]),error:i=>{this.running=!1,this.runError=i?.error?.error??"Failed to start workflow."}}))}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=W({type:a,selectors:[["app-workflows"]],decls:14,vars:6,consts:[["noSelection",""],[1,"page"],[1,"page-header"],["routerLink","/workflows/builder",1,"primary-button",3,"queryParams"],["class","state",4,"ngIf"],["class","state error",4,"ngIf"],["class","explorer",4,"ngIf"],[1,"state"],[1,"state","error"],[1,"explorer"],[1,"folder-panel"],[1,"folder-heading"],[1,"panel-heading"],["type","button","title","Create subfolder",3,"click"],["class","folder-form",3,"ngSubmit",4,"ngIf"],["type","button",1,"folder-row","root",3,"click"],[1,"chevron"],["type","button","class","folder-row",3,"active","padding-left","click",4,"ngFor","ngForOf"],["routerLink","/workflows/builder",1,"folder-new-flow",3,"queryParams"],[1,"content-panel"],[1,"content-toolbar"],["aria-label","Workflow folder",1,"breadcrumb"],["type","button",3,"click"],[4,"ngFor","ngForOf"],["type","search","placeholder","Search this workspace",3,"ngModelChange","ngModel"],[1,"column-head"],["class","workflow-row",3,"selected","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","empty",4,"ngIf"],[1,"run-panel"],[4,"ngIf","ngIfElse"],[1,"folder-form",3,"ngSubmit"],["name","folderName","placeholder","folder-name","autofocus","",3,"ngModelChange","ngModel"],["type","submit",3,"disabled"],[4,"ngIf"],["type","button",1,"folder-row",3,"click"],[1,"workflow-row",3,"click"],[1,"workflow-name"],[1,"file-icon"],[1,"node-count"],[1,"row-actions"],["routerLink","/workflows/detail",3,"click","queryParams"],[1,"empty"],[1,"namespace"],["for","run-args"],["id","run-args","placeholder","Optional run args",3,"ngModelChange","ngModel","disabled"],["type","button",1,"run-button",3,"click","disabled"],["routerLink","/workflows/detail",1,"details-button",3,"queryParams"],["class","run-error",4,"ngIf"],["for","run-provider"],["id","run-provider",1,"run-select",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value","disabled",4,"ngFor","ngForOf"],["for","run-model"],["id","run-model",1,"run-select",3,"ngModelChange","ngModel","disabled"],[3,"value",4,"ngFor","ngForOf"],[3,"value","disabled"],[3,"value"],[1,"run-error"]],template:function(e,r){e&1&&(n(0,"section",1)(1,"header",2)(2,"div")(3,"h1"),o(4,"Workflows"),t(),n(5,"p"),o(6,"Browse workflow definitions by their directory structure."),t()(),n(7,"a",3)(8,"span"),o(9,"+"),t(),o(10," New workflow"),t()(),u(11,te,2,0,"div",4)(12,ne,2,1,"div",5)(13,_e,43,17,"div",6),t()),e&2&&(l(7),c("queryParams",k(4,X,r.selectedFolder||null)),l(4),c("ngIf",r.loading),l(),c("ngIf",r.loadError),l(),c("ngIf",!r.loading&&!r.loadError))},dependencies:[L,z,N,H,Q,J,Y,B,G,j,q,D,$,R],styles:["[_nghost-%COMP%]{display:block;min-height:calc(100vh - 56px);background:#101114;color:#e7e7ea}.page[_ngcontent-%COMP%]{padding:22px;max-width:1600px;margin:auto}.page-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.page-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:21px;margin:0}.page-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .content-toolbar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13px;color:#8f96a3;margin:4px 0 0}.primary-button[_ngcontent-%COMP%], .details-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;background:#6366f1;color:#fff;text-decoration:none;padding:9px 12px;border-radius:6px;font-size:13px;font-weight:700}.explorer[_ngcontent-%COMP%]{display:grid;grid-template-columns:240px minmax(500px,1fr) 280px;min-height:620px;border:1px solid #292c34;border-radius:7px;overflow:hidden;background:#15161a}.folder-panel[_ngcontent-%COMP%], .run-panel[_ngcontent-%COMP%]{background:#131419}.folder-panel[_ngcontent-%COMP%]{border-right:1px solid #292c34;padding:12px 8px}.run-panel[_ngcontent-%COMP%]{border-left:1px solid #292c34;padding:14px}.panel-heading[_ngcontent-%COMP%]{font-size:11px;color:#8f96a3;text-transform:uppercase;font-weight:800;margin:3px 7px 12px}.folder-heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.folder-heading[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:24px;height:24px;border:1px solid #353842;border-radius:4px;background:#202229;color:#fff;cursor:pointer}.folder-form[_ngcontent-%COMP%]{border:1px solid #383b45;background:#191b20;padding:8px;margin-bottom:8px;border-radius:5px}.folder-form[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#777e8b;font-size:10px;overflow-wrap:anywhere}.folder-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;margin:5px 0;border:1px solid #3b3e49;background:#101114;color:#fff;padding:6px;border-radius:4px}.folder-form[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;gap:5px}.folder-form[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:1px solid #3b3e49;background:#252731;color:#ddd;padding:4px 6px;border-radius:4px;font-size:10px}.folder-form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fca5a5;font-size:10px;margin:6px 0 0}.folder-new-flow[_ngcontent-%COMP%]{display:block;color:#a5b4fc;text-decoration:none;font-size:11px;padding:9px 12px;border-top:1px solid #292c34;margin-top:8px}.folder-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:16px minmax(0,1fr) auto;gap:7px;align-items:center;width:100%;height:34px;border:0;border-radius:5px;background:transparent;color:#b7bbc4;text-align:left;cursor:pointer;padding-right:9px}.folder-row[_ngcontent-%COMP%]:hover, .folder-row.active[_ngcontent-%COMP%]{background:#242630;color:#fff}.folder-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:10px;color:#6f7684}.chevron[_ngcontent-%COMP%]{color:#7c83ff}.content-panel[_ngcontent-%COMP%]{min-width:0;padding:0 16px 20px}.content-toolbar[_ngcontent-%COMP%]{min-height:72px;display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #292c34}.breadcrumb[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.breadcrumb[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;background:transparent;color:#949ba8;padding:0;cursor:pointer;font-weight:600}.breadcrumb[_ngcontent-%COMP%] button.current[_ngcontent-%COMP%]{color:#fff}.breadcrumb[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#555b67}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .run-panel[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;border:1px solid #343741;background:#101114;color:#eee;border-radius:5px;padding:8px 10px;outline:none}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:260px}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .run-panel[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:#6366f1}.column-head[_ngcontent-%COMP%], .workflow-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(220px,1.4fr) 60px minmax(150px,.8fr) 120px;gap:12px;align-items:center}.column-head[_ngcontent-%COMP%]{height:38px;color:#707784;font-size:10px;text-transform:uppercase;font-weight:800}.workflow-row[_ngcontent-%COMP%]{min-height:68px;border-top:1px solid #25272e;padding:10px 0;cursor:pointer}.workflow-row[_ngcontent-%COMP%]:hover, .workflow-row.selected[_ngcontent-%COMP%]{background:#1b1d23}.workflow-name[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;min-width:0;padding-left:8px}.workflow-name[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-width:0}.file-icon[_ngcontent-%COMP%]{display:grid;place-items:center;flex:0 0 28px;width:28px;height:32px;border:1px solid #4b4f5c;border-radius:4px;color:#a5b4fc;font-size:11px;font-weight:900}.workflow-name[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;font-size:13px;overflow-wrap:anywhere}.workflow-name[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:4px 0 0;color:#777e8b;font-size:11px;line-height:1.4;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.node-count[_ngcontent-%COMP%]{color:#aeb4bf;font-size:12px}.workflow-row[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:10px;color:#777e8b;overflow:hidden;text-overflow:ellipsis}.row-actions[_ngcontent-%COMP%]{display:flex;gap:6px}.row-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:1px solid #383b45;background:#202229;color:#c9ccd3;border-radius:4px;padding:5px 7px;text-decoration:none;font:inherit;font-size:11px;cursor:pointer}.run-panel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px;margin:7px 0}.run-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#9299a5;font-size:12px;line-height:1.5}.namespace[_ngcontent-%COMP%]{font:10px ui-monospace,monospace;color:#818cf8;overflow-wrap:anywhere}.run-panel[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{border-top:1px solid #292c34;border-bottom:1px solid #292c34;padding:8px 0;margin:14px 0}.run-panel[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:11px;padding:4px 0}.run-panel[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:#777e8b}.run-panel[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;max-width:170px;overflow-wrap:anywhere;text-align:right}.run-panel[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;font-size:10px;text-transform:uppercase;color:#8f96a3;font-weight:700;margin:12px 0 6px}.run-panel[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:first-of-type{margin-top:0}.run-panel[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.run-select[_ngcontent-%COMP%]{display:block;width:100%;box-sizing:border-box;border:1px solid #343741;background:#101114;color:#eee;border-radius:5px;padding:8px 10px;outline:none}.run-select[_ngcontent-%COMP%]:focus{border-color:#6366f1}.run-select[_ngcontent-%COMP%]:disabled{opacity:.55}.run-button[_ngcontent-%COMP%], .details-button[_ngcontent-%COMP%]{width:100%;justify-content:center;box-sizing:border-box;margin-top:9px;border:0}.run-button[_ngcontent-%COMP%]{background:#059669;color:#fff;padding:9px;border-radius:5px;font-weight:700;cursor:pointer}.run-button[_ngcontent-%COMP%]:disabled{opacity:.5}.details-button[_ngcontent-%COMP%]{background:#242630}.run-error[_ngcontent-%COMP%], .state.error[_ngcontent-%COMP%]{color:#fecaca}.run-error[_ngcontent-%COMP%]{font-size:11px;margin-top:10px}.state[_ngcontent-%COMP%], .empty[_ngcontent-%COMP%]{border:1px solid #292c34;padding:18px;color:#949ba8;border-radius:6px}.empty[_ngcontent-%COMP%]{text-align:center;margin-top:12px}.state[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#0b0c0f;padding:2px 5px}@media(max-width:1100px){.explorer[_ngcontent-%COMP%]{grid-template-columns:210px 1fr}.run-panel[_ngcontent-%COMP%]{display:none}}@media(max-width:720px){.page[_ngcontent-%COMP%]{padding:14px}.page-header[_ngcontent-%COMP%]{align-items:flex-start}.explorer[_ngcontent-%COMP%]{display:block}.folder-panel[_ngcontent-%COMP%]{border-right:0;border-bottom:1px solid #292c34}.content-toolbar[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;padding:14px 0}.content-toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.column-head[_ngcontent-%COMP%]{display:none}.workflow-row[_ngcontent-%COMP%]{grid-template-columns:1fr auto}.workflow-row[_ngcontent-%COMP%] > code[_ngcontent-%COMP%], .node-count[_ngcontent-%COMP%]{display:none}}"]})};export{U as WorkflowsComponent};
|