ai-engineering-loop 1.6.0 → 1.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 +5 -37
- package/bin/ai-engineering-loop.js +2 -2
- package/core/local-workflow-studio.md +17 -4
- package/docs/images/engineering-loop-overview.svg +114 -0
- package/lib/recipe-builder.js +1 -0
- package/lib/runtime-files.js +1 -0
- package/lib/studio-layout.js +113 -0
- package/lib/studio-server.js +49 -1
- package/package.json +2 -1
- package/studio/app.js +610 -143
- package/studio/index.html +78 -14
- package/studio/styles.css +35 -74
package/studio/index.html
CHANGED
|
@@ -7,25 +7,89 @@
|
|
|
7
7
|
<link rel="stylesheet" href="/styles.css">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
|
-
<header
|
|
11
|
-
<
|
|
12
|
-
<
|
|
10
|
+
<header class="appbar">
|
|
11
|
+
<b class="mark">A</b>
|
|
12
|
+
<select id="recipe" aria-label="Workflow"></select>
|
|
13
|
+
<button id="workflow-settings" class="quiet">Workflow settings</button>
|
|
14
|
+
<span id="run-summary" class="run-summary">No active run</span>
|
|
15
|
+
<span class="secure">● Local</span>
|
|
16
|
+
<button id="toggle-execution" class="quiet">Executions</button>
|
|
17
|
+
<details class="more-menu">
|
|
18
|
+
<summary aria-label="More actions">•••</summary>
|
|
19
|
+
<div><button id="copy">Copy developer brief</button><button id="download">Export agent handoff</button></div>
|
|
20
|
+
</details>
|
|
21
|
+
<button class="primary" id="review">Save workflow</button>
|
|
13
22
|
</header>
|
|
14
23
|
<main>
|
|
15
|
-
<
|
|
16
|
-
<
|
|
24
|
+
<nav class="rail" aria-label="Workflow tools">
|
|
25
|
+
<button id="toggle-library" class="add-node" title="Add node" aria-label="Add node">+</button>
|
|
26
|
+
<button id="fit-view-rail" title="Fit workflow" aria-label="Fit workflow">⌗</button>
|
|
27
|
+
<span></span>
|
|
28
|
+
<output id="integrity" title="Graph integrity">…</output>
|
|
29
|
+
</nav>
|
|
30
|
+
|
|
31
|
+
<aside class="library" id="library-panel">
|
|
32
|
+
<div class="panel-head"><div><h2>Add a node</h2><p>Drag onto the canvas or click to add.</p></div><button id="close-library" aria-label="Close">×</button></div>
|
|
33
|
+
<div id="palette"></div>
|
|
17
34
|
</aside>
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
|
|
36
|
+
<section class="canvas" id="canvas" tabindex="0" aria-label="Workflow canvas">
|
|
37
|
+
<div class="canvas-toolbar" aria-label="Canvas controls">
|
|
38
|
+
<button id="undo" title="Undo (Ctrl/Cmd+Z)">↶</button>
|
|
39
|
+
<button id="redo" title="Redo (Ctrl/Cmd+Shift+Z)">↷</button>
|
|
40
|
+
<span></span>
|
|
41
|
+
<button id="auto-layout">Tidy up</button>
|
|
42
|
+
<button id="fit-view">Fit</button>
|
|
43
|
+
<button id="zoom-out" aria-label="Zoom out">−</button>
|
|
44
|
+
<output id="zoom-level">100%</output>
|
|
45
|
+
<button id="zoom-in" aria-label="Zoom in">+</button>
|
|
46
|
+
</div>
|
|
47
|
+
<div id="scene">
|
|
48
|
+
<svg id="edges" aria-hidden="true">
|
|
49
|
+
<defs>
|
|
50
|
+
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse">
|
|
51
|
+
<path d="M 0 0 L 10 5 L 0 10 z"></path>
|
|
52
|
+
</marker>
|
|
53
|
+
</defs>
|
|
54
|
+
<g id="edge-paths"></g>
|
|
55
|
+
<path id="preview-edge"></path>
|
|
56
|
+
</svg>
|
|
57
|
+
<div id="nodes"></div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="canvas-help"><kbd>Space</kbd> pan · scroll move · <kbd>Ctrl/⌘</kbd> + scroll zoom · <kbd>Del</kbd> remove</div>
|
|
60
|
+
<button id="quick-add" class="quick-add" aria-label="Add node">+</button>
|
|
61
|
+
</section>
|
|
62
|
+
|
|
63
|
+
<aside class="inspector" id="inspector-panel">
|
|
64
|
+
<div class="panel-head"><div><small id="inspector-label">NODE</small><h2 id="inspector-title">Settings</h2></div><button id="close-inspector" aria-label="Close">×</button></div>
|
|
65
|
+
<div id="details"></div>
|
|
26
66
|
</aside>
|
|
67
|
+
|
|
68
|
+
<aside class="execution-panel" id="execution-panel">
|
|
69
|
+
<div class="panel-head"><div><small>LIVE EXECUTION</small><h2 id="active-stage">No active run</h2></div><button id="close-execution" aria-label="Close">×</button></div>
|
|
70
|
+
<p id="activity">Waiting for a recipe-bound workflow.</p>
|
|
71
|
+
<div class="budget-line"><span>Context budget</span><span class="mono" id="budget">—</span></div>
|
|
72
|
+
<div class="meter"><i id="meter"></i></div>
|
|
73
|
+
<details>
|
|
74
|
+
<summary>Evidence stream</summary>
|
|
75
|
+
<div id="events"></div>
|
|
76
|
+
</details>
|
|
77
|
+
<details>
|
|
78
|
+
<summary>Record a decision</summary>
|
|
79
|
+
<input id="decision-summary" maxlength="160" placeholder="What was decided?">
|
|
80
|
+
<textarea id="decision-rationale" maxlength="1000" placeholder="Why?"></textarea>
|
|
81
|
+
<button id="record-decision">Record decision</button>
|
|
82
|
+
</details>
|
|
83
|
+
</aside>
|
|
84
|
+
<div id="message"></div>
|
|
27
85
|
</main>
|
|
28
|
-
<dialog id="confirm"
|
|
86
|
+
<dialog id="confirm">
|
|
87
|
+
<h2>Save workflow?</h2>
|
|
88
|
+
<pre id="review-data"></pre>
|
|
89
|
+
<p>Only validated workflows can be installed. Built-in workflows are saved as a fork.</p>
|
|
90
|
+
<button id="cancel">Cancel</button>
|
|
91
|
+
<button class="primary" id="install">Save</button>
|
|
92
|
+
</dialog>
|
|
29
93
|
<script type="module" src="/app.js"></script>
|
|
30
94
|
</body>
|
|
31
95
|
</html>
|
package/studio/styles.css
CHANGED
|
@@ -1,75 +1,36 @@
|
|
|
1
|
-
:root{color-scheme:dark;--bg:#
|
|
1
|
+
:root{color-scheme:dark;--bg:#18181b;--canvas:#202024;--panel:#242428;--raised:#2c2c31;--line:#3a3a40;--muted:#9a9aa4;--text:#f3f3f5;--accent:#ff6d5a;--ok:#48c78e;--danger:#ef6262}
|
|
2
2
|
*{box-sizing:border-box}
|
|
3
|
-
body{margin:0;background:var(--bg);color:var(--text);font:
|
|
4
|
-
button,select,input,textarea{font:inherit}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
button:
|
|
14
|
-
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
.canvas-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.
|
|
36
|
-
.
|
|
37
|
-
.node h3{margin:13px 0 10px;font-size:14px}
|
|
38
|
-
.node small{margin:0}
|
|
39
|
-
.node-activity{margin:10px 0 0;color:#d9a18f;font:10px/1.4 ui-monospace,monospace}
|
|
40
|
-
.status{font:10px ui-monospace,monospace;color:var(--muted)}
|
|
41
|
-
.running .status{color:#ff7958}
|
|
42
|
-
.passed .status{color:var(--ok)}
|
|
43
|
-
.failed .status{color:var(--danger)}
|
|
44
|
-
#edges{position:absolute;inset:0;min-width:100%;min-height:100%;pointer-events:none}
|
|
45
|
-
#arrow path{fill:#505761}
|
|
46
|
-
.edge{fill:none;stroke:#505761;stroke-width:2}
|
|
47
|
-
.edge.active{stroke:var(--hot);stroke-width:3;stroke-dasharray:9 11;animation:flow .8s linear infinite;filter:drop-shadow(0 0 4px #ff5b35)}
|
|
48
|
-
@keyframes flow{to{stroke-dashoffset:-20}}
|
|
49
|
-
#palette{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}
|
|
50
|
-
.palette-item{padding:12px 10px;background:#15171b;border:1px solid #30343a;border-radius:4px;color:#d5d2cc}
|
|
51
|
-
.palette-item b{display:block;margin-bottom:7px}
|
|
52
|
-
.palette-item small{font-size:8px}
|
|
53
|
-
.inspector label{margin:8px 0 15px}
|
|
54
|
-
.inspector h2{font-size:16px}
|
|
55
|
-
.inspector section{border-top:1px solid var(--line);margin-top:26px;padding-top:20px}
|
|
56
|
-
.inspector input,.inspector textarea,.inspector select{width:100%;background:#17191e;color:var(--text);border:1px solid #343840;padding:10px;margin:5px 0 13px}
|
|
57
|
-
.inspector textarea{height:80px;resize:vertical}
|
|
58
|
-
.inspector select[multiple]{height:86px}
|
|
59
|
-
.source-line{display:flex;justify-content:space-between;color:#90969e;font:10px ui-monospace,monospace;margin:14px 0}
|
|
60
|
-
.hint{border-left:2px solid var(--hot);padding:8px;color:#aaa49c;line-height:1.5}
|
|
61
|
-
.meter{height:7px;background:#292d33;border-radius:4px}
|
|
62
|
-
.meter i{display:block;height:100%;width:0;background:var(--hot);border-radius:4px;transition:width .3s}
|
|
63
|
-
.mono,#events{font:10px ui-monospace,monospace;color:#8d939b;line-height:2}
|
|
64
|
-
#events p{margin:2px 0}
|
|
65
|
-
.event-active{color:#ff7958}
|
|
66
|
-
#integrity{display:block;margin-top:14px;font:11px/1.6 ui-monospace,monospace}
|
|
67
|
-
.valid{color:var(--ok)}
|
|
68
|
-
.invalid{color:var(--danger)}
|
|
69
|
-
#message{position:sticky;bottom:0;background:#181b20;border-left:2px solid var(--hot);margin-top:20px;padding:12px;display:none}
|
|
70
|
-
dialog{border:1px solid #3a3f46;background:#121418;color:var(--text);width:560px;padding:26px}
|
|
71
|
-
dialog::backdrop{background:#000b}
|
|
72
|
-
dialog pre{max-height:340px;overflow:auto;background:#0b0d10;padding:14px;color:#aeb4bb}
|
|
73
|
-
dialog button{float:right;margin-left:8px}
|
|
74
|
-
@media(max-width:1000px){main{grid-template-columns:1fr}.library,.inspector{display:none}header .secure,header>div{display:none}}
|
|
75
|
-
@media(prefers-reduced-motion:reduce){.edge.active{animation:none}.node,.meter i{transition:none}}
|
|
3
|
+
body{margin:0;background:var(--bg);color:var(--text);font:13px Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden}
|
|
4
|
+
button,select,input,textarea{font:inherit;color:inherit}
|
|
5
|
+
button{border:1px solid var(--line);border-radius:6px;background:var(--raised);padding:8px 12px;cursor:pointer}button:hover{background:#35353b}button:disabled{opacity:.35;cursor:not-allowed}
|
|
6
|
+
.primary{background:var(--accent);border-color:var(--accent);color:#171719;font-weight:650}.primary:hover{background:#ff806f}
|
|
7
|
+
.quiet{background:transparent;border-color:transparent;color:#c4c4ca}.quiet:hover{background:var(--raised)}
|
|
8
|
+
.appbar{height:56px;display:flex;align-items:center;gap:8px;padding:0 14px;border-bottom:1px solid var(--line);background:#1d1d20;position:relative;z-index:30}
|
|
9
|
+
.mark{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;background:var(--accent);color:#18181b;font-size:17px}
|
|
10
|
+
.appbar select{width:230px;background:transparent;border:0;border-radius:5px;padding:8px;font-weight:600}.appbar select:hover{background:var(--raised)}
|
|
11
|
+
.run-summary{margin:auto;color:var(--muted);font-size:12px}.secure{color:var(--ok);font-size:11px}
|
|
12
|
+
.more-menu{position:relative}.more-menu summary{list-style:none;padding:8px 10px;border-radius:6px;cursor:pointer;font-weight:700}.more-menu summary:hover{background:var(--raised)}
|
|
13
|
+
.more-menu>div{position:absolute;right:0;top:40px;width:210px;padding:6px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 16px 40px #0008}.more-menu button{display:block;width:100%;border:0;text-align:left;background:transparent}
|
|
14
|
+
main{height:calc(100vh - 56px);position:relative}.canvas{position:absolute;inset:0 0 0 56px;overflow:hidden;outline:none;background-color:var(--canvas);background-image:radial-gradient(#45454c 1px,transparent 1px);background-size:24px 24px;cursor:grab;touch-action:none}.canvas:active{cursor:grabbing}.canvas.drop-ready{box-shadow:inset 0 0 0 2px var(--accent)}
|
|
15
|
+
.rail{position:absolute;z-index:20;inset:0 auto 0 0;width:56px;padding:12px 8px;border-right:1px solid var(--line);background:#1d1d20;display:flex;flex-direction:column;align-items:center;gap:10px}.rail button{width:38px;height:38px;padding:0;font-size:18px}.rail .add-node,.quick-add{border:0;border-radius:50%;background:var(--accent);color:#171719;font-size:26px}.rail span{flex:1}.rail output{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:0;background:var(--muted)}.rail output.valid{background:var(--ok)}.rail output.invalid{background:var(--danger)}
|
|
16
|
+
.library,.inspector,.execution-panel{position:absolute;z-index:25;background:var(--panel);border:1px solid var(--line);box-shadow:0 16px 50px #0008}
|
|
17
|
+
.library{left:66px;top:10px;bottom:10px;width:300px;border-radius:10px;transform:translateX(-380px);transition:transform .18s ease;overflow:auto}.library.open{transform:translateX(0)}
|
|
18
|
+
.inspector{right:10px;top:10px;bottom:10px;width:360px;border-radius:10px;transform:translateX(390px);transition:transform .18s ease;overflow:auto}.inspector.open{transform:translateX(0)}
|
|
19
|
+
.execution-panel{right:10px;bottom:10px;width:390px;max-height:calc(100% - 20px);border-radius:10px;padding:18px;transform:translateY(calc(100% + 20px));transition:transform .18s ease;overflow:auto}.execution-panel.open{transform:translateY(0)}
|
|
20
|
+
.panel-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;padding:18px;background:var(--panel);border-bottom:1px solid var(--line)}.panel-head h2{margin:3px 0 0;font-size:18px}.panel-head p{margin:6px 0 0;color:var(--muted)}.panel-head button{border:0;background:transparent;font-size:20px;padding:2px 7px}
|
|
21
|
+
small,label{display:block;color:var(--muted);font-size:11px;margin:4px 0 6px}
|
|
22
|
+
#palette{padding:10px}.palette-item{display:flex;align-items:center;justify-content:space-between;width:100%;padding:13px;margin:0 0 6px;background:transparent;border-color:transparent;text-align:left}.palette-item:hover{background:var(--raised)}.palette-item b{font-weight:550}.palette-item small{margin:0;font-size:10px}
|
|
23
|
+
.canvas-toolbar{position:absolute;z-index:10;left:14px;bottom:14px;display:flex;align-items:center;gap:3px;padding:5px;background:#29292edb;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px #0006}.canvas-toolbar button{border:0;background:transparent;padding:7px 9px}.canvas-toolbar button:hover{background:#3a3a40}.canvas-toolbar span{height:20px;width:1px;background:var(--line);margin:0 4px}.canvas-toolbar output{width:44px;text-align:center;color:var(--muted);font-size:11px}
|
|
24
|
+
#scene{position:absolute;inset:0;transform-origin:0 0;will-change:transform}#nodes,#edges{position:absolute;inset:0;width:1px;height:1px;overflow:visible}
|
|
25
|
+
.node{position:absolute;width:224px;min-height:104px;padding:16px 18px;background:#303036f5;border:1px solid #4a4a52;border-radius:9px;cursor:grab;z-index:2;user-select:none;box-shadow:0 7px 18px #0005;transition:border-color .12s,box-shadow .12s}.node:hover{border-color:#777781}.node.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),0 12px 28px #0008}.node.dragging{cursor:grabbing;transition:none}.node.running{border:2px solid var(--accent);box-shadow:0 0 20px #ff6d5a33}.node.passed{border-left:4px solid var(--ok)}.node.failed{border-color:var(--danger)}.node.blocked{opacity:.58}
|
|
26
|
+
.node h3{margin:11px 0 9px;font-size:14px}.node small{font-size:9px;margin:0;color:#aaaab3}.status{font:10px ui-monospace,monospace;color:var(--muted)}.running .status{color:var(--accent)}.passed .status{color:var(--ok)}.failed .status{color:var(--danger)}.node-activity{margin:9px 0 0;color:#ffb0a5;font:10px/1.4 ui-monospace,monospace}
|
|
27
|
+
.port{position:absolute;top:46px;width:14px;height:14px;padding:0;border:2px solid #8a8a95;border-radius:50%;background:#303036;z-index:4}.port:hover{border-color:var(--accent);background:var(--accent)}.port-in{left:-8px}.port-out{right:-8px;cursor:crosshair}
|
|
28
|
+
#edges{pointer-events:none}#arrow path{fill:#777780}.edge{fill:none;stroke:#777780;stroke-width:2;vector-effect:non-scaling-stroke}.edge.active{stroke:var(--accent);stroke-width:3;stroke-dasharray:9 11;animation:flow .8s linear infinite;filter:drop-shadow(0 0 4px var(--accent))}#preview-edge{display:none;fill:none;stroke:var(--accent);stroke-width:2;stroke-dasharray:6 5;vector-effect:non-scaling-stroke}@keyframes flow{to{stroke-dashoffset:-20}}
|
|
29
|
+
.canvas-help{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);color:#8a8a94;font-size:10px;pointer-events:none}.canvas-help kbd{border:1px solid #505058;border-radius:3px;padding:2px 4px;font:inherit}.quick-add{position:absolute;right:22px;bottom:22px;width:48px;height:48px;padding:0;box-shadow:0 8px 24px #0008}
|
|
30
|
+
#details{padding:18px}#details input,#details textarea,#details select,.execution-panel input,.execution-panel textarea{width:100%;padding:10px 11px;margin:0 0 14px;border:1px solid var(--line);border-radius:6px;background:#1d1d21}#details textarea,.execution-panel textarea{min-height:72px;resize:vertical}#details select[multiple]{height:76px}
|
|
31
|
+
#details details,.execution-panel details{border-top:1px solid var(--line);margin:15px 0;padding-top:14px}summary{cursor:pointer;color:#d5d5da}.settings-body{padding-top:14px}.source-line{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin-bottom:16px}.hint{border-left:2px solid var(--accent);padding:8px 10px;color:#b5b5bd;line-height:1.45}.button-row{display:flex;gap:7px}.button-row button{flex:1}.danger{color:#ff9999}
|
|
32
|
+
.adapter-controls{margin:12px 0}.budget-line{display:flex;justify-content:space-between;margin-top:20px;color:var(--muted)}.meter{height:6px;background:#38383e;border-radius:5px;margin:9px 0 15px}.meter i{display:block;height:100%;width:0;background:var(--accent);border-radius:5px}.mono,#events{font:10px/1.8 ui-monospace,monospace;color:var(--muted)}#events p{margin:2px 0}.event-active{color:var(--accent)}
|
|
33
|
+
#message{position:absolute;z-index:40;right:20px;bottom:20px;max-width:380px;background:#333339;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:6px;padding:12px 15px;box-shadow:0 12px 36px #0008;display:none}
|
|
34
|
+
dialog{border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);width:520px;padding:24px}dialog::backdrop{background:#000a}dialog pre{max-height:320px;overflow:auto;background:#1b1b1f;padding:14px;border-radius:6px;color:#bdbdc5}dialog button{float:right;margin-left:8px}
|
|
35
|
+
@media(max-width:900px){.run-summary,.secure,#workflow-settings{display:none}.inspector{width:min(360px,calc(100% - 76px))}.library{width:min(300px,calc(100% - 76px))}.canvas-help{display:none}}
|
|
36
|
+
@media(prefers-reduced-motion:reduce){.edge.active{animation:none}.library,.inspector,.execution-panel,.node{transition:none}}
|