cli-jaw 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/orchestrator/state-machine.js +17 -2
- package/dist/src/orchestrator/state-machine.js.map +1 -1
- package/package.json +1 -1
- package/public/css/orc-state.css +157 -0
- package/public/dist/bundle.js +41 -41
- package/public/dist/bundle.js.map +3 -3
- package/public/img/shark-sprite.png +0 -0
- package/public/index.html +15 -0
- package/public/js/ws.ts +67 -3
|
Binary file
|
package/public/index.html
CHANGED
|
@@ -102,6 +102,21 @@
|
|
|
102
102
|
<span class="theme-switch-knob"></span>
|
|
103
103
|
</button>
|
|
104
104
|
</div>
|
|
105
|
+
<div class="pabc-roadmap" id="pabcRoadmap">
|
|
106
|
+
<div class="shark-runner" id="sharkRunner"></div>
|
|
107
|
+
<div class="pabc-dot future" data-phase="P" id="dot-P">P</div>
|
|
108
|
+
<div class="pabc-connector" id="pabc-conn-0"></div>
|
|
109
|
+
<div class="pabc-dot future" data-phase="A" id="dot-A">A</div>
|
|
110
|
+
<div class="pabc-connector" id="pabc-conn-1"></div>
|
|
111
|
+
<div class="pabc-center">
|
|
112
|
+
<div class="pabc-brand" id="pabcBrand">PABCD</div>
|
|
113
|
+
<div class="pabc-tagline">Ultimate Agent Workflow</div>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="pabc-connector" id="pabc-conn-2"></div>
|
|
116
|
+
<div class="pabc-dot future" data-phase="B" id="dot-B">B</div>
|
|
117
|
+
<div class="pabc-connector" id="pabc-conn-3"></div>
|
|
118
|
+
<div class="pabc-dot future" data-phase="C" id="dot-C">C</div>
|
|
119
|
+
</div>
|
|
105
120
|
<div class="chat-messages" id="chatMessages"></div>
|
|
106
121
|
<div class="typing-indicator" id="typingIndicator">
|
|
107
122
|
<span class="label" data-i18n="status.responding">응답 중</span>
|
package/public/js/ws.ts
CHANGED
|
@@ -28,6 +28,8 @@ interface WsMessage {
|
|
|
28
28
|
content?: string;
|
|
29
29
|
cli?: string;
|
|
30
30
|
delay?: number;
|
|
31
|
+
state?: string;
|
|
32
|
+
title?: string;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
// Agent phase state (populated by agent_status events from orchestrator)
|
|
@@ -83,9 +85,7 @@ export function connect(): void {
|
|
|
83
85
|
import('./features/employees.js').then(m => m.loadEmployees());
|
|
84
86
|
} else if (msg.type === 'orc_state') {
|
|
85
87
|
const allowed = new Set<OrcStateName>(['IDLE', 'P', 'A', 'B', 'C', 'D']);
|
|
86
|
-
const rawState = typeof
|
|
87
|
-
? (msg as unknown as Record<string, string>).state
|
|
88
|
-
: 'IDLE';
|
|
88
|
+
const rawState = typeof msg.state === 'string' ? msg.state : 'IDLE';
|
|
89
89
|
const nextState = allowed.has(rawState as OrcStateName) ? (rawState as OrcStateName) : 'IDLE';
|
|
90
90
|
state.orcState = nextState;
|
|
91
91
|
|
|
@@ -115,6 +115,70 @@ export function connect(): void {
|
|
|
115
115
|
badge.textContent = labels[nextState];
|
|
116
116
|
badge.style.display = nextState === 'IDLE' ? 'none' : 'inline-block';
|
|
117
117
|
}
|
|
118
|
+
|
|
119
|
+
// ─── Roadmap Bar ───
|
|
120
|
+
const PHASES = ['P', 'A', 'B', 'C'] as const;
|
|
121
|
+
const roadmap = document.getElementById('pabcRoadmap');
|
|
122
|
+
const shark = document.getElementById('sharkRunner');
|
|
123
|
+
const brand = document.getElementById('pabcBrand');
|
|
124
|
+
|
|
125
|
+
if (roadmap && shark) {
|
|
126
|
+
if (nextState === 'IDLE') {
|
|
127
|
+
roadmap.classList.remove('visible', 'shimmer-out');
|
|
128
|
+
shark.classList.remove('running');
|
|
129
|
+
} else if (nextState === 'D') {
|
|
130
|
+
// All dots done + shimmer out
|
|
131
|
+
PHASES.forEach(p => {
|
|
132
|
+
const dot = document.getElementById(`dot-${p}`);
|
|
133
|
+
if (dot) { dot.className = 'pabc-dot done'; dot.setAttribute('data-phase', p); }
|
|
134
|
+
});
|
|
135
|
+
for (let i = 0; i < 4; i++) {
|
|
136
|
+
const c = document.getElementById(`pabc-conn-${i}`);
|
|
137
|
+
if (c) c.className = 'pabc-connector done';
|
|
138
|
+
}
|
|
139
|
+
shark.classList.remove('running');
|
|
140
|
+
roadmap.classList.add('shimmer-out');
|
|
141
|
+
setTimeout(() => roadmap.classList.remove('visible', 'shimmer-out'), 1000);
|
|
142
|
+
} else {
|
|
143
|
+
roadmap.classList.remove('shimmer-out');
|
|
144
|
+
roadmap.classList.add('visible');
|
|
145
|
+
shark.classList.add('running');
|
|
146
|
+
|
|
147
|
+
// Update dots & connectors
|
|
148
|
+
const idx = PHASES.indexOf(nextState as typeof PHASES[number]);
|
|
149
|
+
PHASES.forEach((p, pi) => {
|
|
150
|
+
const dot = document.getElementById(`dot-${p}`);
|
|
151
|
+
if (dot) {
|
|
152
|
+
dot.className = `pabc-dot ${pi < idx ? 'done' : pi === idx ? 'active' : 'future'}`;
|
|
153
|
+
dot.setAttribute('data-phase', p);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
for (let i = 0; i < 4; i++) {
|
|
157
|
+
const c = document.getElementById(`pabc-conn-${i}`);
|
|
158
|
+
if (c) c.className = `pabc-connector ${i < idx ? 'done' : ''}`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Move shark along connector
|
|
162
|
+
requestAnimationFrame(() => {
|
|
163
|
+
const barRect = roadmap.getBoundingClientRect();
|
|
164
|
+
const activeDot = document.getElementById(`dot-${nextState}`);
|
|
165
|
+
if (!activeDot) return;
|
|
166
|
+
const conn = document.getElementById(`pabc-conn-${idx}`);
|
|
167
|
+
if (conn && nextState !== 'C') {
|
|
168
|
+
const connRect = conn.getBoundingClientRect();
|
|
169
|
+
shark.style.left = ((connRect.left - barRect.left) + (connRect.width * 0.4) - 18) + 'px';
|
|
170
|
+
} else {
|
|
171
|
+
const dotRect = activeDot.getBoundingClientRect();
|
|
172
|
+
shark.style.left = ((dotRect.left - barRect.left) + (dotRect.width / 2) - 18) + 'px';
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Update brand text with worklog title
|
|
178
|
+
if (brand && msg.title) {
|
|
179
|
+
brand.textContent = msg.title;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
118
182
|
} else if (msg.type === 'new_message' && msg.source === 'telegram') {
|
|
119
183
|
addMessage(msg.role === 'assistant' ? 'agent' : (msg.role || 'user'), msg.content || '');
|
|
120
184
|
}
|