Files
vibe-kanban/shared/types.ts

229 lines
15 KiB
TypeScript
Raw Normal View History

Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
// This file was generated by `crates/core/src/bin/generate_types.rs`.
2025-06-20 19:49:15 +01:00
// Do not edit this file manually.
2025-06-14 17:36:54 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
// If you are an AI, and you absolutely have to edit this file, please confirm with the user first.
2025-06-14 17:36:54 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type DirectoryEntry = { name: string, path: string, is_directory: boolean, is_git_repo: boolean, last_modified: bigint | null, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type DirectoryListResponse = { entries: Array<DirectoryEntry>, current_path: string, };
export type Project = { id: string, name: string, git_repo_path: string, setup_script: string | null, dev_script: string | null, cleanup_script: string | null, copy_files: string | null, created_at: Date, updated_at: Date, };
export type ProjectWithBranch = { id: string, name: string, git_repo_path: string, setup_script: string | null, dev_script: string | null, cleanup_script: string | null, copy_files: string | null, current_branch: string | null, created_at: Date, updated_at: Date, };
export type CreateProject = { name: string, git_repo_path: string, use_existing_repo: boolean, setup_script: string | null, dev_script: string | null, cleanup_script: string | null, copy_files: string | null, };
export type UpdateProject = { name: string | null, git_repo_path: string | null, setup_script: string | null, dev_script: string | null, cleanup_script: string | null, copy_files: string | null, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type SearchResult = { path: string, is_file: boolean, match_type: SearchMatchType, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type SearchMatchType = "FileName" | "DirectoryName" | "FullPath";
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
export type ExecutorAction = { typ: ExecutorActionType, next_action: ExecutorAction | null, };
export type McpConfig = { servers: { [key in string]?: JsonValue }, servers_path: Array<string>, template: JsonValue, vibe_kanban: JsonValue, is_toml_config: boolean, };
export type ExecutorActionType = { "type": "CodingAgentInitialRequest" } & CodingAgentInitialRequest | { "type": "CodingAgentFollowUpRequest" } & CodingAgentFollowUpRequest | { "type": "ScriptRequest" } & ScriptRequest;
export type ScriptContext = "SetupScript" | "CleanupScript" | "DevServer";
export type ScriptRequest = { script: string, language: ScriptRequestLanguage, context: ScriptContext, };
export type ScriptRequestLanguage = "Bash";
export enum BaseCodingAgent { CLAUDE_CODE = "CLAUDE_CODE", AMP = "AMP", GEMINI = "GEMINI", CODEX = "CODEX", OPENCODE = "OPENCODE", CURSOR = "CURSOR", QWEN_CODE = "QWEN_CODE" }
export type CodingAgent = { "CLAUDE_CODE": ClaudeCode } | { "AMP": Amp } | { "GEMINI": Gemini } | { "CODEX": Codex } | { "OPENCODE": Opencode } | { "CURSOR": Cursor } | { "QWEN_CODE": QwenCode };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type TaskTemplate = { id: string, project_id: string | null, title: string, description: string | null, template_name: string, created_at: string, updated_at: string, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type CreateTaskTemplate = { project_id: string | null, title: string, description: string | null, template_name: string, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type UpdateTaskTemplate = { title: string | null, description: string | null, template_name: string | null, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type TaskStatus = "todo" | "inprogress" | "inreview" | "done" | "cancelled";
2025-06-16 18:37:19 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type Task = { id: string, project_id: string, title: string, description: string | null, status: TaskStatus, parent_task_attempt: string | null, created_at: string, updated_at: string, };
export type TaskWithAttemptStatus = { id: string, project_id: string, title: string, description: string | null, status: TaskStatus, parent_task_attempt: string | null, created_at: string, updated_at: string, has_in_progress_attempt: boolean, has_merged_attempt: boolean, last_attempt_failed: boolean, executor: string, };
2025-06-14 17:36:54 -04:00
export type CreateTask = { project_id: string, title: string, description: string | null, parent_task_attempt: string | null, image_ids: Array<string> | null, };
export type UpdateTask = { title: string | null, description: string | null, status: TaskStatus | null, parent_task_attempt: string | null, image_ids: Array<string> | null, };
export type Image = { id: string, file_path: string, original_name: string, mime_type: string | null, size_bytes: bigint, hash: string, created_at: string, updated_at: string, };
export type CreateImage = { file_path: string, original_name: string, mime_type: string | null, size_bytes: bigint, hash: string, };
2025-06-14 18:44:34 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type ApiResponse<T, E = T> = { success: boolean, data: T | null, error_data: E | null, message: string | null, };
export type UserSystemInfo = { config: Config, environment: Environment, executors: { [key in BaseCodingAgent]?: ExecutorConfig }, };
2025-06-14 18:44:34 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type Environment = { os_type: string, os_version: string, os_architecture: string, bitness: string, };
2025-06-17 23:41:24 -04:00
export type McpServerQuery = { executor: BaseCodingAgent, };
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
export type UpdateMcpServersBody = { servers: { [key in string]?: JsonValue }, };
export type GetMcpServerResponse = { mcp_config: McpConfig, config_path: string, };
export type CreateFollowUpAttempt = { prompt: string, variant: string | null, image_ids: Array<string> | null, };
2025-06-17 23:41:24 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type CreateGitHubPrRequest = { title: string, body: string | null, base_branch: string | null, };
export type ImageResponse = { id: string, file_path: string, original_name: string, mime_type: string | null, size_bytes: bigint, hash: string, created_at: string, updated_at: string, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export enum GitHubServiceError { TOKEN_INVALID = "TOKEN_INVALID", INSUFFICIENT_PERMISSIONS = "INSUFFICIENT_PERMISSIONS", REPO_NOT_FOUND_OR_NO_ACCESS = "REPO_NOT_FOUND_OR_NO_ACCESS" }
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
export type Config = { config_version: string, theme: ThemeMode, executor_profile: ExecutorProfileId, disclaimer_acknowledged: boolean, onboarding_acknowledged: boolean, github_login_acknowledged: boolean, telemetry_acknowledged: boolean, notifications: NotificationConfig, editor: EditorConfig, github: GitHubConfig, analytics_enabled: boolean | null, workspace_dir: string | null, last_app_version: string | null, show_release_notes: boolean, };
2025-06-14 18:44:34 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type NotificationConfig = { sound_enabled: boolean, push_enabled: boolean, sound_file: SoundFile, };
2025-06-21 23:14:00 +01:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export enum ThemeMode { LIGHT = "LIGHT", DARK = "DARK", SYSTEM = "SYSTEM", PURPLE = "PURPLE", GREEN = "GREEN", BLUE = "BLUE", ORANGE = "ORANGE", RED = "RED" }
2025-06-14 18:44:34 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type EditorConfig = { editor_type: EditorType, custom_command: string | null, };
2025-06-16 21:25:19 -04:00
2025-08-19 11:42:52 +01:00
export enum EditorType { VS_CODE = "VS_CODE", CURSOR = "CURSOR", WINDSURF = "WINDSURF", INTELLI_J = "INTELLI_J", ZED = "ZED", XCODE = "XCODE", CUSTOM = "CUSTOM" }
2025-06-14 18:44:34 -04:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type GitHubConfig = { pat: string | null, oauth_token: string | null, username: string | null, primary_email: string | null, default_pr_base: string | null, };
feat: task templates (vibe-kanban) (#197) * I've successfully implemented task templates for vibe-kanban with the following features: - Created a new `task_templates` table with fields for: - `id` (UUID primary key) - `project_id` (nullable for global templates) - `title` (default task title) - `description` (default task description) - `template_name` (display name for the template) - Timestamps for tracking creation/updates - Created `TaskTemplate` model with full CRUD operations - Added REST API endpoints: - `GET /api/templates` - List all templates - `GET /api/templates/global` - List only global templates - `GET /api/projects/:project_id/templates` - List templates for a project (includes global) - `GET /api/templates/:id` - Get specific template - `POST /api/templates` - Create template - `PUT /api/templates/:id` - Update template - `DELETE /api/templates/:id` - Delete template 1. **Task Creation Dialog**: - Added template selector dropdown when creating new tasks - Templates are fetched based on project context - Selecting a template pre-fills title and description fields - User can edit pre-filled values before creating the task 2. **Global Settings**: - Added "Task Templates" section to manage global templates - Full CRUD interface with table view - Create/Edit dialog for template management 3. **Project Settings**: - Modified project form to use tabs when editing - Added "Task Templates" tab for project-specific templates - Same management interface as global settings - **Scope Management**: Templates can be global (available to all projects) or project-specific - **User Experience**: Template selection is optional and doesn't interfere with normal task creation - **Data Validation**: Unique template names within same scope (global or per-project) - **UI Polish**: Clean interface with loading states, error handling, and confirmation dialogs The implementation allows users to create reusable task templates that streamline the task creation process by pre-filling common values while still allowing full editing before submission. * improve styling * address review comments * fix unqiue contraint on tempaltes * distinguish between local and global templates in UI * keyboard shortcuts for task creation * add dropdown on project page to select templates * update types * add default global task templates * Add task templates from kanban (#219) * Create project templates from kanban * Fixes * remove duplicate --------- Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
2025-07-16 15:46:42 +01:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export enum SoundFile { ABSTRACT_SOUND1 = "ABSTRACT_SOUND1", ABSTRACT_SOUND2 = "ABSTRACT_SOUND2", ABSTRACT_SOUND3 = "ABSTRACT_SOUND3", ABSTRACT_SOUND4 = "ABSTRACT_SOUND4", COW_MOOING = "COW_MOOING", PHONE_VIBRATION = "PHONE_VIBRATION", ROOSTER = "ROOSTER" }
feat: task templates (vibe-kanban) (#197) * I've successfully implemented task templates for vibe-kanban with the following features: - Created a new `task_templates` table with fields for: - `id` (UUID primary key) - `project_id` (nullable for global templates) - `title` (default task title) - `description` (default task description) - `template_name` (display name for the template) - Timestamps for tracking creation/updates - Created `TaskTemplate` model with full CRUD operations - Added REST API endpoints: - `GET /api/templates` - List all templates - `GET /api/templates/global` - List only global templates - `GET /api/projects/:project_id/templates` - List templates for a project (includes global) - `GET /api/templates/:id` - Get specific template - `POST /api/templates` - Create template - `PUT /api/templates/:id` - Update template - `DELETE /api/templates/:id` - Delete template 1. **Task Creation Dialog**: - Added template selector dropdown when creating new tasks - Templates are fetched based on project context - Selecting a template pre-fills title and description fields - User can edit pre-filled values before creating the task 2. **Global Settings**: - Added "Task Templates" section to manage global templates - Full CRUD interface with table view - Create/Edit dialog for template management 3. **Project Settings**: - Modified project form to use tabs when editing - Added "Task Templates" tab for project-specific templates - Same management interface as global settings - **Scope Management**: Templates can be global (available to all projects) or project-specific - **User Experience**: Template selection is optional and doesn't interfere with normal task creation - **Data Validation**: Unique template names within same scope (global or per-project) - **UI Polish**: Clean interface with loading states, error handling, and confirmation dialogs The implementation allows users to create reusable task templates that streamline the task creation process by pre-filling common values while still allowing full editing before submission. * improve styling * address review comments * fix unqiue contraint on tempaltes * distinguish between local and global templates in UI * keyboard shortcuts for task creation * add dropdown on project page to select templates * update types * add default global task templates * Add task templates from kanban (#219) * Create project templates from kanban * Fixes * remove duplicate --------- Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
2025-07-16 15:46:42 +01:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type DeviceFlowStartResponse = { user_code: string, verification_uri: string, expires_in: number, interval: number, };
feat: task templates (vibe-kanban) (#197) * I've successfully implemented task templates for vibe-kanban with the following features: - Created a new `task_templates` table with fields for: - `id` (UUID primary key) - `project_id` (nullable for global templates) - `title` (default task title) - `description` (default task description) - `template_name` (display name for the template) - Timestamps for tracking creation/updates - Created `TaskTemplate` model with full CRUD operations - Added REST API endpoints: - `GET /api/templates` - List all templates - `GET /api/templates/global` - List only global templates - `GET /api/projects/:project_id/templates` - List templates for a project (includes global) - `GET /api/templates/:id` - Get specific template - `POST /api/templates` - Create template - `PUT /api/templates/:id` - Update template - `DELETE /api/templates/:id` - Delete template 1. **Task Creation Dialog**: - Added template selector dropdown when creating new tasks - Templates are fetched based on project context - Selecting a template pre-fills title and description fields - User can edit pre-filled values before creating the task 2. **Global Settings**: - Added "Task Templates" section to manage global templates - Full CRUD interface with table view - Create/Edit dialog for template management 3. **Project Settings**: - Modified project form to use tabs when editing - Added "Task Templates" tab for project-specific templates - Same management interface as global settings - **Scope Management**: Templates can be global (available to all projects) or project-specific - **User Experience**: Template selection is optional and doesn't interfere with normal task creation - **Data Validation**: Unique template names within same scope (global or per-project) - **UI Polish**: Clean interface with loading states, error handling, and confirmation dialogs The implementation allows users to create reusable task templates that streamline the task creation process by pre-filling common values while still allowing full editing before submission. * improve styling * address review comments * fix unqiue contraint on tempaltes * distinguish between local and global templates in UI * keyboard shortcuts for task creation * add dropdown on project page to select templates * update types * add default global task templates * Add task templates from kanban (#219) * Create project templates from kanban * Fixes * remove duplicate --------- Co-authored-by: Louis Knight-Webb <louis@bloop.ai>
2025-07-16 15:46:42 +01:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export enum DevicePollStatus { SLOW_DOWN = "SLOW_DOWN", AUTHORIZATION_PENDING = "AUTHORIZATION_PENDING", SUCCESS = "SUCCESS" }
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export enum CheckTokenResponse { VALID = "VALID", INVALID = "INVALID" }
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type GitBranch = { name: string, is_current: boolean, is_remote: boolean, last_commit_date: Date, };
export type Diff = { change: DiffChangeKind, oldPath: string | null, newPath: string | null, oldContent: string | null, newContent: string | null, };
export type DiffChangeKind = "added" | "deleted" | "modified" | "renamed" | "copied" | "permissionChange";
export type FileDiffDetails = { fileName: string | null, content: string | null, };
export type RepositoryInfo = { id: bigint, name: string, full_name: string, owner: string, description: string | null, clone_url: string, ssh_url: string, default_branch: string, private: boolean, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type CommandBuilder = {
/**
* Base executable command (e.g., "npx -y @anthropic-ai/claude-code@latest")
*/
base: string,
/**
* Optional parameters to append to the base command
*/
params: Array<string> | null, };
Add a privacy opt in during the onboarding (vibe-kanban) (#146) * Perfect! I've successfully implemented the privacy opt-in dialog feature. Here's what I've accomplished: ## Summary I've added a privacy opt-in dialog to the onboarding flow that: 1. **Appears at the right time**: Shows after the coding agent and IDE selection step, but before the GitHub login 2. **Provides clear information**: Explains what telemetry data is collected (high-level usage metrics) and what is NOT collected (task contents, code snippets, personal data) 3. **Emphasizes user control**: Clearly states that users can opt out at any time in Settings 4. **Handles user preferences**: Stores the telemetry preference in the `analytics_enabled` field of the config 5. **Follows the existing UI patterns**: Uses the same design system as other dialogs in the application ## Key Features - **Clear messaging**: Explains that telemetry helps developers improve the product - **Transparent about data collection**: Lists what is and isn't collected - **User-friendly design**: Two clear buttons - opt-in and opt-out with descriptive text - **Consistent with app design**: Uses shadcn/ui components and follows existing patterns - **Privacy-first**: Defaults to asking permission rather than assuming consent The implementation integrates seamlessly with the existing onboarding flow and properly handles the telemetry preference storage in the backend config system. * Great! Now the issue should be fixed. The privacy dialog should now appear for new users since: 1. ✅ I changed the default config to set `analytics_enabled: None` instead of `Some(true)` 2. ✅ The dialog logic checks for `config.analytics_enabled === null` to show the dialog 3. ✅ Added debug logging to help troubleshoot if needed The dialog will now appear after users complete the onboarding (coding agent and IDE selection) but before the GitHub login step, asking them to opt-in or opt-out of telemetry collection. For users who have already gone through onboarding and have `analytics_enabled: Some(true)` in their config, they won't see the dialog unless they reset their config or manually set `analytics_enabled` to `null`. The privacy dialog should now appear correctly for new users going through the onboarding flow! * Perfect! The build succeeded. Now the privacy dialog should appear correctly. Here's what I fixed: ## The Problem The privacy dialog wasn't showing because: 1. ✅ **Default config issue**: The backend was setting `analytics_enabled: Some(true)` by default instead of `None` 2. ✅ **GitHub login interference**: The GitHub login dialog was being shown at the same time as the privacy dialog 3. ✅ **Flow logic**: The privacy dialog wasn't being properly managed in the onboarding sequence ## The Solution 1. **Changed default config**: Set `analytics_enabled: None` in the backend default config 2. **Fixed dialog precedence**: The GitHub login dialog now only shows after the privacy dialog is completed 3. **Improved flow control**: The privacy dialog shows after onboarding, and GitHub login shows after privacy choice ## The Flow Now 1. **Disclaimer** (if not acknowledged) 2. **Onboarding** (coding agent + IDE selection) 3. **Privacy Opt-in** (NEW - asks about telemetry) 4. **GitHub Login** (after privacy choice is made) The privacy dialog should now appear correctly after you complete the coding agent and IDE selection step. The debug logging will also help us see what's happening in the browser console. * Excellent! The implementation is now complete and working perfectly. Here's what I fixed: ## ✅ Solution: Added `telemetry_acknowledged` Field Instead of using `analytics_enabled` to determine whether to show the dialog, I added a dedicated `telemetry_acknowledged` field to the Config, following the same pattern as `disclaimer_acknowledged` and `onboarding_acknowledged`. ### Changes Made: 1. **Backend Config (`backend/src/models/config.rs`)**: - Added `telemetry_acknowledged: bool` field to Config struct - Set default value to `false` in Default implementation - Regenerated TypeScript types 2. **Frontend Logic (`frontend/src/App.tsx`)**: - Updated dialog flow to use `!config.telemetry_acknowledged` to show privacy dialog - Privacy dialog shows after onboarding is complete - GitHub login only shows after telemetry dialog is completed - Privacy handler sets both `telemetry_acknowledged: true` and `analytics_enabled` to user's choice 3. **Dialog Flow**: - **Disclaimer** → **Onboarding** → **Privacy Opt-in** → **GitHub Login** ### Why This Works Better: - ✅ **Clean separation**: `telemetry_acknowledged` tracks if user has seen the dialog, `analytics_enabled` tracks their choice - ✅ **Consistent pattern**: Follows the same pattern as existing acknowledgment flags - ✅ **Clear flow control**: Each dialog shows in sequence without interference - ✅ **Predictable behavior**: No complex null/undefined checks The privacy dialog should now appear correctly after completing the onboarding step! * Perfect! Here's what I fixed to resolve the overflow issue: ## Layout Improvements 1. **Increased dialog width**: Changed from `sm:max-w-[600px]` to `sm:max-w-[700px]` to give more space 2. **Added scroll support**: Added `max-h-[80vh] overflow-y-auto` to handle very tall content on smaller screens 3. **Better text wrapping**: Added `min-w-0` to text containers to allow proper text wrapping 4. **Responsive footer**: Added `flex-col sm:flex-row` to stack buttons vertically on mobile 5. **Shorter button text**: Changed "No, I'd prefer not to share" to "No thanks" for better fit 6. **Icon positioning**: Added `flex-shrink-0` to icons to prevent them from shrinking ## The dialog now: - ✅ Has adequate width for all content - ✅ Handles overflow gracefully with scrolling - ✅ Works well on both desktop and mobile - ✅ Maintains the professional look while being more compact The privacy dialog should now display properly without any content overflow issues! * Perfect! I've made the dialog much more compact by: ## Height Reduction Changes: 1. **Removed the second card** - Combined the "Why does this help?" explanation into the footer note 2. **Reduced spacing**: `space-y-4 py-4` → `space-y-3 py-3` 3. **Smaller text sizes**: - Title: `text-lg` → `text-base` - Body text: `text-sm` → `text-xs` for descriptions - Main text: `font-medium` → `text-sm font-medium` 4. **Reduced padding**: - Card header: Added `pb-3` and `pt-0` for content - Footer note: `p-3` → `p-2` - Icons: `h-5 w-5` → `h-4 w-4`, `h-4 w-4` → `h-3 w-3` 5. **Tighter gaps**: `gap-3` → `gap-2` for list items 6. **Condensed text**: Made descriptions more concise without losing meaning 7. **Removed overflow scroll**: No longer needed with compact layout The dialog is now much more compact and should fit without any scrolling while still maintaining all the important information and maintaining readability! * Perfect! I've updated the dialog to be accurate and transparent about data collection: ## ✅ Updated Privacy Information ### Key Changes: 1. **Removed "anonymous" claim** - Now says "usage data" instead of "anonymous usage data" 2. **Added GitHub profile information** - Clearly states that username and email are collected for contact purposes 3. **Updated description** - Now mentions "allowing us to contact you if needed" 4. **Clarified what's NOT collected** - Changed "personal data" to "other personal data" to be more specific ### The dialog now accurately reflects: - **What IS collected**: GitHub profile info (for contact), usage metrics, performance data - **Why profile data is collected**: So you can be contacted if necessary - **What is NOT collected**: Task contents, code snippets, project names, other personal data - **User control**: Can change preference anytime in Settings The dialog is now transparent and honest about the data collection while still explaining the benefits of opting in. * copy * lint * prettier
2025-07-11 22:53:40 +01:00
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
export type ExecutorProfileId = {
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
/**
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
* The executor type (e.g., "CLAUDE_CODE", "AMP")
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
*/
executor: BaseCodingAgent,
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
/**
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
* Optional variant name (e.g., "PLAN", "ROUTER")
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
*/
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
variant: string | null, };
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
export type ExecutorConfig = { [key in string]?: { "CLAUDE_CODE": ClaudeCode } | { "AMP": Amp } | { "GEMINI": Gemini } | { "CODEX": Codex } | { "OPENCODE": Opencode } | { "CURSOR": Cursor } | { "QWEN_CODE": QwenCode } };
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
export type ClaudeCode = { claude_code_router?: boolean | null, append_prompt?: string | null, plan?: boolean | null, dangerously_skip_permissions?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
export type Gemini = { model: GeminiModel, append_prompt?: string | null, yolo?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
export type GeminiModel = "default" | "flash";
Add a privacy opt in during the onboarding (vibe-kanban) (#146) * Perfect! I've successfully implemented the privacy opt-in dialog feature. Here's what I've accomplished: ## Summary I've added a privacy opt-in dialog to the onboarding flow that: 1. **Appears at the right time**: Shows after the coding agent and IDE selection step, but before the GitHub login 2. **Provides clear information**: Explains what telemetry data is collected (high-level usage metrics) and what is NOT collected (task contents, code snippets, personal data) 3. **Emphasizes user control**: Clearly states that users can opt out at any time in Settings 4. **Handles user preferences**: Stores the telemetry preference in the `analytics_enabled` field of the config 5. **Follows the existing UI patterns**: Uses the same design system as other dialogs in the application ## Key Features - **Clear messaging**: Explains that telemetry helps developers improve the product - **Transparent about data collection**: Lists what is and isn't collected - **User-friendly design**: Two clear buttons - opt-in and opt-out with descriptive text - **Consistent with app design**: Uses shadcn/ui components and follows existing patterns - **Privacy-first**: Defaults to asking permission rather than assuming consent The implementation integrates seamlessly with the existing onboarding flow and properly handles the telemetry preference storage in the backend config system. * Great! Now the issue should be fixed. The privacy dialog should now appear for new users since: 1. ✅ I changed the default config to set `analytics_enabled: None` instead of `Some(true)` 2. ✅ The dialog logic checks for `config.analytics_enabled === null` to show the dialog 3. ✅ Added debug logging to help troubleshoot if needed The dialog will now appear after users complete the onboarding (coding agent and IDE selection) but before the GitHub login step, asking them to opt-in or opt-out of telemetry collection. For users who have already gone through onboarding and have `analytics_enabled: Some(true)` in their config, they won't see the dialog unless they reset their config or manually set `analytics_enabled` to `null`. The privacy dialog should now appear correctly for new users going through the onboarding flow! * Perfect! The build succeeded. Now the privacy dialog should appear correctly. Here's what I fixed: ## The Problem The privacy dialog wasn't showing because: 1. ✅ **Default config issue**: The backend was setting `analytics_enabled: Some(true)` by default instead of `None` 2. ✅ **GitHub login interference**: The GitHub login dialog was being shown at the same time as the privacy dialog 3. ✅ **Flow logic**: The privacy dialog wasn't being properly managed in the onboarding sequence ## The Solution 1. **Changed default config**: Set `analytics_enabled: None` in the backend default config 2. **Fixed dialog precedence**: The GitHub login dialog now only shows after the privacy dialog is completed 3. **Improved flow control**: The privacy dialog shows after onboarding, and GitHub login shows after privacy choice ## The Flow Now 1. **Disclaimer** (if not acknowledged) 2. **Onboarding** (coding agent + IDE selection) 3. **Privacy Opt-in** (NEW - asks about telemetry) 4. **GitHub Login** (after privacy choice is made) The privacy dialog should now appear correctly after you complete the coding agent and IDE selection step. The debug logging will also help us see what's happening in the browser console. * Excellent! The implementation is now complete and working perfectly. Here's what I fixed: ## ✅ Solution: Added `telemetry_acknowledged` Field Instead of using `analytics_enabled` to determine whether to show the dialog, I added a dedicated `telemetry_acknowledged` field to the Config, following the same pattern as `disclaimer_acknowledged` and `onboarding_acknowledged`. ### Changes Made: 1. **Backend Config (`backend/src/models/config.rs`)**: - Added `telemetry_acknowledged: bool` field to Config struct - Set default value to `false` in Default implementation - Regenerated TypeScript types 2. **Frontend Logic (`frontend/src/App.tsx`)**: - Updated dialog flow to use `!config.telemetry_acknowledged` to show privacy dialog - Privacy dialog shows after onboarding is complete - GitHub login only shows after telemetry dialog is completed - Privacy handler sets both `telemetry_acknowledged: true` and `analytics_enabled` to user's choice 3. **Dialog Flow**: - **Disclaimer** → **Onboarding** → **Privacy Opt-in** → **GitHub Login** ### Why This Works Better: - ✅ **Clean separation**: `telemetry_acknowledged` tracks if user has seen the dialog, `analytics_enabled` tracks their choice - ✅ **Consistent pattern**: Follows the same pattern as existing acknowledgment flags - ✅ **Clear flow control**: Each dialog shows in sequence without interference - ✅ **Predictable behavior**: No complex null/undefined checks The privacy dialog should now appear correctly after completing the onboarding step! * Perfect! Here's what I fixed to resolve the overflow issue: ## Layout Improvements 1. **Increased dialog width**: Changed from `sm:max-w-[600px]` to `sm:max-w-[700px]` to give more space 2. **Added scroll support**: Added `max-h-[80vh] overflow-y-auto` to handle very tall content on smaller screens 3. **Better text wrapping**: Added `min-w-0` to text containers to allow proper text wrapping 4. **Responsive footer**: Added `flex-col sm:flex-row` to stack buttons vertically on mobile 5. **Shorter button text**: Changed "No, I'd prefer not to share" to "No thanks" for better fit 6. **Icon positioning**: Added `flex-shrink-0` to icons to prevent them from shrinking ## The dialog now: - ✅ Has adequate width for all content - ✅ Handles overflow gracefully with scrolling - ✅ Works well on both desktop and mobile - ✅ Maintains the professional look while being more compact The privacy dialog should now display properly without any content overflow issues! * Perfect! I've made the dialog much more compact by: ## Height Reduction Changes: 1. **Removed the second card** - Combined the "Why does this help?" explanation into the footer note 2. **Reduced spacing**: `space-y-4 py-4` → `space-y-3 py-3` 3. **Smaller text sizes**: - Title: `text-lg` → `text-base` - Body text: `text-sm` → `text-xs` for descriptions - Main text: `font-medium` → `text-sm font-medium` 4. **Reduced padding**: - Card header: Added `pb-3` and `pt-0` for content - Footer note: `p-3` → `p-2` - Icons: `h-5 w-5` → `h-4 w-4`, `h-4 w-4` → `h-3 w-3` 5. **Tighter gaps**: `gap-3` → `gap-2` for list items 6. **Condensed text**: Made descriptions more concise without losing meaning 7. **Removed overflow scroll**: No longer needed with compact layout The dialog is now much more compact and should fit without any scrolling while still maintaining all the important information and maintaining readability! * Perfect! I've updated the dialog to be accurate and transparent about data collection: ## ✅ Updated Privacy Information ### Key Changes: 1. **Removed "anonymous" claim** - Now says "usage data" instead of "anonymous usage data" 2. **Added GitHub profile information** - Clearly states that username and email are collected for contact purposes 3. **Updated description** - Now mentions "allowing us to contact you if needed" 4. **Clarified what's NOT collected** - Changed "personal data" to "other personal data" to be more specific ### The dialog now accurately reflects: - **What IS collected**: GitHub profile info (for contact), usage metrics, performance data - **Why profile data is collected**: So you can be contacted if necessary - **What is NOT collected**: Task contents, code snippets, project names, other personal data - **User control**: Can change preference anytime in Settings The dialog is now transparent and honest about the data collection while still explaining the benefits of opting in. * copy * lint * prettier
2025-07-11 22:53:40 +01:00
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
export type Amp = { append_prompt?: string | null, dangerously_allow_all?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
export type Codex = { append_prompt?: string | null, sandbox?: SandboxMode | null, oss?: boolean | null, model?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
export type SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
2025-06-21 10:29:16 +01:00
export type Cursor = { append_prompt?: string | null, force?: boolean | null, model?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
2025-06-21 10:29:16 +01:00
export type Opencode = { append_prompt?: string | null, model?: string | null, agent?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
export type QwenCode = { append_prompt?: string | null, yolo?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, };
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
Profile changes (#596) * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Make variants an object rather than array (vibe-kanban 63213864) Profile variants should be an object, with key used instead of the current label. The code should be refactored leaving no legacy trace. crates/server/src/routes/config.rs crates/executors/src/profile.rs * Remove the command builder from profiles (vibe-kanban d30abc92) It should no longer be possible to customise the command builder in profiles.json. Instead, anywhere where the command is customised, the code should be hardcoded as an enum field on the executor, eg claude code vs claude code router on the claude code struct. crates/executors/src/profile.rs crates/executors/src/executors/claude.rs * fmt * Refactor Qwen log normalization (vibe-kanban 076fdb3f) Qwen basically uses the same log normalization as Gemini, can you refactor the code to make it more reusable. A similar example exists in Amp, where we use Claude's log normalization. crates/executors/src/executors/amp.rs crates/executors/src/executors/qwen.rs crates/executors/src/executors/claude.rs * Add field overrides to executors (vibe-kanban cc3323a4) We should add optional fields 'base_command_override' (String) and 'additional_params' (Vec<String>) to each executor, and wire these fields up to the command builder * Update profiles (vibe-kanban e7545ab6) Redesign the profile configuration storage system to store only differences from defaults instead of complete profile files. Implement partial profile functions (create_partial_profile, load_from_partials, save_as_diffs) that save human-readable partial profiles containing only changed values. Update ProfileConfigs::load() to handle the new partial format while maintaining backward compatibility with legacy full profile formats through automatic migration that creates backups. Implement smart variants handling that only stores changed, added, or removed variants rather than entire arrays. Fix the profile API consistency issue by replacing the manual file loading logic in the get_profiles() endpoint in crates/server/src/routes/config.rs with ProfileConfigs::get_cached() to ensure the GET endpoint uses the same cached data that PUT updates. Add comprehensive test coverage for all new functionality. * Yolo mode becomes a field (vibe-kanban d8dd02f0) Most executors implement some variation of yolo-mode, can you make this boolean field on each executor (if supported), where the name for the field aligns with the CLI field * Change ClaudeCodeVariant to boolean (vibe-kanban cc05956f) Instead of an enum ClaudeCodeVariant, let's use a variable claude_code_router to determine whether to use claude_code_router's command. If the user has also supplied a base_command_override this should take precedence (also write a warning to console) crates/executors/src/executors/claude.rs * Remove mcp_config_path from profile config (vibe-kanban 6c1e5947) crates/executors/src/profile.rs * One profile per executor (vibe-kanban b0adc27e) Currently you can define arbitrary profiles, multiple profiles per executor. Let's refactor to simplify this configuration, instead we should only be able to configure one profile per executor. The new format should be something like: ```json { "profiles": { "CLAUDE_CODE": { "default": { "plan": false, "dangerously_skip_permissions": true, "append_prompt": null }, "plan": { "plan": true, "dangerously_skip_permissions": false, "append_prompt": null } } } } ``` Each profile's defaults should be defined as code instead of in default_profiles.json profile.json will now contain: - Overrides for default configurations - Additional user defined configurations, for executors It is not possible to remove a default configuration entirely, just override the configuration. The user profile.json should still be a minimal set of overrides, to make upgrading easy. Don't worry about migration, this will be done manually. crates/executors/default_profiles.json crates/executors/src/profile.rs * SCREAMING_SNAKE_CASE * update profile.rs * config migration * fmt * delete binding * config keys * fmt * shared types * Profile variants should be saved as SCREAMING_SNAKE_CASE (vibe-kanban 5c6c124c) crates/executors/src/profile.rs save_overrides * rename default profiles * remove defaulted executor fields * backwards compatability * fix legacy variants
2025-09-01 23:33:15 +01:00
export type CodingAgentInitialRequest = { prompt: string,
/**
* Executor profile specification
*/
executor_profile_id: ExecutorProfileId, };
export type CodingAgentFollowUpRequest = { prompt: string, session_id: string,
/**
* Executor profile specification
*/
executor_profile_id: ExecutorProfileId, };
export type CreateTaskAttemptBody = { task_id: string,
/**
* Executor profile specification
*/
executor_profile_id: ExecutorProfileId, base_branch: string, };
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
export type RebaseTaskAttemptRequest = { new_base_branch: string | null, };
Allow multiple merges (#510) * Allow multiple merge for a single task attempt Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Commit changes from coding agent for task attempt 548ff450-df77-47b2-a5ba-c88d0aa4a334 Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend * Create merges table; remove task_attempt.merge_commit Add merge model, replace ta.merge_commit with m.merge_commit Fix frontend * Move PR to merges table * Refactor GitHub repository info retrieval to return structured data * Fix frontend * Reset task branch after PR merge Add branch status handling to TaskDetailsProvider and related components fmt Add branch status handling to TaskDetailsProvider and related components fmt Test (vibe-kanban 1bf1a80f) add test.txt Show merged diff when no worktree present Refresh branch status after PR creation Test (vibe-kanban 1bf1a80f) add test.txt Test (vibe-kanban 1bf1a80f) add test.txt Show rebase when behind Refactor container service to check if the container is clean before showing merged diff; remove unused BranchStatus import Test (vibe-kanban a3c1b297) add test.txt Refactor branch status handling: rename BranchStatusResponse to BranchStatus and update related types and usages Test (vibe-kanban) (#540) * Remove test.txt * Test (vibe-kanban aade357e) add test.txt * test.txt removed. * Fix diff when merged and new commits have been made * Remvoe logging (vibe-kanban) (#541) * Test (vibe-kanban aade357e) add test.txt * Test (vibe-kanban aade357e) add test.txt * Perfect! I've successfully removed the "Fetching branch status" logging statement from the code. The logging has been removed from `crates/server/src/routes/task_attempts.rs:568-571`. * Clear previous errors on successful PR creation, push, merge, and rebase actions * Show branch in worktree dirty error message * Add success indicators for push and merge actions in CurrentAttempt * Refactor status display logic in CurrentAttempt for improved readability and maintainability * Add target_branch_name to merge models and queries for direct and PR merges * Enhance merge status display logic in CurrentAttempt for better clarity on direct merges * Remove unnecessary condition check in attempt data fetching interval * Clippy * Add index for task_attempt_id in merges table to improve query performance * Pass PR creation error * Disable buttons (vibe-kanban 240346bf) Instead of not showing the merge/pr buttons when theyre not available we should disable them. frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx
2025-08-21 16:00:35 +01:00
export type BranchStatus = { commits_behind: number | null, commits_ahead: number | null, has_uncommitted_changes: boolean | null, base_branch_name: string, remote_commits_behind: number | null, remote_commits_ahead: number | null, merges: Array<Merge>, };
export type TaskAttempt = { id: string, task_id: string, container_ref: string | null, branch: string | null, base_branch: string, executor: string, worktree_deleted: boolean, setup_completed_at: string | null, created_at: string, updated_at: string, };
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
export type ExecutionProcess = { id: string, task_attempt_id: string, run_reason: ExecutionProcessRunReason, executor_action: ExecutorAction, status: ExecutionProcessStatus, exit_code: bigint | null, started_at: string, completed_at: string | null, created_at: string, updated_at: string, };
2025-06-21 10:29:16 +01:00
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type ExecutionProcessStatus = "running" | "completed" | "failed" | "killed";
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type ExecutionProcessRunReason = "setupscript" | "cleanupscript" | "codingagent" | "devserver";
Allow multiple merges (#510) * Allow multiple merge for a single task attempt Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Commit changes from coding agent for task attempt 548ff450-df77-47b2-a5ba-c88d0aa4a334 Merge more than once (vibe-kanban 618829fc) When creating a PR, new changes can be pushed after creation. We need merge to work the same way, when changes have been made after the first merge, a second one should work. Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend Remove pinned todo list (vibe-kanban cc66cda2) Make a minimal change to remove the pinned todo list from the frontend * Create merges table; remove task_attempt.merge_commit Add merge model, replace ta.merge_commit with m.merge_commit Fix frontend * Move PR to merges table * Refactor GitHub repository info retrieval to return structured data * Fix frontend * Reset task branch after PR merge Add branch status handling to TaskDetailsProvider and related components fmt Add branch status handling to TaskDetailsProvider and related components fmt Test (vibe-kanban 1bf1a80f) add test.txt Show merged diff when no worktree present Refresh branch status after PR creation Test (vibe-kanban 1bf1a80f) add test.txt Test (vibe-kanban 1bf1a80f) add test.txt Show rebase when behind Refactor container service to check if the container is clean before showing merged diff; remove unused BranchStatus import Test (vibe-kanban a3c1b297) add test.txt Refactor branch status handling: rename BranchStatusResponse to BranchStatus and update related types and usages Test (vibe-kanban) (#540) * Remove test.txt * Test (vibe-kanban aade357e) add test.txt * test.txt removed. * Fix diff when merged and new commits have been made * Remvoe logging (vibe-kanban) (#541) * Test (vibe-kanban aade357e) add test.txt * Test (vibe-kanban aade357e) add test.txt * Perfect! I've successfully removed the "Fetching branch status" logging statement from the code. The logging has been removed from `crates/server/src/routes/task_attempts.rs:568-571`. * Clear previous errors on successful PR creation, push, merge, and rebase actions * Show branch in worktree dirty error message * Add success indicators for push and merge actions in CurrentAttempt * Refactor status display logic in CurrentAttempt for improved readability and maintainability * Add target_branch_name to merge models and queries for direct and PR merges * Enhance merge status display logic in CurrentAttempt for better clarity on direct merges * Remove unnecessary condition check in attempt data fetching interval * Clippy * Add index for task_attempt_id in merges table to improve query performance * Pass PR creation error * Disable buttons (vibe-kanban 240346bf) Instead of not showing the merge/pr buttons when theyre not available we should disable them. frontend/src/components/tasks/Toolbar/CurrentAttempt.tsx
2025-08-21 16:00:35 +01:00
export type Merge = { "type": "direct" } & DirectMerge | { "type": "pr" } & PrMerge;
export type DirectMerge = { id: string, task_attempt_id: string, merge_commit: string, target_branch_name: string, created_at: string, };
export type PrMerge = { id: string, task_attempt_id: string, created_at: string, target_branch_name: string, pr_info: PullRequestInfo, };
export type MergeStatus = "open" | "merged" | "closed" | "unknown";
export type PullRequestInfo = { number: bigint, url: string, status: MergeStatus, merged_at: string | null, merge_commit_sha: string | null, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type EventPatch = { op: string, path: string, value: EventPatchInner, };
Deployments (#414) * init deployment * refactor state * pre executor app state refactor * deployment in app state * clone * fix executors * fix dependencies * command runner via app_state * clippy * remove dependency on ENVIRONMENT from command_runner * remove dependency on ENVIRONMENT from command_runner * build fix * clippy * fmt * featues * vscode lints for cloud * change streaming to SSE (#338) Remove debug logging Cleanup streaming logic feat: add helper function for creating SSE stream responses for stdout/stderr * update vscode guidance * move start * Fix executors * Move command executor to separate file * Fix imports for executors * Partial fix test_remote * Fix * fmt * Clippy * Add back GitHub cloud only routes * cleanup and shared types * Prepare for separate cloud crate * Init backend-common workspace * Update * WIP * WIP * WIP * WIP * WIP * WIP * Projects (and sqlx) * Tasks * WIP * Amp * Backend executor structs * Task attempts outline * Move to crates folder * Cleanup frontend dist * Split out executors into separate crate * Config and sentry * Create deployment method helper * Router * Config endpoints * Projects, analytics * Update analytics paths when keys not provided * Tasks, task context * Middleware, outline task attempts * Delete backend common * WIP container * WIP container * Migrate worktree_path to container_ref (generic) * WIP container service create * Launch container * Fix create task * Create worktree * Move logic into container * Execution outline * Executor selection * Use enum_dispatch to route spawn tree * Update route errors * Implement child calling * Move running executions to container * Add streaming with history * Drop cloud WIP * Logs * Logs * Refactor container logic to execution tracker * Chunk based streaming and cleanup * Alex/mirgate task templates (#350) * Re-enable task templates; migrate routes; migrate args and return types * Refactor task template routes; consolidate list functions into get_templates with query support * Fix get_templates function * Implement amp executor * Gemini WIP * Make streaming the event store reusable * Rewrite mutex to rwlock * Staging for normalised logs impl * Store custom LogMsg instead of event as more flexible * Cleanup * WIP newline stream for amp (tested and working, needs store impl) * refactor: move stranded `git2` logic out of `models` (#352) * remove legacy command_executor; move git2 logic into GitService * remove legacy cloud runner * put back config get route * remove dead logic * WIP amp normalisation * Normalized logs now save to save msg store as raw * Refactor auth endpoints (#355) * Re-enable auth;Change auth to use deployment Add auth service Move auth logic to service Add auth router and service integration to deployment Refactor auth service and routes to use octocrab Refactor auth error handling and improve token validation responses * rename auth_router to router for consistency * refactor: rename auth_service to auth for consistency (#356) * Refactor filesystem endpoints (#357) * feat: implement filesystem service with directory listing and git repo detection * refactor: update filesystem routes; sort repos by last modfied * Gemini executor logs normalization * feat: add sound file serving endpoint and implement sound file loading (#358) * Gemini executor followup (#360) * Sync logs to db (#359) * Exit monitor * Outline stream logs to DB * Outline read from the message store * Add execution_process_logs, store logs in DB * Stream logs from DB * Normalized logs from DB * Remove eronious .sqlx cache * Remove execution process stdout and stderr * Update execution process record on completion * Emit session event for amp * Update session ID when event is emitted * Split local/common spawn fn * Create initial executor session * Move normalized logs into executors * Store executor action * Refactor updated_at to use micro seconds * Follow up executions (#363) * Follow up request handler scaffold Rename coding agent initial / follow up actions * Follow ups * Response for follow up * Simplify execution actions for coding agents * fix executor selection (#362) * refactor: move logic out of `TaskAttempt` (#361) * re-enable /diff /pr /rebase /merge /branch-status /open-editor /delete-file endpoints * address review comments * remove relic * Claude Code (#365) * Use ApiError rather than DeploymentError type in routes (#366) * Fix fe routes (#367) * /api/filesystem/list -> /api/filesystem/directory * /api/projects/:project_id/tasks -> /api/tasks * Remove with-branch * /api/projects/:project_id/tasks/:task_id -> /api/tasks/:task_id * Post tasks * Update template routes * Update BE for github poll endpoint, FE still needs updating * WIP freeze old types * File picker fix * Project types * Solve tsc warna * Remove constants and FE cloud mode * Setup for /api/info refactor * WIP config refactor * Remove custom mapping to coding agents * Update settings to fix code editor * Config fix (will need further changes once attempts types migrated) * Tmp fix types * Config auto deserialisation * Alex/refactor background processes (#369) * feat: add cleanup for orphaned executions at startup * Fix worktree cleanup; re add worktree cleanup queries * refactor worktree cleanup for orphaned and externally deleted worktrees * Fix compile error * refactor: container creation lifecycle (#368) * Consolidate worktree logic in the WorktreeManager * move auxiliary logic into worktree manager * fix compile error * Rename core crate to server * Fix npm run dev * Fix fe routes 2 (#371) * Migrate config paths * Update sounds, refactor lib.rs * Project FE types * Branch * Cleanup sound constants * Template types * Cleanup file search and other unused types * Handle errors * wip: basic mcp config editing (#351) * Re-add notification service, move assets to common dir (#373) add config to containter, add notifications into exit monitor Refctor notification service Refactor notifications * Stderr support (#372) Refactor plain-text log processing and resuse it for gemini, stderr, and potentially other executors. * Fix fe routes 3 (#378) * Task attempts * Task types * Get single task attempt endpoint * Task attempt response * Branch status * More task attempt endpoints * Task attempt children * Events WIP * Stream events when task, task attempt and execution process change status * Fixes * Cleanup logs * Alex/refactor pr monitor (#377) * Refactor task status updates and add PR monitoring functionality * Add PR monitoring service and integrate it into deployment flow Refactor GitHub token retrieval in PR creation and monitoring services Fix github pr regex * Fix types * refactor: dev server logic (#374) * reimplement start dev server logic * robust process group killing * Fix fe routes 4 (#383) * Add endpoint to get execution processes * Update types for execution process * Further execution process type cleanup * Wipe existing logs display * Further process related cleanup * Update get task attempt endpoint * Frozen type removal * Diff types * Display raw logs WIP * fix: extract session id once per execution (#386) * Fix fe routes 5 (#387) * Display normalized logs * Add execution-process info endpoint * WIP load into virtualized * Simplified unified logs * Raw logs also use json patch now (simplifies FE keys) * WIP * Fix FE rendering * Remove timestamps * Fix conversation height * Cleanup entry display * Spacing * Mark the boundaries between different execution processes in the logs * Deduplicate entries * Fix replace * Fmt * put back stop execution process endpoint (#384) * Fix fe routes 6 (#391) * WIP cleanup to remove related tasks and plans * Refactor active tab * Remove existing diff FE logic * Rename tab * WIP stream file events * WIP track FS events * Respect gitignore * Debounced event * Deduplicate events * Refactor git diff * WIP stream diffs * Resolve issue with unstaged changes * Diff filter by files * Stream ongoing changes * Remove entries when reset and json patch safe entry ids * Update the diff tab * Cleanup logs * Cleanup * Error enum * Update create PR attempt URL * Follow up and open in IDE * Fix merge * refactor: introduce `AgentProfiles` (#388) * automatically schedule coding agent execution after setup script * profiles implementation * add next_action field to ExecutorAction type * make start_next_action generic to action type Remove ProfilesManager and DefaultCommandBuilder structs * store executor_action_type in the DB * update shared types * rename structs * fix compile error * Refactor remaining task routes (#389) * Implement deletion functionality for execution processes and task attempts, including recursive deletion of associated logs. refactor: deletion process for task attempts and associated entities feat: Refactor task and task attempt models to remove executor field - Removed the `executor` field from the `task_attempt` model and related queries. - Updated the `CreateTaskAndStart` struct to encapsulate task and attempt creation. - Modified the task creation and starting logic to accommodate the new structure. - Adjusted SQL queries and migration scripts to reflect the removal of the executor. - Enhanced notification service to handle executor types dynamically. - Updated TypeScript types to align with the changes in the Rust models. refactor: remove CreateTaskAndStart type and update related code Add TaskAttemptWithLatestProfile and alias in frontend Fix silent failure of sqlx builder Remove db migration Fix rebase errors * Remove unneeded delete logic; move common container logic to service * Profiles fe (#398) * Get things compiling * Refactor the config * WIP fix task attempt creation * Further config fixes * Sounds and executors in settings * Fix sounds * Display profile config * Onboarding * Remove hardcoded agents * Move follow up attempt params to shared * Remove further shared types * Remove comment (#400) * Codex (#380) * only trigger error message when RunReason is SetupScript (#396) * Opencode (#385) * Restore Gemini followups (#392) * fix task killing (#395) * commit changes after successful execution (#403) * Claude-code-router (#410) * Amp tool use (#407) * Config upgrades (#405) * Versioned config * Upgrade fixes * Save config after migration * Scoping * Update Executor types * Theme types fix * Cleanup * Change theme selector to an enum * Rename config schema version field * Diff improve (#412) * Ensure container exists * Safe handling when ExecutorAction isn't valid JSON in DB * Reset data when endpoint changes * refactor: conditional notification (#408) * conditional notification * fix next action run_reason * remove redundant log * Fix GitHub auth frontend (#404) * fix frontend github auth * Add GitHub error handling and update dependencies - Introduced GitHubMagicErrorStrings enum for consistent error messaging related to GitHub authentication and permissions. - Updated the GitHubService to include a check_token method for validating tokens. - Refactored auth and task_attempts routes to utilize the new error handling. - Added strum_macros dependency in Cargo.toml for enum display. * Refactor GitHub error handling and API response structure to use CreateGitHubPRErrorData * Refactor API response handling in CreatePRDialog and update attemptsApi to return structured results * Refactor tasksApi.createAndStart to remove projectId parameter from API call * use SCREAMING_SNAKE_CASE for consistency * Refactor GitHub error handling to replace CreateGitHubPRErrorData with GitHubServiceError across the codebase * Update crates/utils/src/response.rs Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix compile error * Fix types --------- Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> * Fix: (#415) - Config location - Serve FE from BE in prod - Create config when doesn't exist - Tmp disable building the MCP * Fix dev server route (#417) * remove legacy logic and unused crates (#418) * update CLAUDE.md for new project structure (#420) * fix mcp settings page (#419) * Fix cards not updating (vibe-kanban) (#416) * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * Commit changes from coding agent for task attempt 774a2cae-a763-4117-af0e-1287a043c462 * feat: update task status management in container service * refactor: simplify notification logic and finalize context checks in LocalContainerService * Task attempt fe fixes (#422) * Style tweaks * Refactor * Fix auto scroll * Implement stop endpoint for all execution processed in a task attempt * Weird race condition with amp * Remove log * Fix follow ups * Re-add stop task attempt endpoint (#421) * Re-add stop task attempt endpoint; remove legacy comments for implemented functionality * Fix kill race condition; fix state change when dev server * Ci fixes (#425) * Eslint fix * Remove #[ts(export)] * Fix tests * Clippy * Prettier * Fmt * Version downgrade * Fix API response * Don't treat clippy warnings as errors * Change crate name * Update cargo location * Update further refs * Reset versions * Bump versions * Update binary names * Branch fix * Prettier * Ensure finished event sends data (#434) * use option_env! when reading analytics vars (#435) * remove dead logic (#436) * update crate version across workspace (#437) * add all crates across the workspace * chore: bump version to 0.0.56 --------- Co-authored-by: Alex Netsch <alex@bloop.ai> Co-authored-by: Gabriel Gordon-Hall <gabriel@bloop.ai> Co-authored-by: Solomon <abcpro11051@disroot.org> Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Co-authored-by: GitHub Action <action@github.com>
2025-08-08 13:53:27 +01:00
export type EventPatchInner = { db_op: string, record: RecordTypes, };
2025-09-02 22:00:41 +01:00
export type RecordTypes = { "type": "TASK", "data": Task } | { "type": "TASK_ATTEMPT", "data": TaskAttempt } | { "type": "EXECUTION_PROCESS", "data": ExecutionProcess } | { "type": "DELETED_TASK", "data": { rowid: bigint, project_id: string | null, task_id: string | null, } } | { "type": "DELETED_TASK_ATTEMPT", "data": { rowid: bigint, task_id: string | null, } } | { "type": "DELETED_EXECUTION_PROCESS", "data": { rowid: bigint, task_attempt_id: string | null, } };
export type CommandExitStatus = { "type": "exit_code", code: number, } | { "type": "success", success: boolean, };
export type CommandRunResult = { exit_status: CommandExitStatus | null, output: string | null, };
export type NormalizedConversation = { entries: Array<NormalizedEntry>, session_id: string | null, executor_type: string, prompt: string | null, summary: string | null, };
Redesign sidebar (#63) * Agent logs * ## Summary I have successfully implemented a comprehensive log normalization system for vibe-kanban with the following features: ### ✅ **Completed Tasks:** 1. **Defined normalized log format types** - Created standard TypeScript-exportable types: - `NormalizedConversation` - Top-level container with entries, session ID, and executor type - `NormalizedEntry` - Individual conversation entries with timestamp, type, and content - `NormalizedEntryType` - Union type for different entry types (user, assistant, tool use, system, thinking) - `ActionType` - Specific action types for tool operations (file read/write, commands, search, etc.) 2. **Implemented normalize method for AMP executor** - Parses AMP's JSONL format to extract: - User and assistant messages - Thinking content - Tool usage with intelligent action type detection - Session ID (threadID) - Timestamps from message metadata 3. **Implemented normalize method for Claude executor** - Parses Claude's stream-json format to extract: - User and assistant messages - Tool usage with action type detection - System initialization messages - Session ID - Comprehensive tool mapping for Claude-specific tools 4. **Added normalize method to executor trait** - Created a default implementation that returns empty results for unsupported executors, allowing easy extension to other executor types 5. **Created new API endpoint for normalized logs** - Added `GET /api/projects/{project_id}/execution-processes/{process_id}/normalized-logs` endpoint that: - Validates execution process belongs to the correct project - Determines executor type automatically - Applies appropriate normalization logic - Returns standardized conversation format 6. **Tested the implementation** - Created comprehensive unit tests for both AMP and Claude normalization, verifying correct parsing of real log examples ### 🔧 **Technical Implementation Details:** - **Intelligent Action Type Detection**: The system maps tool names to specific action types (file operations, commands, searches, etc.) based on tool names and input parameters - **Cross-platform Compatibility**: Handles different parameter naming conventions between executors - **Error Handling**: Robust error handling with detailed error messages for debugging - **TypeScript Integration**: Full TypeScript type generation for frontend consumption - **Extensible Design**: Easy to add new executors by implementing the `normalize_logs` method ### 🚀 **Usage:** The new endpoint can be called to get a normalized view of any execution process logs: ```bash GET /api/projects/{project_id}/execution-processes/{process_id}/normalized-logs ``` This returns a standardized conversation format that the frontend can easily consume to display: - User inputs and assistant responses - Tool usage with specific action details (file paths, commands, etc.) - Internal reasoning (thinking) - System status messages - Session tracking information The normalized format provides a high-level, consistent representation of the conversation regardless of which executor (AMP, Claude, etc.) generated the original logs. * Perfect! I have successfully implemented the normalized logs feature. Here's a summary of what was accomplished: ## Summary ✅ **Replaced manual log rendering with normalized logs API** ### Key Changes Made: 1. **Created a new `NormalizedConversationViewer` component** that: - Fetches normalized logs from the backend API endpoint - Displays conversation entries with appropriate icons for each type: - 👤 User messages (blue) - 🤖 Assistant messages (green) - ⚙️ System messages (gray) - 🧠 Thinking (purple) - 👁️ File reads (orange) - ✏️ File writes (red) - 💻 Command execution (yellow) - 🔍 Search operations (indigo) - 🌐 Web fetches (cyan) - ➕ Task creation (teal) - Shows timestamps and entry type labels - Handles loading and error states 2. **Updated `TaskActivityHistory` component** to: - Use the new `NormalizedConversationViewer` instead of `ExecutionOutputViewer` - Pass the required `projectId` prop - Maintain the same expansion/collapse functionality 3. **Updated `TaskDetailsPanel`** to pass the `projectId` to the activity history 4. **Removed legacy components**: - The complex `ExecutionOutputViewer` that manually parsed JSONL - The `ConversationViewer` that handled format-specific parsing - All the manual stdout/stderr rendering logic ### Benefits: - **Cleaner codebase**: Eliminated complex frontend parsing logic - **Consistent display**: All executors now show logs in the same format - **Better UX**: Clear icons and labels make it easy to understand conversation flow - **Maintainable**: Backend handles format normalization, frontend just displays - **Extensible**: New executor types automatically work with the existing UI The implementation leverages the existing `/api/projects/{project_id}/execution-processes/{process_id}/normalized-logs` endpoint and properly handles loading states, errors, and displays the conversation history with meaningful icons for each entry type. * Excellent! The build is successful and the bundle size is slightly smaller after removing the unused code. The task is now complete: ✅ **Legacy log rendering components successfully removed** - Deleted `ExecutionOutputViewer.tsx` (224 lines) - Deleted `ConversationViewer.tsx` (complex JSONL parsing logic) - Build passes and bundle size reduced - All functionality now uses the clean normalized logs API The codebase is now cleaner and fully transitioned to using the normalized logs system. * Perfect! I've successfully refactored the [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx) component with the new layout: ## Key Changes Made: 1. **Top 2/3 - Code Changes Section**: - Extracted all the diff processing logic from [`task-attempt-compare.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/pages/task-attempt-compare.tsx) - Shows file diffs with syntax highlighting, expandable sections, and line numbers - Includes file deletion functionality - "Show/Hide All Unchanged" toggle for better navigation 2. **Bottom 1/3 - Agent Logs Section**: - Preserved the existing [`TaskActivityHistory`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskActivityHistory.tsx) component - Auto-scrolling behavior for new log entries - Clear separation with border and background styling 3. **Maintained Existing Functionality**: - Header, toolbar, and follow-up sections remain unchanged - Editor selection dialog and ESC key handling preserved - All existing hooks and state management intact The component now provides a much better developer experience by showing code changes prominently in the top section while keeping the agent logs easily accessible in the bottom third. * Perfect! The build is successful. I've implemented all the requested style changes to the [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: **Code Changes Section (Top 2/3):** - ✅ Removed "Code Changes" header - ✅ Removed description text - ✅ Removed "Show All Unchanged" button and related functionality - ✅ Removed parent Card wrapper - each file diff is now directly displayed in its own card **Agent Logs Section (Bottom 1/3):** - ✅ Removed "Agent Logs" header - ✅ Removed description text - ✅ Now displays only the `NormalizedConversationViewer` component - ✅ Removed card/container wrapper The component now has a cleaner, more streamlined interface with the code changes taking up most of the space in the top section, and the agent conversation displayed directly in the bottom third without extra headers or containers. * Perfect! The build is successful. I've updated the [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx) to properly find and display the coding agent conversation. ## Changes Made: The component now: 1. **First looks** for any running coding agent process in `runningProcessDetails` 2. **If not found**, searches through all processes in the `processes` array to find any coding agent process (completed or otherwise) 3. **Creates a minimal ExecutionProcess object** from the summary data if needed, since the `NormalizedConversationViewer` only requires the process ID to fetch the conversation data 4. **Displays the conversation** for any coding agent process found, whether running or completed This should resolve the "Unsupported executor type: unknown" error and properly show the normalized conversation logs from the coding agent in the bottom section. * Perfect! I've successfully updated the [`NormalizedConversationViewer.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/NormalizedConversationViewer.tsx) component with the requested style changes: ## Changes Made: 1. **Removed metadata header** - No longer shows executor type, session ID, or process type badges 2. **Removed Card wrapper** - The conversation entries are now displayed directly without any card container or special background 3. **Removed timestamps** - Each entry no longer shows the date/time information 4. **Cleaned up imports** - Removed unused imports for Card, CardContent, and Badge components The normalized logs now display as a clean, minimal conversation with just the entry type icon, entry type label, and content for each message in the agent conversation. * Perfect! I've made the requested style improvements to the diffs in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: 1. **Removed max height limit** - Each file diff card no longer has a `max-h-[400px] overflow-y-auto` constraint, so the entire diff content is visible without individual scrolling per file 2. **Enhanced diff line colors** - Updated the background colors for added and removed lines: - **Added lines** (Insert): Now use `bg-green-100` (light mode) and `bg-green-900/40` (dark mode) with stronger green text colors - **Removed lines** (Delete): Now use `bg-red-100` (light mode) and `bg-red-900/40` (dark mode) with stronger red text colors - Made the border colors more prominent with `border-green-500` and `border-red-500` The diffs now display with clearer visual distinction between added and removed lines, and each file shows its complete content without requiring individual scrolling. * Perfect! I've fixed the line number background colors in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: 1. **Added `getLineNumberClassName` function** - This creates appropriate styling for line numbers based on the chunk type: - **Added lines**: Green background (`bg-green-50`/`bg-green-900/20`) with green text and borders - **Removed lines**: Red background (`bg-red-50`/`bg-red-900/20`) with red text and borders - **Unchanged lines**: Gray background (original styling) 2. **Updated line number div** - Replaced the hardcoded gray styling with a call to `getLineNumberClassName(line.chunkType)` Now the line numbers will have matching background colors with their corresponding lines - green for additions, red for deletions, and gray for unchanged context lines. This creates a more cohesive visual experience for the diff display. * Perfect! I've updated the line number background colors to match the main line content exactly: ## Changes Made: - **Added lines**: Line numbers now use `bg-green-100 dark:bg-green-900/40` (same as the main content) - **Removed lines**: Line numbers now use `bg-red-100 dark:bg-red-900/40` (same as the main content) Now the line numbers have the same background intensity as the main line content, creating a consistent visual appearance across the entire diff line without the lighter/more transparent look. * Perfect! I've made all the requested improvements to the diff styling in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: 1. **Added horizontal scrolling** - The diff container now has `overflow-x-auto` and each line has `min-w-max` to ensure long lines can be scrolled horizontally 2. **Removed thick border** - Removed the `border-l-2 border-green-500` and `border-l-2 border-red-500` thick left borders from added/removed lines 3. **GitHub-style background intensity** - Now follows GitHub's pattern: - **Line content**: Lighter background (`bg-green-50`/`bg-red-50` for light mode, `bg-green-900/20`/`bg-red-900/20` for dark mode) - **Line numbers**: Darker background (`bg-green-100`/`bg-red-100` for light mode, `bg-green-900/40`/`bg-red-900/40` for dark mode) The diff now has a cleaner appearance without the heavy borders, proper horizontal scrolling for long lines, and follows GitHub's visual hierarchy where line numbers have more prominent background colors than the content. * Perfect! I've fixed both issues in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: 1. **Fixed line number background height** - Added `py-1` to the `getLineNumberClassName` function so the line number background now has the same vertical padding as the content lines, ensuring full height coverage 2. **Fixed horizontal scrolling layout** - Wrapped the diff content in a proper container structure: - Added `min-w-full` wrapper inside the `overflow-x-auto` container - This ensures that elements like horizontal lines and borders aren't cut off during horizontal scrolling - The scrolling now works properly without affecting other page elements The diff now has proper horizontal scrolling that doesn't interfere with other page elements, and the line number backgrounds extend to the full height of each line. * Perfect! I've fixed both issues in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: 1. **Fixed line number background height** - Both the line numbers and content now use `py-1` consistently, ensuring the backgrounds match in height perfectly 2. **Fixed horizontal scrolling** - Changed the approach: - Used `whitespace-nowrap` instead of `whitespace-pre` to prevent wrapping - Used `min-w-max` on each line to ensure they extend naturally - The overflow scrolling now works at the container level without cutting off other elements - Removed the problematic nested wrapper structure The line number backgrounds now extend to the full height of each line, and horizontal scrolling works properly without affecting other page elements like borders and buttons. * Perfect! I've fixed both issues in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: 1. **Fixed line number background height gaps**: - Used `min-h-[1.75rem] flex items-center` for both line numbers and content divs - This ensures both backgrounds have exactly the same height with no gaps above or below - Removed separate `py-1` padding that was causing misalignment 2. **Fixed horizontal scroll border cutoff**: - Added `min-w-max` to the "show X more lines" buttons - This ensures the buttons extend to the full width of the scrollable content - The borders now remain visible even when scrolling horizontally Now the line number backgrounds perfectly match the line content height with no color gaps, and the expand/collapse buttons maintain their borders during horizontal scrolling. * Perfect! I've fixed both remaining horizontal scroll issues in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Changes Made: 1. **Fixed highlighted line backgrounds during scroll**: - Changed from `min-w-max` to `w-full` for the base class - Added `style={{ minWidth: 'max-content' }}` to ensure lines extend to natural content width - Used `inline-block min-w-full` container to create proper scrollable width - Now all highlighted lines (green/red) maintain their background color across the full scrollable width 2. **Fixed "show more lines" button borders**: - Wrapped buttons in `div className="w-full"` containers - Removed `min-w-max` from button classes and used `w-full` - The buttons now properly extend across the full scrollable width - Borders remain visible during horizontal scrolling Now the diff view has proper horizontal scrolling where: - All highlighted lines maintain their background colors across the entire scroll width - The "show X more lines" buttons maintain their borders when scrolling - The entire diff content scrolls cohesively * Perfect! I've fixed the indentation issue in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Change Made: - **Fixed indentation preservation**: Changed from `whitespace-nowrap` to `whitespace-pre` in the `getChunkClassName` function Now the diff properly preserves: - Code indentation (spaces and tabs) - All whitespace formatting - Line spacing as it appears in the original code The horizontal scrolling functionality remains intact while properly displaying the code formatting and indentation structure. * Perfect! I've right-aligned the text in the expand/collapse buttons in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Change Made: - **Added `justify-end`** to both "Show X more lines" and "Hide expanded lines" buttons Now the button text ("Show X more lines" and "Hide expanded lines") is right-aligned, which means: - The text stays visible and consistent during horizontal scrolling - Users can always see the action text regardless of scroll position - The interface feels more stable when navigating wide diffs * Perfect! I've left-aligned the text in the expand/collapse buttons in [`TaskDetailsPanel.tsx`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-7218-refactor-t/frontend/src/components/tasks/TaskDetailsPanel.tsx): ## Change Made: - **Changed `justify-end` to `justify-start`** for both "Show X more lines" and "Hide expanded lines" buttons Now the button text is left-aligned, which means: - The text appears at the left edge of the button and stays visible during horizontal scrolling - Users can always see the action text at a consistent position - The interface aligns with the left-aligned line numbers below it * ## Summary I've successfully improved the normalized logs to show more concise content. Here's what was changed: ### Key Improvements 1. **File Operations**: Now show just the file path (e.g., `"src/components/TaskDialog.tsx"`) instead of verbose tool descriptions 2. **Commands**: Now show just the bash command (e.g., `"npm run build"`) instead of full tool invocation details 3. **Search Operations**: Now show just the search query (e.g., `"authentication headers"`) instead of tool metadata 4. **Web Requests**: Now show just the URL (e.g., `"https://api.example.com/data"`) instead of verbose descriptions 5. **Other Tools**: Now show concise, meaningful descriptions (e.g., `"Managing TODO list"` for todo tools) ### Changes Made 1. **Updated AMP Executor** (`backend/src/executors/amp.rs`): - Added `generate_concise_content()` method - Modified tool_use content generation to use the new concise format 2. **Updated Claude Executor** (`backend/src/executors/claude.rs`): - Added `generate_concise_content()` method - Modified tool_use content generation to use the new concise format 3. **Updated Documentation** (`test_normalized_logs_api.md`): - Updated example response to show the new concise format - Added detailed explanation of the new content format with examples 4. **Added Tests**: - Enhanced existing tests to verify the new concise content format - Tests confirm that `todo_write` shows "Managing TODO list" instead of verbose JSON - Tests confirm that `Task` tool shows the task description directly ### Before and After **Before:** ```json { "content": "Tool: todo_write with input: {\"todos\":[{\"id\":\"1\",\"content\":\"Explore task creation dialog component\",\"status\":\"todo\",\"priority\":\"high\"}]}" } ``` **After:** ```json { "content": "Managing TODO list" } ``` The implementation now provides much cleaner, more actionable content in the normalized conversation logs while maintaining all the rich metadata in the `action_type` field for programmatic access. * Perfect! The frontend builds successfully. Now the normalized conversation logs will display much cleaner - just showing the appropriate icon next to the concise content without any redundant headers. ## Summary I've removed the headers from the normalized conversation log display. Now instead of showing: **Before:** ``` [file icon] Read: src/components/TaskDialog.tsx src/components/TaskDialog.tsx [command icon] Command: npm run build npm run build ``` **After:** ``` [file icon] src/components/TaskDialog.tsx [command icon] npm run build [search icon] authentication headers [todo icon] Managing TODO list ``` ### Changes Made 1. **Removed redundant header display** - The `getEntryTypeDisplay` function and its usage has been removed 2. **Simplified layout** - Each log entry now shows just the icon and concise content directly 3. **Cleaner UI** - No more redundant information since the content is already concise and the icon provides the context The display is now much cleaner and more efficient, with the icon providing the visual context for the action type and the concise content providing the essential information. * Perfect! The frontend builds successfully. ## Summary I've updated the NormalizedConversationViewer to render terminal commands with a monospace font. Now: ### Changes Made 1. **Added `getContentClassName` function** - This function conditionally applies styling based on the entry type 2. **Applied monospace font for commands** - When the entry type is a tool_use with action_type of "command_run", it applies the `font-mono` Tailwind class 3. **Maintained existing styling** - All other entry types keep the same styling as before ### Result Now terminal commands like: - `npm run build` - `cargo check` - `git status` - `ls -la` Will be displayed in a monospace font next to the terminal icon, making them more readable and clearly distinguishable as code/commands, while other content like file paths, search queries, and regular text continue to use the default font. The monospace font makes commands much easier to read and gives them the appropriate technical appearance that users expect for terminal output. * Excellent! Everything builds successfully. ## Summary I've implemented real-time conversation updates with smart auto-scrolling functionality. Here's what was added: ### Key Features 1. **Auto-refresh**: The conversation automatically polls for updates every 2 seconds when the execution process is running 2. **Smart auto-scrolling**: Automatically scrolls to the bottom when new content arrives 3. **User scroll detection**: Stops auto-scrolling when the user manually scrolls up 4. **Auto-scroll resumption**: Resumes auto-scrolling when the user scrolls back to the bottom 5. **Efficient updates**: Only updates the conversation state when content actually changes ### Implementation Details **Auto-refresh Logic:** - Polls every 2 seconds when `executionProcess.status === 'running'` - Uses efficient content comparison to avoid unnecessary re-renders - Gracefully handles polling errors without disrupting the UI **Smart Scrolling:** - Tracks user scroll behavior vs automatic scrolling - Uses a 5px threshold to detect "at bottom" state - Provides smooth auto-scrolling with a small delay to ensure DOM updates **User Experience:** - Container has `max-h-96` with `overflow-y-auto` for scrollable content - Terminal commands display in monospace font - Clean display with just icons and concise content - No disruption when user wants to review previous logs ### Behavior - ✅ **Auto-updates**: Content refreshes every 2 seconds during execution - ✅ **Auto-scroll**: New content automatically scrolls into view - ✅ **Manual control**: User can scroll up to review previous logs - ✅ **Resume auto-scroll**: When user scrolls back to bottom, auto-scrolling resumes - ✅ **Efficient**: Only re-renders when content actually changes - ✅ **Clean UI**: Terminal commands in monospace, no redundant headers The conversation viewer now provides a seamless, real-time experience that follows the execution while respecting user control over scrolling behavior. * ## Summary I've successfully fixed the scroll-within-scroll issue in the TaskDetailsPanel. Here's what was changed: **Problem**: The normalized logs section had nested scrolling containers: - Parent container (TaskDetailsPanel) with `h-full overflow-y-auto` - Child container (NormalizedConversationViewer) with `max-h-96 overflow-y-auto` **Solution**: I removed the scrolling functionality from the `NormalizedConversationViewer` component by: 1. **Removed scroll container**: Changed from `<div ref={scrollContainerRef} className="space-y-2 max-h-96 overflow-y-auto" onScroll={handleScroll}>` to just `<div className="space-y-2">` 2. **Cleaned up scroll-related code**: Removed: - State variables: `isUserScrolling`, `scrollContainerRef`, `scrollTimeoutRef`, `lastScrollTop` - Functions: `isAtBottom`, `scrollToBottom`, `handleScroll` - Effects: Auto-scroll on conversation updates and scroll timeout cleanup - Unused imports: `useRef` 3. **Verified functionality**: The parent container in TaskDetailsPanel now handles all scrolling for the logs section, eliminating the annoying nested scroll behavior. The build and lint checks pass successfully, and the user experience should now be much smoother without the competing scroll areas. * ## Summary I've successfully fixed the scroll-within-scroll issue while preserving the auto-scroll functionality. Here's what I implemented: **Problem**: Nested scroll containers created annoying scroll-within-scroll behavior: - Parent: TaskDetailsPanel with `h-full overflow-y-auto` - Child: NormalizedConversationViewer with `max-h-96 overflow-y-auto` **Solution**: Moved all scroll logic to the parent container while maintaining auto-scroll behavior: ### Changes Made: 1. **Removed inner scroll container** from NormalizedConversationViewer: - Removed `max-h-96 overflow-y-auto` classes - Removed all scroll-related state and functions - Simplified to just `<div className="space-y-2">` 2. **Added callback interface** to NormalizedConversationViewer: - Added `onConversationUpdate?: () => void` prop - Called this callback when conversation data changes - Used `setTimeout` to ensure state updates happen before auto-scroll 3. **Enhanced TaskDetailsPanel scroll logic**: - Added `conversationUpdateTrigger` state to track conversation changes - Added `handleConversationUpdate` callback function - Extended existing auto-scroll effect to include conversation updates - Maintained existing manual scroll detection logic ### Key Benefits: ✅ **No more nested scrolling** - Only the parent container scrolls ✅ **Auto-scroll preserved** - New messages still auto-scroll to bottom ✅ **Manual scroll respected** - Auto-scroll stops when user manually scrolls up ✅ **Smart resumption** - Auto-scroll resumes when user scrolls back to bottom ✅ **Seamless integration** - Works with existing activity and process log auto-scroll The solution maintains all existing functionality while providing a much better user experience by eliminating the competing scroll areas. * ## Summary I've successfully updated the task attempts diff endpoint to include unstaged changes in addition to the existing committed changes. Here's what was implemented: ### Key Changes Made: 1. **Enhanced `get_diff` method** in [`backend/src/models/task_attempt.rs`](file:///private/var/folders/kr/jdxkcn7129j376nrg0stj9zm0000gn/T/vk-4fbf-update-dif/backend/src/models/task_attempt.rs#L1042-L1379): - Added logic to capture unstaged changes using `diff_tree_to_workdir_with_index` - For files with both committed and unstaged changes, creates a combined diff from the base branch to the current working directory - For files with only unstaged changes, generates a standard diff 2. **New helper function** `process_unstaged_file`: - Handles the processing of individual unstaged files - Manages the complex logic of combining committed and unstaged changes - Uses Git's native patch generation for accurate diff representation ### How It Works: **For merged task attempts:** Shows the original merge commit diff (unchanged behavior) **For active task attempts:** 1. **First pass:** Generates diff from base branch to current HEAD commit (committed changes) 2. **Second pass:** Finds files with unstaged changes in the working directory 3. **Combining logic:** - **Files with both committed & unstaged changes:** Creates a combined diff from base branch directly to working directory content - **Files with only unstaged changes:** Adds them as separate diff entries - **Files with only committed changes:** Keeps original diff (unchanged) ### Benefits: - ✅ **Complete visibility:** Users can now see both committed and uncommitted work - ✅ **Unified view:** All changes are presented in a single coherent diff - ✅ **Backward compatible:** Existing functionality for merged attempts remains unchanged - ✅ **Accurate representation:** Uses Git's native diff algorithms for consistent formatting The implementation maintains the existing API structure while extending functionality to provide a more comprehensive view of all changes in a task attempt. * Perfect! I have successfully implemented the dynamic task details section that updates based on execution state. Here's a summary of what was accomplished: ## Summary I implemented a comprehensive solution to make the details section dynamically update based on the execution state: ### Backend Changes: 1. **Added new execution state types** in `backend/src/models/task_attempt.rs`: - `ExecutionState` enum with states: NotStarted, SetupRunning, SetupComplete, SetupFailed, CodingAgentRunning, CodingAgentComplete, CodingAgentFailed, Complete - `TaskAttemptState` struct containing execution state, change detection, and process IDs 2. **Created `get_execution_state` method** that analyzes: - Project setup script configuration - Running execution processes - Process status and completion - Whether changes have been made to the worktree 3. **Added new API endpoint** `GET /projects/:project_id/tasks/:task_id/attempts/:attempt_id` to fetch execution state 4. **Updated type generation** to include the new types in the shared TypeScript definitions ### Frontend Changes: 1. **Enhanced useTaskDetails hook** to: - Poll the execution state endpoint every 2 seconds - Fetch execution state when switching attempts - Provide execution state data to components 2. **Completely redesigned TaskDetailsPanel** with dynamic content rendering: - **Setup Script Running**: Shows loading spinner with "Setup Script Running" message - **Setup Failed**: Shows error message - **Coding Agent Running (no changes)**: Shows full-height agent conversation only - **Changes Available**: Shows 2/3 changes + 1/3 conversation split view - **Default**: Shows "execution not started" message ### Key Features: - **Real-time Updates**: Polls execution state every 2 seconds during execution - **Progressive Disclosure**: Shows appropriate content based on execution phase - **State-Aware UI**: Different layouts for different execution states - **Error Handling**: Proper error states for failed setup scripts - **Type Safety**: Full TypeScript support for execution states The implementation ensures that users see relevant information at each stage of task execution, providing better visibility into what's happening and reducing confusion about the current state. * Perfect! The fix is now in place. Here's what I've done to solve the loading spinner issue: ## Fix Summary The problem was that the execution state was only being fetched during: 1. Polling (when `isAttemptRunning` is true) 2. Manual attempt switching via `handleAttemptChange` But it was **not** being fetched during the initial page load when an attempt was automatically selected. ## Changes Made 1. **Added useEffect for selectedAttempt changes**: This ensures that whenever `selectedAttempt` changes (including during initial load), both `fetchAttemptData` and `fetchExecutionState` are called. 2. **Updated fetchTaskAttempts**: Added `fetchExecutionState` call when setting the latest attempt during initial load, and included it in the dependency array. ## How the Fix Works Now when the page reloads: 1. `fetchTaskAttempts` runs and finds the latest attempt 2. It sets `selectedAttempt` to the latest attempt 3. The new useEffect detects the `selectedAttempt` change and immediately calls both: - `fetchAttemptData(selectedAttempt.id)` - `fetchExecutionState(selectedAttempt.id)` 4. The execution state is loaded, so the appropriate content is shown instead of the loading spinner This ensures that the execution state is always available when displaying attempt details, whether it's the initial load, manual switching between attempts, or during polling updates. * Perfect! The changes have been successfully implemented. Here's a summary of what I've done: ## Changes Made ### 1. Setup Script Stdio Display - **Modified the setup running state** to show the actual stdout/stderr of the setup script instead of just a spinner - **Enhanced process lookup** to find the setup script execution process from either the execution state's `setup_process_id` or by searching for processes with type `setupscript` - **Added terminal-style output display** with: - Black background and green text (terminal aesthetic) - Monospace font for proper formatting - Scrollable area with max height - Fallback to "No output yet..." when no output is available ### 2. Diff Refresh During Coding Agent Execution - **Added automatic diff polling** when the coding agent is running - **Polls every 3 seconds** during `CodingAgentRunning` state to catch file changes as they happen - **Uses existing fetchDiff function** to maintain consistency with manual refresh behavior ### 3. Enhanced Process Data Fetching - **Modified fetchAttemptData** to always fetch setup script process details when available - **Ensures setup script output is available** even when the script has completed but we want to show its output - **Maintains existing logic** for other running processes while adding setup script support ## Key Features 1. **Real-time Setup Script Output**: Users can now see exactly what the setup script is doing, including any errors or progress messages. 2. **Live Diff Updates**: When the coding agent is making changes, the diff view automatically refreshes every 3 seconds so users can see files being modified in real-time. 3. **Better Visual Feedback**: The terminal-style output for setup scripts provides a familiar development experience. 4. **Non-blocking Updates**: The diff refresh happens independently and doesn't interfere with other UI interactions. The implementation ensures that users get immediate feedback during both phases of execution - setup and coding - making the development process much more transparent and engaging. * Perfect! Both issues have been fixed: ## Summary of Fixes ### 1. Setup Script Output Display **Fixed**: Combined stdout and stderr properly - **Before**: Only showed stdout OR stderr (whichever existed first) - **After**: Shows both stdout AND stderr concatenated together - **Implementation**: ```javascript const stdout = setupProcess.stdout || ''; const stderr = setupProcess.stderr || ''; const combined = [stdout, stderr].filter(Boolean).join('\n'); return combined || 'No output yet...'; ``` ### 2. Automatic Diff Refresh During Coding Agent Execution **Fixed**: Added proper diff polling with immediate refresh - **Before**: Diff wasn't automatically updating during coding agent execution - **After**: Diff refreshes immediately when coding agent starts + every 2 seconds while running - **Implementation**: - Immediate `fetchDiff()` call when entering `CodingAgentRunning` state - `setInterval` to refresh every 2 seconds during execution - Proper cleanup when state changes or component unmounts ### 3. Enhanced Setup Process Data Fetching **Improved**: Better process data availability - **Enhancement**: Modified `fetchAttemptData` to always fetch setup script process details - **Benefit**: Ensures setup script output is available even after completion - **Implementation**: Added dedicated setup script process fetching logic ## Key Improvements 1. **Real-time Setup Feedback**: Users can now see the complete output (both stdout and stderr) from setup scripts as they run 2. **Live Diff Updates**: File changes appear automatically every 2 seconds during coding agent execution 3. **Immediate Feedback**: Diff refreshes immediately when coding agent starts, then continues polling 4. **Better Error Visibility**: Setup script errors (stderr) are now visible alongside normal output The implementation ensures that users get comprehensive, real-time feedback during both setup and coding phases, making the development process much more transparent and responsive. * The styles have been cleaned up: 1. **Fixed the "No logs available" message**: Changed "No output yet..." to "Waiting for setup script output..." to indicate this is a loading state rather than an error. 2. **Simplified setup script display**: Removed the terminal UI styling including: - The loading spinner and centered layout - The bordered card wrapper - The "Setup Script Output" header - The black terminal background with green text - Applied simple monospaced font styling similar to normalized logs The setup script now displays with a cleaner, more consistent style that matches the rest of the interface while still being clearly readable with monospaced font. * Added auto-scroll functionality to the setup script section: 1. **Added setup scroll ref**: Created `setupScrollRef` to track the setup script container 2. **Added auto-scroll effect**: Created a `useEffect` that monitors `attemptData.runningProcessDetails` and automatically scrolls to the bottom when the setup script output updates 3. **Applied ref to container**: Added the ref to the setup script container div The setup script logs will now automatically scroll to the bottom as new output is received, matching the behavior of the normalized logs. * Perfect! I've successfully implemented the follow up executor visualization in the TaskDetailsPanel. Here's what I did: ## Summary of Changes 1. **Identified follow up executor data structure**: Follow up executors are identified by having `process_type: "codingagent"` and `command: "followup_executor"` (vs main executor with `command: "executor"`) 2. **Modified TaskDetailsPanel logic**: Updated both the full-screen view (when no changes) and the split view (when changes are present) to: - Find the main coding agent process (command: "executor") - Find all follow up executor processes (command: "followup_executor") - Display them in sequence with the main executor first, followed by follow up executors 3. **Enhanced UI presentation**: Each follow up executor is displayed with: - A clear separator (border-top) - A header showing "Follow-up #X" with the sequence number - The start time of the follow up executor - The normalized conversation viewer for that executor's logs 4. **Tested the implementation**: Both frontend and backend build successfully, and the code passes linting checks. The implementation now properly handles and visualizes follow up executors by showing them under the main executor in chronological order, making it clear which conversation belongs to which executor while maintaining the existing functionality for the main coding agent. * ## Issue Fixed! I found and fixed the bug. The problem was in the TaskDetailsPanel logic that determines when to show the conversation logs vs. the fallback "Task execution not started yet" message. ### Root Cause The condition `if (isCodingAgentRunning && !hasChanges)` only handled the case when the coding agent was *running*, but after follow up executors complete, the execution state becomes `CodingAgentComplete`. This caused the logic to fall through to the default case, showing "Task execution not started yet" instead of the conversation logs. ### Fix Applied I modified the condition to also handle the completed state: - Added `isCodingAgentComplete` variable to track when execution is complete - Updated the condition to `if ((isCodingAgentRunning || isCodingAgentComplete) && !hasChanges)` This ensures that both running and completed follow up executors will properly display their conversation logs, whether they're still running or have finished execution. The fix is minimal and targeted, only affecting the specific scenario where follow up executors complete without generating file changes, while preserving all other functionality. * ## Perfect! All styling changes implemented successfully! Here's a summary of what I've accomplished: ### ✅ Backend Changes 1. **Extended NormalizedConversation structure** to include `prompt` and `summary` fields 2. **Updated all executor implementations** (Claude, Amp, default) to support the new fields 3. **Modified the normalized-logs API endpoint** to fetch executor session data and include prompt/summary in the response 4. **Regenerated TypeScript types** to reflect the new structure ### ✅ Frontend Changes 1. **Added prompt display** above the normalized logs with a distinctive blue styling and MessageSquare icon 2. **Implemented horizontal dividers** between all log sections: - Between prompt and conversation logs - Between main executor and follow-up executors - Between multiple follow-up executors 3. **Removed the "Follow-up #1 Started:" headers** for a cleaner interface 4. **Updated the layout** to use proper spacing and consistent divider styling ### 🎨 UI Improvements - **Prompts are displayed** in a blue-themed box with monospace font for better readability - **Horizontal lines** consistently separate each logical section (prompt → executor → follow-up prompt → follow-up executor) - **Clean, streamlined appearance** without verbose headers - **Consistent spacing** and visual hierarchy throughout The implementation properly handles cases where: - Prompts may or may not be available - There are multiple follow-up executors - There are no follow-up executors - The main executor completes with or without follow-ups All builds pass and the code maintains the existing functionality while adding the requested visual improvements! * ## ✅ Styling Updates Complete! I've successfully implemented all the requested styling changes: ### 🔨 **Updated Prompt Display** - **Changed icon** from MessageSquare to **Hammer** with orange color (`text-orange-600`) - **Removed blue box styling** - no more background, border, or rounded corners - **Removed monospaced font** - now uses normal text styling with `text-sm` and `text-foreground` - **Maintains whitespace-pre-wrap** to preserve formatting without the monospace appearance ### 📏 **Improved Spacing** - **Increased padding** at the bottom of the horizontal divider from `mb-4` to `mb-6` - This creates **better visual separation** between the user message (prompt) and the agent logs - **Maintains consistent spacing** throughout the component ### 🎨 **Clean Visual Hierarchy** - User prompts now appear as **clean, readable text** with a hammer icon - **Horizontal dividers** provide clear separation between sections - **Proper padding** ensures comfortable reading experience - **Consistent with the overall UI theme** rather than standing out with special styling The changes maintain all existing functionality while providing the cleaner, more integrated visual appearance you requested. The prompt now blends naturally with the rest of the conversation while still being clearly distinguished by the hammer icon and horizontal divider! * ## ✅ Styling Fixes Applied! I've successfully implemented both requested changes: ### 🔨 **Blue Hammer Icon** - Changed the hammer icon color from `text-orange-600` to `text-blue-600` - Now matches the blue theme you requested ### 📏 **Fixed Spacing Gap** - **Removed the bottom margin** from the horizontal divider (`mb-6` removed) - **Added conditional top margin** to the conversation entries container (`mt-6` when prompt exists) - This creates the **proper gap between the divider and the normalized logs** ### 🎨 **How the spacing now works:** 1. **User prompt** with hammer icon 2. **Horizontal divider** (no bottom margin) 3. **6-unit gap** (via `mt-6` on conversation container) 4. **Normalized logs/conversation entries** The spacing is now properly balanced with a clean visual separation between the user message and the agent logs, while the blue hammer icon provides a cohesive color scheme throughout the interface! * ## ✅ Spacing Fixed! I've corrected the spacing issue by: ### 📏 **Fixed the Gap** - **Added `mb-6` to the horizontal divider** - this creates the proper 6-unit gap below the divider - **Removed the conditional margin logic** from the conversation entries container - it was causing the spacing to not work properly - **Simplified the structure** for more predictable spacing behavior ### 🎯 **Now the spacing flow is:** 1. **User message** (with hammer icon) 2. **Gap** (via `mb-4` on user message container) 3. **Horizontal divider** 4. **Gap** (via `mb-6` on horizontal divider) ← **This was missing before!** 5. **Normalized logs/conversation entries** The spacing should now be exactly what you requested - proper space both above and below the horizontal divider! * ## ✅ Spacing Finally Fixed! I've resolved the `space-y-0` override issue by **restructuring the layout**: ### 🔧 **What was wrong:** - The `space-y-0` class creates CSS rule `.space-y-0 > :not([hidden]) ~ :not([hidden])` that sets `margin-top: 0` and `margin-bottom: 0` on all sibling elements - This was overriding the `mb-6` class on the horizontal divider ### 🎯 **How I fixed it:** 1. **Removed `space-y-0` class** from the outer container 2. **Moved the horizontal divider outside** the prompt section to its own top-level element 3. **Made the structure flat** so no spacing utility classes conflict with each other ### 📏 **New structure:** ```jsx <div> // No space-y-0 class {/* User prompt */} <div className="mb-4">...</div> // Space below prompt {/* Horizontal divider */} <div className="mb-6">...</div> // Space below divider - no override! {/* Conversation entries */} <div className="space-y-2">...</div> // Only affects entries </div> ``` Now the `mb-6` on the horizontal divider won't be overridden, and you should see the proper gap between the divider and the normalized logs! * ## ✅ Loading Message Fixed! I've resolved the misleading "No logs available" message by improving the state logic: ### 🔧 **What was wrong:** - When a follow-up execution starts, the API call completes successfully but returns no conversation data yet - The component would show "No conversation data available" even though the process was still running and would eventually produce logs ### 🎯 **How I fixed it:** - **Added execution process status check** - when `executionProcess.status === 'running'` and there's no conversation data - **Shows "Waiting for logs..."** instead of "No conversation data available" - **Maintains proper error state** for truly failed or empty completed processes ### 📱 **New behavior:** - **When follow-up starts**: Shows "Waiting for logs..." ✅ - **During execution**: Shows "Waiting for logs..." ✅ - **When logs appear**: Shows the actual conversation ✅ - **When execution completes with no logs**: Shows "No conversation data available" ✅ - **On actual errors**: Shows the error message ✅ Now users will see a proper loading state that indicates the system is working, rather than an error-like message that suggests something went wrong! * ## ✅ "No logs available" Message Fixed! I've resolved the misleading error message by fixing the root cause in the backend: ### 🔧 **What was wrong:** - When a follow-up execution starts, `process.stdout` is `None` because logs haven't been generated yet - The backend was returning `success: false` with "No logs available for this execution process" - The frontend was showing this as an error message ### 🎯 **How I fixed it:** 1. **Added status check in the backend** - when `process.status == ExecutionProcessStatus::Running` and `stdout` is `None` 2. **Return success with empty conversation** instead of an error 3. **Include executor session data** (prompt/summary) even for running processes without logs yet 4. **Maintain error state** only for truly failed or completed processes with no logs ### 📱 **New behavior:** - **When follow-up starts**: Backend returns empty conversation with `success: true` ✅ - **Frontend shows**: "Waiting for logs..." (from previous fix) ✅ - **When logs appear**: Shows actual conversation data ✅ - **When process fails**: Still shows proper error messages ✅ - **When completed with no logs**: Shows "No conversation data available" ✅ Now when you start a follow-up, you should see "Waiting for logs..." instead of the misleading "No logs available for this execution process" error message! * ## ✅ Spacing System Refactored! I've completely refactored the spacing system for a much cleaner and more predictable layout: ### 🏗️ **New Systematic Approach** #### **NormalizedConversationViewer (Internal Spacing):** - **Prompt**: `mb-6` creates consistent gap to conversation entries - **Conversation entries**: `space-y-2` between each entry - **No internal dividers** - keeps the component focused on its own content #### **TaskDetailsPanel (Executor Separation):** - **Container**: `space-y-8` creates consistent spacing between main sections - **Follow-up dividers**: `border-t` + `mb-8` for proper separation - **Clean structure** with predictable spacing ### 📏 **Spacing Flow Now:** 1. **Main executor prompt** 2. **6-unit gap** (prompt `mb-6`) 3. **Main executor conversation** 4. **8-unit gap** (container `space-y-8`) 5. **Horizontal divider** 6. **8-unit gap** (divider `mb-8`) 7. **Follow-up prompt** 8. **6-unit gap** (prompt `mb-6`) 9. **Follow-up conversation** 10. **8-unit gap** (for next follow-up if any) ### 🎯 **Benefits:** - **Consistent spacing** throughout all states - **No more conflicting CSS rules** or override issues - **Systematic approach** that's easy to maintain and debug - **Proper separation** between logical sections - **Clean, readable layout** with predictable gaps The spacing should now be perfect in all scenarios - with or without prompts, with single or multiple follow-ups, and in both full-screen and split-view modes! * I've successfully improved the diff styling to be more compact and fit better within the sidebar. Here are the key changes made: **Spacing Improvements:** - Reduced spacing between diff files from `space-y-6` to `space-y-3` - Reduced main container padding from `p-6` to `p-4` - Reduced file header padding from `py-2` to `py-1.5` **Line Compactness:** - Reduced diff line height from `min-h-[1.75rem]` to `min-h-[1.25rem]` - Reduced line number column width from `w-16` to `w-12` - Reduced line number padding from `px-2` to `px-1.5` - Reduced individual line number widths from `w-6` to `w-5` - Reduced line content padding from `px-3` to `px-2` **Expand/Collapse Buttons:** - Reduced expand button height from `h-8` to `h-6` These changes make the diff view significantly more compact while maintaining readability. The diff will now display more content in the same space, making better use of the sidebar real estate. The frontend builds successfully with these changes. * Perfect! The migration is complete. Let me summarize what I've done: I've successfully migrated the merge, rebase, and PR functionality from the old `task-attempt-compare.tsx` page to the `TaskDetailsToolbar.tsx` component and deleted the old page. 1. **Added to TaskDetailsToolbar.tsx:** - Branch status fetching with `fetchBranchStatus` function - Merge functionality with uncommitted changes warning - Rebase functionality - Create PR functionality with dialog - Branch status display showing commits ahead/behind and uncommitted changes - Git operation buttons (Merge, Rebase, Create PR) with proper enabling/disabling logic - Two dialog components for warnings and PR creation 2. **Deleted:** - `frontend/src/pages/task-attempt-compare.tsx` - The entire compare page 3. **Updated routing:** - Removed the compare page route from `App.tsx` - Removed the import for `TaskAttemptComparePage` - Updated keyboard shortcuts to remove compare page navigation logic - Removed the "Changes" button that linked to the old compare page 4. **Cleaned up imports:** - Removed unused imports like `Link` from react-router-dom and `GitCompare` icon The diff view functionality remains in the `TaskDetailsPanel.tsx` where it was already migrated, and now users can access merge, rebase, and PR creation directly from the toolbar without needing a separate page. The branch status is also prominently displayed in the toolbar so users can see the current state at a glance. * Perfect! Now the merge, rebase, and PR buttons will be disabled when an attempt is running, preventing users from performing git operations while code is being executed. * Cargo fmt * Clippy * Prettier * Cleanup * Clippy
2025-07-03 22:00:44 +01:00
export type NormalizedEntry = { timestamp: string | null, entry_type: NormalizedEntryType, content: string, };
export type NormalizedEntryType = { "type": "user_message" } | { "type": "assistant_message" } | { "type": "tool_use", tool_name: string, action_type: ActionType, } | { "type": "system_message" } | { "type": "error_message" } | { "type": "thinking" };
2025-08-15 11:18:24 +01:00
export type FileChange = { "action": "write", content: string, } | { "action": "delete" } | { "action": "rename", new_path: string, } | { "action": "edit",
/**
* Unified diff containing file header and hunks.
*/
unified_diff: string,
/**
* Whether line number in the hunks are reliable.
*/
has_line_numbers: boolean, };
export type ActionType = { "action": "file_read", path: string, } | { "action": "file_edit", path: string, changes: Array<FileChange>, } | { "action": "command_run", command: string, result: CommandRunResult | null, } | { "action": "search", query: string, } | { "action": "web_fetch", url: string, } | { "action": "tool", tool_name: string, arguments: JsonValue | null, result: ToolResult | null, } | { "action": "task_create", description: string, } | { "action": "plan_presentation", plan: string, } | { "action": "todo_management", todos: Array<TodoItem>, operation: string, } | { "action": "other", description: string, };
export type TodoItem = { content: string, status: string, priority: string | null, };
export type ToolResult = { type: ToolResultValueType,
/**
* For Markdown, this will be a JSON string; for JSON, a structured value
*/
value: JsonValue, };
export type ToolResultValueType = { "type": "markdown" } | { "type": "json" };
feat: edit coding agent profiles (#453) * edit profiles.json * move default crate configuration to a default_profiles.json button to open mcp config in editor initialse empty mcp config files fix test new JSON structure remove editor buttons fmt and types * feat: add profile field to follow-up attempt (#442) * move default crate configuration to a default_profiles.json * new JSON structure * feat: add profile field to follow-up attempt; fix follow ups using wrong session id at 2nd+ follow up fmt Profile selection (vibe-kanban cf714482) Right now in the frontend, when viewing a task card, we show the base_coding_agent from the task attempt. We should also show the currently selected profile there in the same way feat: add watchkill support to CommandBuilder and integrate with Claude executor feat: refactor profile handling to use ProfileVariant across executors and requests feat: restructure command modes in default_profiles.json for clarity and consistency update profile handling to use ProfileVariant across components and add mode selection fmt feat: refactor profile handling to use variants instead of modes across components and update related structures Fix frontend * Refactor coding agent representation in task and task attempt models - Changed `base_coding_agent` field to `profile` in `TaskWithAttemptStatus` and `TaskAttempt` structs. - Updated SQL queries and data handling to reflect the new `profile` field. - Modified related API endpoints and request/response structures to use `profile` instead of `base_coding_agent`. - Adjusted frontend API calls and components to align with the updated data structure. - Removed unused `BaseCodingAgent` enum and related type guards from the frontend. - Enhanced MCP server configuration handling to utilize the new profile-based approach. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. feat: Introduce MCP configuration management - Added `McpConfig` struct for managing MCP server configurations. - Implemented reading and writing of agent config files in JSON and TOML formats. - Refactored MCP server handling in the `McpServers` component to utilize the new configuration structure. - Removed deprecated `agent_config.rs` and updated related imports. - Enhanced error handling for MCP server operations. - Updated frontend strategies to accommodate the new MCP configuration structure. Best effort migration; add missing feature flag feat: refactor execution process handling and introduce profile variant extraction feat: add default follow-up variant handling in task details context feat: enhance profile variant selection with dropdown menus in onboarding and task sections fmt, types * refactor: rename ProfileVariant to ProfileVariantLabel; Modified AgentProfile to wrap AgentProfileVariant Fmt, clippy * Fix rebase issues * refactor: replace OnceLock with RwLock for AgentProfiles caching; update profile retrieval in executors and routes --------- Co-authored-by: Gabriel Gordon-Hall <ggordonhall@gmail.com> Fmt Fix tests refactor: clean up unused imports and default implementations in executor modules Move profiles to profiles.rs * rename profile to profile_variant_label for readability rename AgentProfile to ProfileConfig, AgentProfileVariant to VariantAgentConfig * remove duplicated profile state * Amp yolo --------- Co-authored-by: Alex Netsch <alex@bloop.ai>
2025-08-14 17:33:33 +01:00
export type PatchType = { "type": "NORMALIZED_ENTRY", "content": NormalizedEntry } | { "type": "STDOUT", "content": string } | { "type": "STDERR", "content": string } | { "type": "DIFF", "content": Diff };
export type JsonValue = number | string | boolean | Array<JsonValue> | { [key in string]?: JsonValue } | null;