Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
408 changes: 408 additions & 0 deletions docs/kanban-overhaul-plan.md

Large diffs are not rendered by default.

1,541 changes: 1,300 additions & 241 deletions interface/src/routes/AgentTasks.tsx

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/agent/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,6 @@ impl Channel {
prompt_engine: &crate::prompts::engine::PromptEngine,
) -> Option<String> {
crate::agent::channel_dispatch::build_project_context(&self.deps, prompt_engine).await

}

/// Build a snapshot of the system configuration for status block injection.
Expand Down
18 changes: 16 additions & 2 deletions src/agent/channel_dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,14 @@ async fn do_spawn(
.iter()
.map(|s| s.as_str())
.collect();
spawn_worker_from_state(state, &request.task, request.interactive, &skills, &WorkerContextMode::default()).await
spawn_worker_from_state(
state,
&request.task,
request.interactive,
&skills,
&WorkerContextMode::default(),
)
.await
}
}
}
Expand Down Expand Up @@ -1004,7 +1011,14 @@ pub async fn drain_worker_queue(state: &ChannelState) -> Option<(WorkerId, Strin
.iter()
.map(|s| s.as_str())
.collect();
spawn_worker_from_state(state, &request.task, request.interactive, &skills, &WorkerContextMode::default()).await
spawn_worker_from_state(
state,
&request.task,
request.interactive,
&skills,
&WorkerContextMode::default(),
)
.await
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/api/agents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ pub(super) async fn trigger_warmup(
);
continue;
};
let Some(project_store) = state.project_store.load().as_ref().clone() else {
let Some(_project_store) = state.project_store.load().as_ref().clone() else {
tracing::warn!(
agent_id,
"shared project store not initialized, skipping warmup"
Expand Down
18 changes: 18 additions & 0 deletions src/api/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,28 @@ use crate::registry::sync::{SyncResult, SyncStatus, sync_registry};
// Query / request types
// ---------------------------------------------------------------------------

#[allow(dead_code)]
#[derive(Deserialize)]
pub(super) struct AgentQuery {
agent_id: String,
}

#[allow(dead_code)]
#[derive(Deserialize)]
pub(super) struct RepoListQuery {
agent_id: String,
#[serde(default)]
enabled_only: bool,
}

#[allow(dead_code)]
#[derive(Deserialize)]
pub(super) struct RepoQuery {
agent_id: String,
full_name: String,
}

#[allow(dead_code)]
#[derive(Deserialize)]
pub(super) struct UpdateRepoOverridesBody {
agent_id: String,
Expand All @@ -47,17 +51,20 @@ pub(super) struct UpdateRepoOverridesBody {
// Response types
// ---------------------------------------------------------------------------

#[allow(dead_code)]
#[derive(Serialize)]
pub(super) struct RepoListResponse {
repos: Vec<RegistryRepo>,
total: usize,
}

#[allow(dead_code)]
#[derive(Serialize)]
pub(super) struct SyncResponse {
result: SyncResult,
}

#[allow(dead_code)]
#[derive(Serialize)]
pub(super) struct StatusResponse {
status: SyncStatus,
Expand All @@ -68,6 +75,7 @@ pub(super) struct StatusResponse {
// ---------------------------------------------------------------------------

/// GET /api/registry/repos — list all registry repos for an agent.
#[allow(dead_code)]
pub(super) async fn list_registry_repos(
State(state): State<Arc<ApiState>>,
Query(query): Query<RepoListQuery>,
Expand All @@ -85,6 +93,7 @@ pub(super) async fn list_registry_repos(
}

/// GET /api/registry/repos/detail — get a single repo by full_name.
#[allow(dead_code)]
pub(super) async fn get_registry_repo(
State(state): State<Arc<ApiState>>,
Query(query): Query<RepoQuery>,
Expand All @@ -102,6 +111,7 @@ pub(super) async fn get_registry_repo(
}

/// PUT /api/registry/repos/overrides — update per-repo overrides.
#[allow(dead_code)]
pub(super) async fn update_repo_overrides(
State(state): State<Arc<ApiState>>,
Json(body): Json<UpdateRepoOverridesBody>,
Expand All @@ -124,6 +134,7 @@ pub(super) async fn update_repo_overrides(
}

/// POST /api/registry/sync — trigger a manual sync.
#[allow(dead_code)]
pub(super) async fn trigger_sync(
State(state): State<Arc<ApiState>>,
Query(query): Query<AgentQuery>,
Expand Down Expand Up @@ -162,6 +173,7 @@ pub(super) async fn trigger_sync(
}

/// GET /api/registry/status — get current sync status.
#[allow(dead_code)]
pub(super) async fn registry_status(
State(state): State<Arc<ApiState>>,
Query(query): Query<AgentQuery>,
Expand All @@ -179,6 +191,7 @@ pub(super) async fn registry_status(
// GitHub Issues integration
// ---------------------------------------------------------------------------

#[allow(dead_code)]
#[derive(Deserialize)]
pub(super) struct IssuesQuery {
agent_id: String,
Expand All @@ -190,13 +203,16 @@ pub(super) struct IssuesQuery {
state: String,
}

#[allow(dead_code)]
fn default_issues_limit() -> usize {
50
}
#[allow(dead_code)]
fn default_issues_state() -> String {
"open".to_string()
}

#[allow(dead_code)]
#[derive(Serialize, Deserialize, Clone)]
pub(super) struct GitHubIssue {
pub number: i64,
Expand All @@ -214,6 +230,7 @@ pub(super) struct GitHubIssue {
pub updated_at: String,
}

#[allow(dead_code)]
#[derive(Serialize)]
pub(super) struct IssuesResponse {
issues: Vec<GitHubIssue>,
Expand All @@ -222,6 +239,7 @@ pub(super) struct IssuesResponse {

/// GET /api/registry/issues — fetch GitHub issues from all registry repos.
/// Uses the `gh` CLI to query GitHub.
#[allow(dead_code)]
pub(super) async fn list_registry_issues(
State(state): State<Arc<ApiState>>,
Query(query): Query<IssuesQuery>,
Expand Down
3 changes: 1 addition & 2 deletions src/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use super::state::ApiState;
use super::{
activity, agents, attachments, bindings, channels, config, cortex, cron, factory, ingest,
links, mcp, memories, messaging, models, notifications, opencode_proxy, portal, projects,
providers, registry, secrets, settings, skills, ssh, system, tasks, tools, usage,
wiki, workers,
providers, secrets, settings, skills, ssh, system, tasks, tools, usage, wiki, workers,
};

use axum::Json;
Expand Down
8 changes: 6 additions & 2 deletions src/api/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ pub(super) async fn assign_task(
}

#[derive(Serialize)]
#[allow(dead_code)]
pub(super) struct TaskDiffResponse {
task_number: i64,
diff: String,
Expand All @@ -573,10 +574,10 @@ pub(super) struct TaskDiffResponse {

/// Get the git diff for a task. Reads `worktree` and `branch` from task
/// metadata to determine which diff to show.
#[allow(dead_code)]
pub(super) async fn task_diff(
State(state): State<Arc<ApiState>>,
Path(number): Path<i64>,

) -> Result<Json<TaskDiffResponse>, StatusCode> {
let store = get_task_store(&state)?;

Expand Down Expand Up @@ -633,13 +634,15 @@ pub(super) async fn task_diff(
}))
}

#[allow(dead_code)]
#[derive(Deserialize)]
pub(super) struct WorktreeRequest {
agent_id: String,
#[serde(default)]
base_branch: Option<String>,
}

#[allow(dead_code)]
#[derive(Serialize)]
pub(super) struct WorktreeResponse {
task_number: i64,
Expand All @@ -650,6 +653,7 @@ pub(super) struct WorktreeResponse {

/// Create a git worktree for a task. Creates a new branch `task/{number}` and
/// a worktree directory. Stores the path and branch in task metadata.
#[allow(dead_code)]
pub(super) async fn create_worktree(
State(state): State<Arc<ApiState>>,
Path(number): Path<i64>,
Expand Down Expand Up @@ -769,10 +773,10 @@ pub(super) async fn create_worktree(
}

/// Remove a task's git worktree and optionally delete the branch.
#[allow(dead_code)]
pub(super) async fn delete_worktree(
State(state): State<Arc<ApiState>>,
Path(number): Path<i64>,

) -> Result<Json<TaskActionResponse>, StatusCode> {
let store = get_task_store(&state)?;

Expand Down
1 change: 0 additions & 1 deletion src/registry/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ mod tests {
let project_store = crate::projects::ProjectStore::new(pool);
let project = project_store
.create_project(crate::projects::store::CreateProjectInput {
agent_id: "main".into(),
name: "ChargePilot".into(),
description: String::new(),
icon: String::new(),
Expand Down