@jmanuelcorral/bond-app 0.2.2 → 0.3.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/app/mods/bond-agents/api.js +27 -0
- package/app/mods/bond-agents/main.js +446 -28
- package/app/mods/bond-agents/model.js +239 -0
- package/app/mods/bond-board/api.js +27 -0
- package/app/mods/bond-board/main.js +170 -16
- package/app/mods/bond-board/model.js +63 -2
- package/app/mods/bond-settings/api.js +27 -0
- package/app/mods/bond-settings/main.js +192 -4
- package/app/mods/bond-status/api.js +27 -0
- package/app/mods/bond-status/main.js +14 -3
- package/app/mods/bond-status/model.js +13 -0
- package/package.json +1 -1
- package/runner/versions.env +1 -1
- package/src/cli.ts +101 -0
- package/src/config.ts +9 -0
- package/src/core/agent-flags.ts +38 -0
- package/src/core/agent-waiting.ts +38 -0
- package/src/core/agy-login.ts +56 -4
- package/src/core/diagnose.ts +279 -0
- package/src/core/doctor.ts +58 -12
- package/src/core/handoff.ts +161 -0
- package/src/core/hub-session.ts +14 -2
- package/src/core/hub.ts +3 -3
- package/src/core/loop.ts +241 -0
- package/src/core/orchestrator.ts +987 -181
- package/src/core/pi-compaction.ts +98 -0
- package/src/core/service.ts +34 -0
- package/src/core/setup-install.ts +5 -2
- package/src/core/stuck.ts +204 -0
- package/src/core/updates.ts +155 -0
- package/src/db/database.ts +31 -1
- package/src/db/run-repo.ts +38 -3
- package/src/db/settings-repo.ts +138 -0
- package/src/db/ticket-repo.ts +74 -5
- package/src/index.ts +2 -0
- package/src/runner/hc-client.ts +27 -4
- package/src/server/app.ts +181 -3
- package/src/types.ts +74 -0
package/src/server/app.ts
CHANGED
|
@@ -461,7 +461,7 @@ export function createServer(orchestrator: Orchestrator, hooks: ServerHooks = {}
|
|
|
461
461
|
const body = await readJson();
|
|
462
462
|
// P4 review M1: the delivery pushes to the ticket's repo and branch; they cannot
|
|
463
463
|
// change under a run that cloned the old ones.
|
|
464
|
-
const pinned = ['repo_url', 'target_branch', 'base_branch', 'repos', 'hub_url', 'hub_base', 'repo_agents'].filter((k) => body[k] !== undefined);
|
|
464
|
+
const pinned = ['repo_url', 'target_branch', 'base_branch', 'repos', 'hub_url', 'hub_base', 'repo_agents', 'loop'].filter((k) => body[k] !== undefined);
|
|
465
465
|
const active = orchestrator.runRepo.listActive().find((r) => r.ticket_id === ticketId);
|
|
466
466
|
if (pinned.length > 0 && active) {
|
|
467
467
|
throw new ConflictError(`Cannot change ${pinned.join(', ')} while run '${active.id}' is active`);
|
|
@@ -604,6 +604,26 @@ export function createServer(orchestrator: Orchestrator, hooks: ServerHooks = {}
|
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
606
606
|
|
|
607
|
+
// «Seguir sin ellos»: start the hub team despite the hub agent's gaps.
|
|
608
|
+
const runProceedMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/hub\/proceed$/);
|
|
609
|
+
if (runProceedMatch && method === 'POST') {
|
|
610
|
+
const runId = runProceedMatch[1];
|
|
611
|
+
if (!orchestrator.runRepo.get(runId)) {
|
|
612
|
+
sendJson(404, { error: `Run '${runId}' not found` });
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
try {
|
|
616
|
+
sendJson(200, await orchestrator.proceedHub(runId));
|
|
617
|
+
} catch (err: unknown) {
|
|
618
|
+
if (err instanceof ValidationError) {
|
|
619
|
+
sendJson(400, { error: (err as Error).message });
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
throw err;
|
|
623
|
+
}
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
|
|
607
627
|
// P5 «Aprobar arreglos»: apply the fixes of the hub analysis and analyse again.
|
|
608
628
|
const runApproveMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/hub\/approve$/);
|
|
609
629
|
if (runApproveMatch && method === 'POST') {
|
|
@@ -646,6 +666,113 @@ export function createServer(orchestrator: Orchestrator, hooks: ServerHooks = {}
|
|
|
646
666
|
return;
|
|
647
667
|
}
|
|
648
668
|
|
|
669
|
+
// LOOP P3 (issue #2): «Iniciar loop» and the person's pause, resume and stop.
|
|
670
|
+
// «Iniciar loop» dialog: the plans gru can carry out (docs/plans/ of the hub).
|
|
671
|
+
const loopPlansMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/loop\/plans$/);
|
|
672
|
+
if (loopPlansMatch && method === 'GET') {
|
|
673
|
+
try {
|
|
674
|
+
sendJson(200, { plans: await orchestrator.listLoopPlans(loopPlansMatch[1]) });
|
|
675
|
+
} catch (err: unknown) {
|
|
676
|
+
if (err instanceof NotFoundError) {
|
|
677
|
+
sendJson(404, { error: (err as Error).message });
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
throw err;
|
|
681
|
+
}
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
const loopMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/loop\/(start|pause|resume|stop|message)$/);
|
|
686
|
+
if (loopMatch && method === 'POST') {
|
|
687
|
+
const [, runId, action] = loopMatch;
|
|
688
|
+
const body = action === 'start' || action === 'message' ? await readJson(16 * 1024) : {};
|
|
689
|
+
try {
|
|
690
|
+
const run = action === 'start' ? await orchestrator.startLoop(runId, { plan: body.plan, instructions: body.instructions, max_iterations: body.max_iterations })
|
|
691
|
+
: action === 'message' ? await orchestrator.messageLoop(runId, body.text)
|
|
692
|
+
: action === 'pause' ? await orchestrator.pauseLoop(runId)
|
|
693
|
+
: action === 'resume' ? await orchestrator.resumeLoop(runId)
|
|
694
|
+
: await orchestrator.stopLoop(runId);
|
|
695
|
+
sendJson(200, run);
|
|
696
|
+
} catch (err: unknown) {
|
|
697
|
+
if (err instanceof NotFoundError) {
|
|
698
|
+
sendJson(404, { error: (err as Error).message });
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
if (err instanceof ValidationError) {
|
|
702
|
+
sendJson(400, { error: (err as Error).message });
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
throw err;
|
|
706
|
+
}
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
// Issue #3 P4: «Reanudar al restablecerse»: the same agent goes on when its budget is back.
|
|
711
|
+
const resumeMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/agents\/([^/]+)\/resume$/);
|
|
712
|
+
if (resumeMatch && method === 'POST') {
|
|
713
|
+
const body = await readJson(4 * 1024);
|
|
714
|
+
try {
|
|
715
|
+
sendJson(200, await orchestrator.scheduleResume(resumeMatch[1], decodeURIComponent(resumeMatch[2]), body.at));
|
|
716
|
+
} catch (err: unknown) {
|
|
717
|
+
if (err instanceof NotFoundError) {
|
|
718
|
+
sendJson(404, { error: (err as Error).message });
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
if (err instanceof ValidationError) {
|
|
722
|
+
sendJson(400, { error: (err as Error).message });
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
throw err;
|
|
726
|
+
}
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
// Issue #3: the run's agents that ended and were not replaced (the panel's «Cerrados»).
|
|
731
|
+
const closedMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/closed-agents$/);
|
|
732
|
+
if (closedMatch && method === 'GET') {
|
|
733
|
+
try {
|
|
734
|
+
sendJson(200, await orchestrator.getClosedAgents(closedMatch[1]));
|
|
735
|
+
} catch (err: unknown) {
|
|
736
|
+
if (err instanceof NotFoundError) {
|
|
737
|
+
sendJson(404, { error: (err as Error).message });
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
throw err;
|
|
741
|
+
}
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// Issue #3 «Relanzar con resumen»: GET the options and the handoff preview for one agent of
|
|
746
|
+
// the run; POST relaunches it (same kind or another) from that handoff.
|
|
747
|
+
const relaunchMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/agents\/([^/]+)\/relaunch$/);
|
|
748
|
+
if (relaunchMatch && (method === 'GET' || method === 'POST')) {
|
|
749
|
+
const runId = relaunchMatch[1];
|
|
750
|
+
const name = decodeURIComponent(relaunchMatch[2]);
|
|
751
|
+
try {
|
|
752
|
+
if (method === 'GET') {
|
|
753
|
+
const options = await orchestrator.relaunchOptions(runId, name);
|
|
754
|
+
const to = parsedUrl.searchParams.get('agent') || options.from;
|
|
755
|
+
const reason = parsedUrl.searchParams.get('reason') || 'relanzado a mano';
|
|
756
|
+
const handoff = await orchestrator.relaunchHandoff(runId, name, to, reason.slice(0, 200));
|
|
757
|
+
sendJson(200, { ...options, handoff });
|
|
758
|
+
} else {
|
|
759
|
+
const body = await readJson(128 * 1024);
|
|
760
|
+
sendJson(200, await orchestrator.relaunchAgent(runId, name, body));
|
|
761
|
+
}
|
|
762
|
+
} catch (err: unknown) {
|
|
763
|
+
if (err instanceof NotFoundError) {
|
|
764
|
+
sendJson(404, { error: (err as Error).message });
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
if (err instanceof ValidationError) {
|
|
768
|
+
sendJson(400, { error: (err as Error).message });
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
throw err;
|
|
772
|
+
}
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
|
|
649
776
|
// P7: «Terminado»: mark a running or waiting run as finished keeping container and session alive.
|
|
650
777
|
const runFinishMatch = pathname.match(/^\/api\/v1\/runs\/([^/]+)\/finish$/);
|
|
651
778
|
if (runFinishMatch && method === 'POST') {
|
|
@@ -846,14 +973,15 @@ export function createServer(orchestrator: Orchestrator, hooks: ServerHooks = {}
|
|
|
846
973
|
// bond-app-claude-agente P2), codex (ChatGPT, browser callback replayed in the
|
|
847
974
|
// container) and copilot (device code), plan bond-app-codex-copilot P2. The API never
|
|
848
975
|
// returns a token, only the session state.
|
|
849
|
-
const loginMatch = pathname.match(/^\/api\/v1\/settings\/(agy|claude|codex|copilot)\/login(\/.*)?$/);
|
|
976
|
+
const loginMatch = pathname.match(/^\/api\/v1\/settings\/(agy|claude|codex|copilot|azure)\/login(\/.*)?$/);
|
|
850
977
|
if (loginMatch) {
|
|
851
978
|
const loginManager = {
|
|
852
979
|
agy: orchestrator.agyLoginManager,
|
|
853
980
|
claude: orchestrator.claudeLoginManager,
|
|
854
981
|
codex: orchestrator.codexLoginManager,
|
|
855
982
|
copilot: orchestrator.copilotLoginManager,
|
|
856
|
-
|
|
983
|
+
azure: orchestrator.azureLoginManager,
|
|
984
|
+
}[loginMatch[1] as 'agy' | 'claude' | 'codex' | 'copilot' | 'azure'];
|
|
857
985
|
const sub = loginMatch[2] ?? '';
|
|
858
986
|
if (sub === '' || sub === '/status') {
|
|
859
987
|
if (method === 'GET') {
|
|
@@ -902,6 +1030,33 @@ export function createServer(orchestrator: Orchestrator, hooks: ServerHooks = {}
|
|
|
902
1030
|
}
|
|
903
1031
|
}
|
|
904
1032
|
|
|
1033
|
+
// Issue #4 (P1): the Azure session (who, tenant, subscriptions; never a token), the
|
|
1034
|
+
// default subscription, and «Cerrar sesión de Azure».
|
|
1035
|
+
if (pathname === '/api/v1/settings/azure-login') {
|
|
1036
|
+
if (method === 'GET') {
|
|
1037
|
+
sendJson(200, orchestrator.settingsRepo.getAzureLoginSummary());
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
if (method === 'PUT') {
|
|
1041
|
+
const body = await readJson();
|
|
1042
|
+
if (typeof body.subscription_id !== 'string' || !/^[0-9a-fA-F-]{36}$/.test(body.subscription_id)) {
|
|
1043
|
+
sendJson(400, { error: "'subscription_id' must be a subscription id (GUID)" });
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
try {
|
|
1047
|
+
sendJson(200, orchestrator.settingsRepo.setAzureSubscription(body.subscription_id));
|
|
1048
|
+
} catch (err: unknown) {
|
|
1049
|
+
sendJson(400, { error: (err as Error).message });
|
|
1050
|
+
}
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
if (method === 'DELETE') {
|
|
1054
|
+
orchestrator.settingsRepo.deleteAzureLogin();
|
|
1055
|
+
sendJson(200, orchestrator.settingsRepo.getAzureLoginSummary());
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
905
1060
|
// D20: the GitHub credential for the runs' clones (the user's gh session). The API
|
|
906
1061
|
// only ever says whether one is stored and for which login; never the token.
|
|
907
1062
|
if (pathname === '/api/v1/settings/github') {
|
|
@@ -1066,6 +1221,23 @@ export function createServer(orchestrator: Orchestrator, hooks: ServerHooks = {}
|
|
|
1066
1221
|
// W-P1 (wizard): aggregated setup state. GET says what is missing; PUT stores the
|
|
1067
1222
|
// agent selection and setup_done (only via an explicit write). No credentials here:
|
|
1068
1223
|
// the aggregate only says whether each piece is configured (D13 summaries).
|
|
1224
|
+
// LOOP P1 (issue #2): the loop defaults of Ajustes (a new ticket's iterations; stall rounds).
|
|
1225
|
+
if (pathname === '/api/v1/settings/loop') {
|
|
1226
|
+
if (method === 'GET') {
|
|
1227
|
+
sendJson(200, orchestrator.settingsRepo.getLoopDefaults());
|
|
1228
|
+
return;
|
|
1229
|
+
}
|
|
1230
|
+
if (method === 'PUT') {
|
|
1231
|
+
const body = await readJson(4 * 1024);
|
|
1232
|
+
try {
|
|
1233
|
+
sendJson(200, orchestrator.settingsRepo.saveLoopDefaults(body));
|
|
1234
|
+
} catch (err: unknown) {
|
|
1235
|
+
sendJson(400, { error: (err as Error).message });
|
|
1236
|
+
}
|
|
1237
|
+
return;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1069
1241
|
if (pathname === '/api/v1/setup') {
|
|
1070
1242
|
if (method === 'GET') {
|
|
1071
1243
|
sendJson(200, await orchestrator.getSetupState());
|
|
@@ -1186,6 +1358,12 @@ export function createServer(orchestrator: Orchestrator, hooks: ServerHooks = {}
|
|
|
1186
1358
|
return;
|
|
1187
1359
|
}
|
|
1188
1360
|
|
|
1361
|
+
// «Hay versión nueva»: the last check of bond-app and bond against npm; POST asks again now.
|
|
1362
|
+
if (pathname === '/api/v1/system/updates' && (method === 'GET' || method === 'POST')) {
|
|
1363
|
+
sendJson(200, method === 'POST' ? await orchestrator.updates.check() : orchestrator.updates.get());
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1189
1367
|
// Progress of the image build in flight, or how the last one ended (Ajustes → Imagen).
|
|
1190
1368
|
if (pathname === '/api/v1/system/rebuild' && method === 'GET') {
|
|
1191
1369
|
sendJson(200, orchestrator.getRebuildStatus());
|
package/src/types.ts
CHANGED
|
@@ -76,6 +76,21 @@ export interface TicketRepo {
|
|
|
76
76
|
*/
|
|
77
77
|
export type TicketMode = 'single' | 'hub';
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* LOOP P1 (issue #2): the ticket's autonomous mode. When enabled, gru supervises the team and
|
|
81
|
+
* the plan runs on its own (the engine is P3). `max_iterations`: gru's review rounds before the
|
|
82
|
+
* loop stops; null = no limit (the ticket's timeout and the stall check still stop it).
|
|
83
|
+
*/
|
|
84
|
+
export interface TicketLoop {
|
|
85
|
+
enabled: boolean;
|
|
86
|
+
max_iterations: number | null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** LOOP defaults (Ajustes): iterations of a new ticket's loop, and rounds without progress = stall. */
|
|
90
|
+
export const LOOP_DEFAULT_MAX_ITERATIONS = 10;
|
|
91
|
+
export const LOOP_DEFAULT_STALL_ITERATIONS = 3;
|
|
92
|
+
export const LOOP_MAX_ITERATIONS_LIMIT = 1000;
|
|
93
|
+
|
|
79
94
|
export interface Ticket {
|
|
80
95
|
id: string;
|
|
81
96
|
title: string;
|
|
@@ -114,6 +129,12 @@ export interface Ticket {
|
|
|
114
129
|
bondify: boolean;
|
|
115
130
|
/** Plan bond-app-ajustes-imagen P4: Docker inside the run (privileged container); default false. */
|
|
116
131
|
docker?: boolean;
|
|
132
|
+
/** Issue #4 (P2): the person's Azure session in the run (az without az login); false unless sent (the form ticks it while there is a session). */
|
|
133
|
+
azure_login?: boolean;
|
|
134
|
+
/** Issue #4 (P2, D4): the subscription for this ticket; null = the default of Ajustes. */
|
|
135
|
+
azure_subscription?: string | null;
|
|
136
|
+
/** LOOP P1: the autonomous mode (hub tickets only, v1); disabled by default. */
|
|
137
|
+
loop?: TicketLoop;
|
|
117
138
|
/** P9: engine for bond team inside run container: 'hc' (default, native panes) or 'herdr' (TUI mode). */
|
|
118
139
|
team_engine?: 'hc' | 'herdr';
|
|
119
140
|
status: RunState;
|
|
@@ -152,6 +173,15 @@ export interface CreateTicketInput {
|
|
|
152
173
|
bondify?: boolean;
|
|
153
174
|
/** Plan bond-app-ajustes-imagen P4: Docker inside the run (privileged container); default false. */
|
|
154
175
|
docker?: boolean;
|
|
176
|
+
/** Issue #4 (P2): «Login de Azure»; default false. */
|
|
177
|
+
azure_login?: boolean;
|
|
178
|
+
/** Issue #4 (P2): a subscription id (GUID) of the session, or null for the default. */
|
|
179
|
+
azure_subscription?: string | null;
|
|
180
|
+
/**
|
|
181
|
+
* LOOP P1: `{ enabled, max_iterations? }`; without max_iterations the default from Ajustes,
|
|
182
|
+
* null = no limit. Hub tickets only (v1, decision D7).
|
|
183
|
+
*/
|
|
184
|
+
loop?: { enabled?: boolean; max_iterations?: number | null };
|
|
155
185
|
/** P9: engine for bond team inside run container: 'hc' (default) or 'herdr'. */
|
|
156
186
|
team_engine?: 'hc' | 'herdr';
|
|
157
187
|
}
|
|
@@ -217,6 +247,21 @@ export interface Run {
|
|
|
217
247
|
/** P3 (D19): the run's hc machine (`bond-<runId>`) and its agent terminal (`<machine>/t1`). */
|
|
218
248
|
hc_machine?: string | null;
|
|
219
249
|
hc_terminal?: string | null;
|
|
250
|
+
/**
|
|
251
|
+
* Issue #3: the agent (and pi model) of this run after «Relanzar con resumen» with another
|
|
252
|
+
* one; null = the ticket's. Only the run changes, not the ticket (decision in the issue).
|
|
253
|
+
*/
|
|
254
|
+
agent_override?: string | null;
|
|
255
|
+
model_override?: string | null;
|
|
256
|
+
/** Issue #3 P4: when to resume an agent whose budget ran out (ISO), and which one. */
|
|
257
|
+
resume_at?: string | null;
|
|
258
|
+
resume_agent?: string | null;
|
|
259
|
+
/** LOOP P3 (issue #2): the loop's state (none until «Iniciar loop»), review rounds and stalls. */
|
|
260
|
+
loop_state?: 'running' | 'paused' | 'finishing' | 'finished' | 'stopped' | null;
|
|
261
|
+
loop_iteration?: number;
|
|
262
|
+
loop_stalls?: number;
|
|
263
|
+
/** The person's set-up of the loop at «Iniciar loop» (plan, instructions, iterations) and their later messages to gru. */
|
|
264
|
+
loop_config?: LoopConfig | null;
|
|
220
265
|
cost_usd: number;
|
|
221
266
|
cleanup_pending?: boolean;
|
|
222
267
|
/** P4: consecutive verification failures; at the limit the run goes to `blocked`. */
|
|
@@ -351,6 +396,23 @@ export interface AgentCredentialSummary {
|
|
|
351
396
|
expires_at?: string;
|
|
352
397
|
}
|
|
353
398
|
|
|
399
|
+
/**
|
|
400
|
+
* Issue #4: the person's Azure session (`az login --use-device-code` in Ajustes), as Ajustes
|
|
401
|
+
* and doctor see it: who, which tenant, the subscriptions and the default one; never a token.
|
|
402
|
+
*/
|
|
403
|
+
export interface AzureLoginSummary {
|
|
404
|
+
configured: boolean;
|
|
405
|
+
user?: string;
|
|
406
|
+
tenant_id?: string;
|
|
407
|
+
/** The default subscription for the runs (Ajustes; a ticket may pick another, P2). */
|
|
408
|
+
subscription?: { id: string; name: string } | null;
|
|
409
|
+
subscriptions?: Array<{ id: string; name: string; tenant_id: string }>;
|
|
410
|
+
updated_at?: string;
|
|
411
|
+
/** The refresh token lapses about 90 days after the login (D5: runs never refresh the store). */
|
|
412
|
+
expires_at?: string;
|
|
413
|
+
expired?: boolean;
|
|
414
|
+
}
|
|
415
|
+
|
|
354
416
|
export type AgyLoginStatus =
|
|
355
417
|
| 'idle'
|
|
356
418
|
| 'starting'
|
|
@@ -514,3 +576,15 @@ export interface RunTerminal {
|
|
|
514
576
|
labels?: Record<string, string>;
|
|
515
577
|
exit_code?: number | null;
|
|
516
578
|
}
|
|
579
|
+
|
|
580
|
+
/** LOOP (issue #2): what the person chose when starting the loop, and what they told gru later. */
|
|
581
|
+
export interface LoopConfig {
|
|
582
|
+
/** The plan gru carries out, relative to the hub (docs/plans/<file>.md). */
|
|
583
|
+
plan: string;
|
|
584
|
+
/** The person's instructions for this loop (may be empty). */
|
|
585
|
+
instructions: string;
|
|
586
|
+
/** Maximum review rounds for this loop; null = no limit. */
|
|
587
|
+
max_iterations: number | null;
|
|
588
|
+
/** Messages the person sent gru while the loop ran. */
|
|
589
|
+
messages: Array<{ at: string; text: string }>;
|
|
590
|
+
}
|