@agentplate/cli 1.2.0 → 1.4.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/CHANGELOG.md +43 -0
- package/package.json +1 -1
- package/src/agents/drive.ts +76 -6
- package/src/agents/turn-runner.test.ts +67 -0
- package/src/agents/turn-runner.ts +18 -1
- package/src/commands/reap.ts +29 -6
- package/src/commands/sling.ts +14 -3
- package/src/commands/stop.ts +43 -6
- package/src/commands/turn.ts +4 -29
- package/src/commands/watch.test.ts +136 -0
- package/src/commands/watch.ts +151 -0
- package/src/config.test.ts +14 -0
- package/src/config.ts +11 -0
- package/src/events/store.test.ts +22 -0
- package/src/events/store.ts +24 -1
- package/src/index.ts +2 -0
- package/src/merge/queue.test.ts +15 -0
- package/src/merge/queue.ts +20 -0
- package/src/runtimes/registry.test.ts +16 -2
- package/src/runtimes/registry.ts +13 -0
- package/src/serve/server.ts +7 -5
- package/src/sessions/purge.test.ts +159 -0
- package/src/sessions/purge.ts +138 -0
- package/src/sessions/reaper.test.ts +84 -2
- package/src/sessions/reaper.ts +73 -32
- package/src/sessions/store.test.ts +18 -0
- package/src/sessions/store.ts +12 -0
- package/src/types.ts +22 -0
- package/src/version.ts +1 -1
- package/src/wizard/setup.ts +74 -0
package/src/wizard/setup.ts
CHANGED
|
@@ -321,6 +321,78 @@ export async function runSetupWizard(currentConfig: AgentplateConfig): Promise<W
|
|
|
321
321
|
);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
// 6b. Advanced limits — gated so the common path stays short.
|
|
325
|
+
const agents = { ...currentConfig.agents };
|
|
326
|
+
const tuneAdvanced = ensure(
|
|
327
|
+
await p.confirm({
|
|
328
|
+
message: "Tune advanced limits (concurrency, timeouts, skip steps)?",
|
|
329
|
+
initialValue: false,
|
|
330
|
+
}),
|
|
331
|
+
);
|
|
332
|
+
if (tuneAdvanced) {
|
|
333
|
+
const posInt = (v: string | undefined): string | undefined =>
|
|
334
|
+
v && Number.isInteger(Number(v)) && Number(v) >= 0 ? undefined : "Enter a whole number ≥ 0";
|
|
335
|
+
agents.maxConcurrent = Number(
|
|
336
|
+
ensure(
|
|
337
|
+
await p.text({
|
|
338
|
+
message: "Max agents running at once",
|
|
339
|
+
initialValue: String(agents.maxConcurrent),
|
|
340
|
+
validate: (v) => (v && Number(v) >= 1 ? undefined : "Enter a number ≥ 1"),
|
|
341
|
+
}),
|
|
342
|
+
),
|
|
343
|
+
);
|
|
344
|
+
agents.maxAgentsPerLead = Number(
|
|
345
|
+
ensure(
|
|
346
|
+
await p.text({
|
|
347
|
+
message: "Max workers per lead",
|
|
348
|
+
initialValue: String(agents.maxAgentsPerLead),
|
|
349
|
+
validate: (v) => (v && Number(v) >= 1 ? undefined : "Enter a number ≥ 1"),
|
|
350
|
+
}),
|
|
351
|
+
),
|
|
352
|
+
);
|
|
353
|
+
agents.turnTimeoutMinutes = Number(
|
|
354
|
+
ensure(
|
|
355
|
+
await p.text({
|
|
356
|
+
message: "Per-turn timeout in minutes (0 = no cap)",
|
|
357
|
+
initialValue: String(agents.turnTimeoutMinutes),
|
|
358
|
+
validate: posInt,
|
|
359
|
+
}),
|
|
360
|
+
),
|
|
361
|
+
);
|
|
362
|
+
const skips = ensure(
|
|
363
|
+
await p.multiselect({
|
|
364
|
+
message: "Default speed shortcuts (leave empty for none)",
|
|
365
|
+
options: [
|
|
366
|
+
{
|
|
367
|
+
value: "skipScout",
|
|
368
|
+
label: "Skip scout step",
|
|
369
|
+
hint: "leads dispatch builders directly",
|
|
370
|
+
},
|
|
371
|
+
{ value: "skipReview", label: "Skip review step", hint: "no reviewer before integrate" },
|
|
372
|
+
{
|
|
373
|
+
value: "skipGates",
|
|
374
|
+
label: "Skip quality gates",
|
|
375
|
+
hint: "faster; disables on-gates-pass merge",
|
|
376
|
+
},
|
|
377
|
+
{ value: "skipSkills", label: "Skip skill distillation" },
|
|
378
|
+
],
|
|
379
|
+
initialValues: [],
|
|
380
|
+
required: false,
|
|
381
|
+
}),
|
|
382
|
+
) as string[];
|
|
383
|
+
agents.skipScout = skips.includes("skipScout");
|
|
384
|
+
agents.skipReview = skips.includes("skipReview");
|
|
385
|
+
agents.skipGates = skips.includes("skipGates");
|
|
386
|
+
agents.skipSkills = skips.includes("skipSkills");
|
|
387
|
+
|
|
388
|
+
agents.purgeOnReap = ensure(
|
|
389
|
+
await p.confirm({
|
|
390
|
+
message: "Fully erase idle agents when reaped (mail, events, merges, files, session)?",
|
|
391
|
+
initialValue: agents.purgeOnReap,
|
|
392
|
+
}),
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
324
396
|
// 7. Summary -----------------------------------------------------------
|
|
325
397
|
const previewProvider = buildProviderConfig(spec, model, authMode, baseUrl);
|
|
326
398
|
const authSummary: Record<AuthMode, string> = {
|
|
@@ -338,6 +410,7 @@ export async function runSetupWizard(currentConfig: AgentplateConfig): Promise<W
|
|
|
338
410
|
previewProvider.baseUrl ? `base URL: ${previewProvider.baseUrl}` : undefined,
|
|
339
411
|
`gates: ${qualityGates.length ? qualityGates.map((g) => g.name).join(", ") : "none"}`,
|
|
340
412
|
`auto-merge:${autoMerge}`,
|
|
413
|
+
agents.purgeOnReap ? "purge-on-reap: on (idle agents fully erased)" : undefined,
|
|
341
414
|
modelsByCapability?.scout
|
|
342
415
|
? `fast model: ${modelsByCapability.scout} (scout, reviewer)`
|
|
343
416
|
: undefined,
|
|
@@ -356,6 +429,7 @@ export async function runSetupWizard(currentConfig: AgentplateConfig): Promise<W
|
|
|
356
429
|
runtime,
|
|
357
430
|
});
|
|
358
431
|
config.merge = { ...config.merge, autoMerge };
|
|
432
|
+
config.agents = agents;
|
|
359
433
|
if (qualityGates.length) config.project = { ...config.project, qualityGates };
|
|
360
434
|
if (modelsByCapability) {
|
|
361
435
|
const pc = config.providers[providerId];
|