@cluesmith/codev 2.0.0-rc.44 → 2.0.0-rc.47
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/dashboard/dist/assets/{index-CBmNW791.js → index-VvUWRPNP.js} +17 -17
- package/dashboard/dist/assets/index-VvUWRPNP.js.map +1 -0
- package/dashboard/dist/index.html +2 -1
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +27 -0
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/servers/dashboard-server.js +6 -1
- package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +1 -1
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/package.json +1 -1
- package/templates/tower.html +48 -6
- package/dashboard/dist/assets/index-CBmNW791.js.map +0 -1
package/package.json
CHANGED
package/templates/tower.html
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
7
7
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
8
8
|
<meta name="theme-color" content="#252525">
|
|
9
|
-
<
|
|
9
|
+
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🗼</text></svg>">
|
|
10
|
+
<title>Agent Farm Tower</title>
|
|
10
11
|
<style>
|
|
11
12
|
* {
|
|
12
13
|
box-sizing: border-box;
|
|
@@ -1125,20 +1126,20 @@
|
|
|
1125
1126
|
const statusText = instance.running ? 'Running' : 'Stopped';
|
|
1126
1127
|
const hasGate = instance.gateStatus?.hasGate;
|
|
1127
1128
|
|
|
1128
|
-
// Render terminals list - always show
|
|
1129
|
+
// Render terminals list - always show Overview first, then individual terminals
|
|
1129
1130
|
const terminals = instance.terminals || [];
|
|
1130
1131
|
let terminalsHtml = '';
|
|
1131
1132
|
|
|
1132
1133
|
if (instance.running) {
|
|
1133
|
-
// Always show
|
|
1134
|
+
// Always show Overview link first (opens split view with Architect + Status panel)
|
|
1134
1135
|
terminalsHtml = `
|
|
1135
1136
|
<div class="port-item">
|
|
1136
1137
|
<div class="port-info">
|
|
1137
1138
|
<span class="port-status active"></span>
|
|
1138
|
-
<span class="port-type">
|
|
1139
|
+
<span class="port-type">Overview</span>
|
|
1139
1140
|
</div>
|
|
1140
1141
|
<div class="port-actions">
|
|
1141
|
-
<a href="${escapeHtml(instance.proxyUrl)}"
|
|
1142
|
+
<a href="${escapeHtml(instance.proxyUrl)}">Open</a>
|
|
1142
1143
|
</div>
|
|
1143
1144
|
</div>
|
|
1144
1145
|
`;
|
|
@@ -1152,11 +1153,24 @@
|
|
|
1152
1153
|
<span class="port-type">${escapeHtml(terminal.label)}</span>
|
|
1153
1154
|
</div>
|
|
1154
1155
|
<div class="port-actions">
|
|
1155
|
-
<a href="${escapeHtml(terminal.url)}&fullscreen=1"
|
|
1156
|
+
<a href="${escapeHtml(terminal.url)}&fullscreen=1">Open</a>
|
|
1156
1157
|
</div>
|
|
1157
1158
|
</div>
|
|
1158
1159
|
`).join('');
|
|
1159
1160
|
}
|
|
1161
|
+
|
|
1162
|
+
// Add "New Shell" button for this instance
|
|
1163
|
+
terminalsHtml += `
|
|
1164
|
+
<div class="port-item" style="border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 8px;">
|
|
1165
|
+
<div class="port-info">
|
|
1166
|
+
<span class="port-status" style="background: var(--accent);"></span>
|
|
1167
|
+
<span class="port-type">New Shell</span>
|
|
1168
|
+
</div>
|
|
1169
|
+
<div class="port-actions">
|
|
1170
|
+
<button class="btn btn-small" onclick="createShell('${escapeHtml(instance.projectPath)}')">+ Create</button>
|
|
1171
|
+
</div>
|
|
1172
|
+
</div>
|
|
1173
|
+
`;
|
|
1160
1174
|
}
|
|
1161
1175
|
|
|
1162
1176
|
const lastUsed = instance.lastUsed
|
|
@@ -1463,6 +1477,34 @@
|
|
|
1463
1477
|
}
|
|
1464
1478
|
}
|
|
1465
1479
|
|
|
1480
|
+
// Create a new shell for a running instance (via tower proxy)
|
|
1481
|
+
async function createShell(projectPath) {
|
|
1482
|
+
try {
|
|
1483
|
+
// Use tower proxy to route to the project's dashboard API
|
|
1484
|
+
const encodedPath = toBase64URL(projectPath);
|
|
1485
|
+
const response = await authFetch(`/project/${encodedPath}/api/tabs/shell`, {
|
|
1486
|
+
method: 'POST',
|
|
1487
|
+
headers: { 'Content-Type': 'application/json' },
|
|
1488
|
+
});
|
|
1489
|
+
|
|
1490
|
+
if (!response.ok) {
|
|
1491
|
+
const errorText = await response.text();
|
|
1492
|
+
throw new Error(errorText || 'Failed to create shell');
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
const result = await response.json();
|
|
1496
|
+
|
|
1497
|
+
if (result.success === false) {
|
|
1498
|
+
throw new Error(result.error || 'Failed to create shell');
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
showToast(`Shell created: ${result.name || 'shell'}`, 'success');
|
|
1502
|
+
setTimeout(refresh, 1000);
|
|
1503
|
+
} catch (err) {
|
|
1504
|
+
showToast('Failed to create shell: ' + err.message, 'error');
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1466
1508
|
// Format date for display
|
|
1467
1509
|
function formatDate(isoString) {
|
|
1468
1510
|
const date = new Date(isoString);
|