swarmlancer-cli 0.5.0 → 0.5.1
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/app.js +10 -10
- package/dist/screens/banner.js +8 -8
- package/dist/screens/dashboard.d.ts +1 -1
- package/dist/screens/dashboard.js +2 -2
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -182,14 +182,14 @@ async function runAgentConfig(agentId) {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
// ── Swarm screen ──────────────────────────────────────────
|
|
185
|
-
async function
|
|
185
|
+
async function runManageTop() {
|
|
186
186
|
while (true) {
|
|
187
187
|
const action = await new Promise((resolve) => {
|
|
188
188
|
const items = [
|
|
189
|
-
{ value: "
|
|
189
|
+
{ value: "swarm", label: "Swarm", description: "" },
|
|
190
190
|
{ value: "providers", label: "Providers", description: "" },
|
|
191
191
|
];
|
|
192
|
-
const screen = new MenuScreen(tui, "
|
|
192
|
+
const screen = new MenuScreen(tui, "Manage", items);
|
|
193
193
|
screen.onSelect = (v) => resolve(v);
|
|
194
194
|
screen.onBack = () => resolve(null);
|
|
195
195
|
setScreen(screen);
|
|
@@ -197,8 +197,8 @@ async function runSwarm() {
|
|
|
197
197
|
if (!action)
|
|
198
198
|
return;
|
|
199
199
|
switch (action) {
|
|
200
|
-
case "
|
|
201
|
-
await
|
|
200
|
+
case "swarm":
|
|
201
|
+
await runSwarm();
|
|
202
202
|
break;
|
|
203
203
|
case "providers":
|
|
204
204
|
await runProviders();
|
|
@@ -207,7 +207,7 @@ async function runSwarm() {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
// ── Manage screen ─────────────────────────────────────────
|
|
210
|
-
async function
|
|
210
|
+
async function runSwarm() {
|
|
211
211
|
while (true) {
|
|
212
212
|
const agents = getAgents();
|
|
213
213
|
const items = [
|
|
@@ -223,7 +223,7 @@ async function runManage() {
|
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
const action = await new Promise((resolve) => {
|
|
226
|
-
const screen = new MenuScreen(tui, "
|
|
226
|
+
const screen = new MenuScreen(tui, "Swarm", items);
|
|
227
227
|
screen.onSelect = (v) => resolve(v);
|
|
228
228
|
screen.onBack = () => resolve(null);
|
|
229
229
|
setScreen(screen);
|
|
@@ -380,14 +380,14 @@ async function runDashboard() {
|
|
|
380
380
|
setScreen(dashboard);
|
|
381
381
|
});
|
|
382
382
|
switch (action) {
|
|
383
|
-
case "
|
|
383
|
+
case "start": {
|
|
384
384
|
const sure = await confirm("Go online?");
|
|
385
385
|
if (sure)
|
|
386
386
|
await goOnline();
|
|
387
387
|
break;
|
|
388
388
|
}
|
|
389
|
-
case "
|
|
390
|
-
await
|
|
389
|
+
case "manage":
|
|
390
|
+
await runManageTop();
|
|
391
391
|
break;
|
|
392
392
|
case "exit": {
|
|
393
393
|
const sure = await confirm("Exit?");
|
package/dist/screens/banner.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Container, Text, Spacer } from "@mariozechner/pi-tui";
|
|
2
2
|
import { colors } from "../theme.js";
|
|
3
3
|
const BANNER_ART = [
|
|
4
|
-
`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`
|
|
8
|
-
`
|
|
9
|
-
|
|
10
|
-
`
|
|
4
|
+
` █████████ ███`,
|
|
5
|
+
`███ ███ ███`,
|
|
6
|
+
`███ ███`,
|
|
7
|
+
` █████████ ███`,
|
|
8
|
+
` ███ ███`,
|
|
9
|
+
`███ ███ ███`,
|
|
10
|
+
` █████████ ███`,
|
|
11
11
|
];
|
|
12
12
|
export class BannerComponent extends Container {
|
|
13
13
|
constructor() {
|
|
@@ -21,7 +21,7 @@ export class BannerComponent extends Container {
|
|
|
21
21
|
this.addChild(new Text(colors.limeBold(` ${line}`), 1, 0));
|
|
22
22
|
}
|
|
23
23
|
this.addChild(new Spacer(0));
|
|
24
|
-
this.addChild(new Text(colors.gray(" LET THE SWARM BEGIN!"), 1, 0));
|
|
24
|
+
this.addChild(new Text(colors.gray(" [LET THE SWARM BEGIN!]"), 1, 0));
|
|
25
25
|
this.addChild(new Spacer(1));
|
|
26
26
|
}
|
|
27
27
|
invalidate() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Component } from "@mariozechner/pi-tui";
|
|
2
2
|
import type { TUI } from "@mariozechner/pi-tui";
|
|
3
|
-
export type DashboardAction = "
|
|
3
|
+
export type DashboardAction = "start" | "manage" | "exit";
|
|
4
4
|
export declare class DashboardScreen implements Component {
|
|
5
5
|
private container;
|
|
6
6
|
private selectList;
|
|
@@ -2,8 +2,8 @@ import { Container, Text, Spacer, SelectList, matchesKey, Key, } from "@mariozec
|
|
|
2
2
|
import { colors, theme } from "../theme.js";
|
|
3
3
|
import { BannerComponent } from "./banner.js";
|
|
4
4
|
const MENU_ITEMS = [
|
|
5
|
-
{ value: "
|
|
6
|
-
{ value: "
|
|
5
|
+
{ value: "start", label: "Start", description: "" },
|
|
6
|
+
{ value: "manage", label: "Manage", description: "" },
|
|
7
7
|
{ value: "exit", label: "Exit", description: "" },
|
|
8
8
|
];
|
|
9
9
|
export class DashboardScreen {
|