wizard: 'fresh coding team' picker for paired coding loop
Second slice of the per-loop-team arc. The paired-coding-loop checkbox
in ResearchWizard step 6 now exposes a two-option picker:
⦿ Provision a dedicated coding team (default when the loop is on)
— fresh 'Coding · <topic>' team row, risk_profile =
coding_readwrite, clawmates_door in mcp_bundles. Loop's
team_id is bound at wizard-submit time.
○ Reuse the research team (legacy) — no team_id bound; coding
iterations spawn against the research topic's container.
Frontend
- New codingTeamMode state, radio picker rendered under the checkbox.
- research.ts createTopic body gains paired_coding_team_mode?: 'fresh'|
'reuse'.
Backend
- CreateTopicRequest gains paired_coding_team_mode: Option<String>.
- materialize_topic_loops takes it through and, when 'fresh', calls
the new provision_fresh_coding_team helper — inserts a teams row
via the existing insert_team_with_lifecycle (pipeline kind, same
graph as the loop), sets its runtime-config via
set_team_runtime_config, then binds loop.team_id.
- All operations best-effort with stderr logging — a team-provision
failure leaves the loop functional under the legacy fallback.
Not shipped in this slice (deferred to runtime hookup slice):
- research_container::spawn keyed on team_id → per-team container
- Config template rewrite injecting the team's risk_profile
- Migration of existing paired loops onto their own teams
The plumbing lands now so the wizard's intent is recorded; the
runtime honors it in the next PR.
This commit is contained in:
@@ -147,6 +147,14 @@ pub struct CreateTopicRequest {
|
||||
/// kind='exec' loop bound to this topic with on_artifact_update.
|
||||
#[serde(default)]
|
||||
pub create_paired_coding_loop: bool,
|
||||
/// 0045 fold — team disposition for the paired coding loop:
|
||||
/// Some("fresh") — provision a dedicated coding team with
|
||||
/// coding_readwrite risk profile (recommended)
|
||||
/// Some("reuse") — attach the coding loop to the research team
|
||||
/// (legacy behavior, both share one container)
|
||||
/// None — treated as "reuse" for backwards compat.
|
||||
#[serde(default)]
|
||||
pub paired_coding_team_mode: Option<String>,
|
||||
}
|
||||
|
||||
// The wizard sends a denormalized display object for its own UI. Only
|
||||
@@ -392,6 +400,7 @@ pub async fn create_topic(
|
||||
&body.title,
|
||||
&sched.mode,
|
||||
body.create_paired_coding_loop,
|
||||
body.paired_coding_team_mode.as_deref(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user