feat: 拆分 CLI 与网页宿主,并在无有效城市时暂停等人确认

将原单体 MAF1 拆成 MAF1(控制台工作流)和 MAF1.Web(可视化编排)。
抽城市失败时暂停:网页弹确认、CLI 控制台询问,超时采用默认结束查询;
也可改填城市后继续。共享决策模型放在 MAF1.Core。
This commit is contained in:
2026-08-28 10:43:57 +08:00
parent 5544788917
commit a3cca78592
42 changed files with 1427 additions and 457 deletions
+335
View File
@@ -0,0 +1,335 @@
:root {
--bg: #0f1419;
--panel: #171e26;
--line: #2a3542;
--text: #e8eef4;
--muted: #8b9aab;
--accent: #4ea1ff;
--file: #3dd6c6;
--weather: #f0b429;
}
* {
box-sizing: border-box;
}
html, body {
margin: 0;
height: 100%;
font-family: "Segoe UI", sans-serif;
background: var(--bg);
color: var(--text);
}
.top {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
border-bottom: 1px solid var(--line);
}
.top h1 {
margin: 0 0 4px;
font-size: 18px;
}
.top p {
margin: 0;
color: var(--muted);
font-size: 13px;
}
.actions {
display: flex;
gap: 8px;
}
button {
background: #243040;
color: var(--text);
border: 1px solid var(--line);
border-radius: 8px;
padding: 8px 14px;
cursor: pointer;
}
button.primary {
background: var(--accent);
color: #061018;
border: 0;
font-weight: 600;
}
main {
display: grid;
grid-template-columns: 220px 1fr 280px;
min-height: calc(100vh - 220px);
}
.palette, .inspector {
background: var(--panel);
padding: 16px;
border-right: 1px solid var(--line);
}
.inspector {
border-right: 0;
border-left: 1px solid var(--line);
}
h2 {
margin: 0 0 10px;
font-size: 14px;
}
.hint {
color: var(--muted);
font-size: 12px;
}
.palette-item .tag {
display: inline-block;
margin-left: 6px;
font-size: 10px;
color: var(--accent);
border: 1px solid var(--line);
border-radius: 999px;
padding: 0 6px;
}
.palette-group {
margin-top: 12px;
color: var(--muted);
font-size: 12px;
}
.issue {
font-size: 11px;
color: #f0b429;
margin: 6px 0;
}
.node.plugin {
border-top: 3px solid #9b8afb;
}
.node.overridden {
opacity: 0.95;
}
.canvas-wrap {
position: relative;
overflow: hidden;
background: radial-gradient(#1c252f 1px, transparent 1px) 0 0 / 18px 18px;
}
#canvas {
position: absolute;
inset: 0;
z-index: 2;
pointer-events: none;
}
#wires {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
z-index: 1;
pointer-events: none;
}
.node {
position: absolute;
width: 240px;
background: #1b2430;
border: 1px solid var(--line);
border-radius: 12px;
pointer-events: auto;
}
.node.selected {
border-color: var(--accent);
}
.node.fileCity {
border-top: 3px solid var(--file);
}
.node.weather {
border-top: 3px solid var(--weather);
}
.node-head {
padding: 10px 12px;
font-weight: 600;
cursor: move;
user-select: none;
}
.ports {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
padding: 0 10px 12px;
}
.port-col {
display: flex;
flex-direction: column;
gap: 6px;
}
.port {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: var(--muted);
}
.port.out {
justify-content: flex-end;
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--accent);
flex: 0 0 10px;
cursor: pointer;
}
.inspector label {
display: block;
font-size: 12px;
color: var(--muted);
margin: 10px 0 4px;
}
.inspector input, .inspector select {
width: 100%;
background: #10161d;
color: var(--text);
border: 1px solid var(--line);
border-radius: 6px;
padding: 8px;
}
.log {
border-top: 1px solid var(--line);
padding: 12px 20px 20px;
}
.log pre {
background: #10161d;
border-radius: 8px;
padding: 12px;
min-height: 80px;
white-space: pre-wrap;
font-size: 12px;
}
.wire {
fill: none;
stroke: var(--accent);
stroke-width: 2;
pointer-events: stroke;
}
.wire.selected {
stroke: var(--weather);
}
.modal {
position: fixed;
inset: 0;
background: rgba(6, 10, 16, 0.72);
display: flex;
align-items: center;
justify-content: center;
z-index: 20;
padding: 20px;
}
.modal.hidden {
display: none;
}
.dialog {
width: min(480px, 100%);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
padding: 18px 18px 16px;
}
.dialog h2 {
margin: 0 0 8px;
font-size: 16px;
}
.dialog p {
margin: 0 0 8px;
font-size: 13px;
line-height: 1.5;
}
.decision-options {
display: flex;
flex-direction: column;
gap: 8px;
margin: 12px 0;
}
.decision-option {
display: block;
background: #10161d;
border: 1px solid var(--line);
border-radius: 8px;
padding: 10px 12px;
cursor: pointer;
}
.decision-option input {
margin-right: 8px;
}
.decision-option.selected {
border-color: var(--accent);
}
.decision-option strong {
display: block;
font-size: 13px;
}
.decision-option span {
display: block;
margin-top: 4px;
color: var(--muted);
font-size: 12px;
}
.dialog input {
width: 100%;
background: #10161d;
color: var(--text);
border: 1px solid var(--line);
border-radius: 6px;
padding: 8px;
margin-bottom: 8px;
}
.dialog-actions {
display: flex;
justify-content: flex-end;
margin-top: 8px;
}
.hidden {
display: none !important;
}