mirror of
https://github.com/BloopAI/vibe-kanban.git
synced 2026-11-15 21:50:33 +00:00
* feat(ui): restore the Sign in button for agents that need setup
The legacy cleanup (139b18158, #2790) removed NextActionCard, the only
caller of runAgentSetup, so needs_setup was computed but never shown.
The next-action row now reaches the conversation list only when
needs_setup is set, and renders a Sign in button for agents with the
SETUP_HELPER capability. It calls runAgentSetup with the failed turn's
own executor profile (carried as NextAction.executor_profile_id), so a
variant signs in with its own config.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cursor): detect the sign-in error from the renamed agent CLI
Cursor's CLI now says "run 'agent login'" instead of
"run 'cursor-agent login'", so the exact-message match missed it and the
error was tagged Other, with no Sign in button. Match on "Authentication
required" and "login" instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(acp): treat -32000 from the agent as "setup required"
A signed-out ACP agent rejects session/new with -32000 (AuthRequired),
and an expired token does the same on session/prompt. The harness
flattened every error into a string, so the user saw a generic error.
The run's exit error is now logged as AcpEvent::AuthRequired when its
code is -32000, and normalize_logs turns that into a SetupRequired error
entry, which is what offers the Sign in button. Other errors are
unchanged. Session history skips the new event, like Error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(server): share the agent setup runner between Codex and Cursor
run_codex_setup and run_cursor_setup repeated the same steps: chain the
workspace's latest coding-agent action after the setup action, ensure
the container, find or create a session, and start it as a setup
script. That's now start_agent_setup in agent_setup.rs, and each agent
keeps only its own setup action. No change in behaviour; this is so the
Copilot sign-in doesn't add a third copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(copilot): sign in from the Sign in button
Copilot now has the SetupHelper capability, and the agent setup API has
a Copilot branch. It runs `<copilot base> login --device-code` as a
setup script, then the failed prompt again.
- Copilot::login_command() takes the package from base_command(), so it
matches the run (cached registry, no network) and honours
base_command_override. It drops the run args (--acp) and ignores
additional_params, which are run flags login would reject.
- --device-code prints a code and link in the conversation, needs no
browser on the backend's machine, and works without a TTY.
- The script carries no env: it's saved in the database and shown in
the output, and profile env can hold tokens. Copilot's sign-in doesn't
depend on env.
- On Unix the program and args are shell-quoted, so paths with spaces
work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(ui): show the device sign-in code in the conversation
A login script waiting for a device code printed "visit <url> and enter
code <code>" only to its logs, so the conversation showed just
"Tool Install Script - Running".
While a script runs, its output is now checked for a link and a code on
the same line (parseDeviceCode, not agent-specific). If both are there,
a card under the script shows the code and a "Copy code and open <host>"
button. The button copies the code in the user's browser, then opens the
page, and only then says the code was copied. A CLI's own copy lands on
the backend's machine, which isn't the user's when it runs remotely.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(copilot): don't open a browser tab from the login script
In device-code mode Copilot opens the sign-in page on the backend's
machine, which took the user away before they saw the code card. The
login script now runs with BROWSER=true (Copilot honours BROWSER, and
`true` does nothing), so the user stays in the conversation and opens
the page from the card. Unix only; Windows keeps Copilot's default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(acp): say "Not signed in" in the model selector
Option discovery opens a throwaway session with session/new, so a
signed-out agent fails it with -32000 too. The model selector then
showed the agent's message plus the last stderr line. It now shows
"Not signed in. Start a task and click Sign in." instead. The text is
agent-agnostic, and the failure is still not cached. A Unix test runs
run_live against a fake sh agent that rejects session/new with -32000.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(acp): don't point registry agents at a Sign in button they lack
Registry agents share the discovery code but don't get SetupHelper, so
"Start a task and click Sign in." sent their users to a button that never
appears. The model selector now says "Not signed in to this agent."
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): show the device-code card only for Tool Install Scripts
parseDeviceCode ran on every running script, including the user's own
setup and cleanup scripts, so a line with a link and something like a
request ID or ticket key (ABCD-1234) could show "Enter this code to sign
in" with a button opening that link. Only the app's own install/login
scripts run as Tool Install Script, so the card now needs that too. The
parser stays generic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(acp): show each model once
Copilot sends `auto` twice: as its own entry and again in the model list.
We kept both, so the selector showed Auto twice. Keep the first choice for
each value, and drop repeats from lists already saved in the disk cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(acp): refresh the model selector after signing in
Discovery runs once per stream connection, and a failure is kept for 30s,
so after signing in the selector kept showing "Not signed in" and the old
list until the page was reloaded.
- When a run opens a session, forget the agent's failed discovery: the
agent works now. Copilot and registry agents pass their discovery key.
- When the dropdown opens while it shows an error, reconnect the stream
so discovery runs again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
914 lines
44 KiB
TypeScript
914 lines
44 KiB
TypeScript
// This file was generated by `crates/core/src/bin/generate_types.rs`.
|
|
|
|
// Do not edit this file manually.
|
|
|
|
// If you are an AI, and you absolutely have to edit this file, please confirm with the user first.
|
|
|
|
export type Repo = { id: string, path: string, name: string, display_name: string, setup_script: string | null, cleanup_script: string | null, archive_script: string | null, copy_files: string | null, parallel_setup_script: boolean, dev_server_script: string | null, default_target_branch: string | null, default_working_dir: string | null, created_at: Date, updated_at: Date, };
|
|
|
|
export type Project = { id: string, name: string, default_agent_working_dir: string | null, remote_project_id: string | null, created_at: Date, updated_at: Date, };
|
|
|
|
export type UpdateRepo = { display_name?: string | null, setup_script?: string | null, cleanup_script?: string | null, archive_script?: string | null, copy_files?: string | null, parallel_setup_script?: boolean | null, dev_server_script?: string | null, default_target_branch?: string | null, default_working_dir?: string | null, };
|
|
|
|
export type SearchResult = { path: string, is_file: boolean, match_type: SearchMatchType,
|
|
/**
|
|
* Ranking score based on git history (higher = more recently/frequently edited)
|
|
*/
|
|
score: bigint, };
|
|
|
|
export type SearchMatchType = "FileName" | "DirectoryName" | "FullPath";
|
|
|
|
export type WorkspaceRepo = { id: string, workspace_id: string, repo_id: string, target_branch: string, created_at: Date, updated_at: Date, };
|
|
|
|
export type CreateWorkspaceRepo = { repo_id: string, target_branch: string, };
|
|
|
|
export type RepoWithTargetBranch = { target_branch: string, id: string, path: string, name: string, display_name: string, setup_script: string | null, cleanup_script: string | null, archive_script: string | null, copy_files: string | null, parallel_setup_script: boolean, dev_server_script: string | null, default_target_branch: string | null, default_working_dir: string | null, created_at: Date, updated_at: Date, };
|
|
|
|
export type Tag = { id: string, tag_name: string, content: string, created_at: string, updated_at: string, };
|
|
|
|
export type CreateTag = { tag_name: string, content: string, };
|
|
|
|
export type UpdateTag = { tag_name: string | null, content: string | null, };
|
|
|
|
export type DraftFollowUpData = { message: string, executor_config: ExecutorConfig, };
|
|
|
|
export type DraftWorkspaceData = { message: string, repos: Array<DraftWorkspaceRepo>, executor_config: ExecutorConfig | null, linked_issue: DraftWorkspaceLinkedIssue | null, attachments: Array<DraftWorkspaceAttachment>, };
|
|
|
|
export type DraftWorkspaceAttachment = { id: string, file_path: string, original_name: string, mime_type: string | null, size_bytes: bigint, };
|
|
|
|
export type DraftWorkspaceLinkedIssue = { issue_id: string, simple_id: string, title: string, remote_project_id: string, };
|
|
|
|
export type DraftWorkspaceRepo = { repo_id: string, target_branch: string, };
|
|
|
|
export type DraftIssueData = { title: string, description: string | null, status_id: string,
|
|
/**
|
|
* Stored as the string value of IssuePriority (e.g. "urgent", "high", "medium", "low")
|
|
*/
|
|
priority: string | null, assignee_ids: Array<string>, tag_ids: Array<string>, create_draft_workspace: boolean,
|
|
/**
|
|
* The project this draft belongs to
|
|
*/
|
|
project_id: string,
|
|
/**
|
|
* Parent issue ID if creating a sub-issue
|
|
*/
|
|
parent_issue_id: string | null, };
|
|
|
|
export type PreviewSettingsData = { url: string, screen_size: string | null, responsive_width: number | null, responsive_height: number | null, };
|
|
|
|
export type WorkspaceNotesData = { content: string, };
|
|
|
|
export type WorkspacePanelStateData = { right_main_panel_mode: string | null, is_left_main_panel_visible: boolean, };
|
|
|
|
export type WorkspacePrFilterData = "all" | "has_pr" | "no_pr";
|
|
|
|
export type WorkspaceSortByData = "updated_at" | "created_at";
|
|
|
|
export type WorkspaceSortOrderData = "asc" | "desc";
|
|
|
|
export type WorkspaceFilterStateData = { project_ids: Array<string>, pr_filter: WorkspacePrFilterData, };
|
|
|
|
export type WorkspaceSortStateData = { sort_by: WorkspaceSortByData, sort_order: WorkspaceSortOrderData, };
|
|
|
|
export type UiPreferencesData = {
|
|
/**
|
|
* Preferred repo actions per repo
|
|
*/
|
|
repo_actions: { [key in string]?: string },
|
|
/**
|
|
* Expanded/collapsed state for UI sections
|
|
*/
|
|
expanded: { [key in string]?: boolean },
|
|
/**
|
|
* Context bar position
|
|
*/
|
|
context_bar_position: string | null,
|
|
/**
|
|
* Pane sizes
|
|
*/
|
|
pane_sizes: { [key in string]?: JsonValue },
|
|
/**
|
|
* Collapsed paths per workspace in file tree
|
|
*/
|
|
collapsed_paths: { [key in string]?: Array<string> },
|
|
/**
|
|
* Preferred file-search repo
|
|
*/
|
|
file_search_repo_id: string | null,
|
|
/**
|
|
* Global left sidebar visibility
|
|
*/
|
|
is_left_sidebar_visible: boolean | null,
|
|
/**
|
|
* Global right sidebar visibility
|
|
*/
|
|
is_right_sidebar_visible: boolean | null,
|
|
/**
|
|
* Global terminal visibility
|
|
*/
|
|
is_terminal_visible: boolean | null,
|
|
/**
|
|
* Workspace-specific panel states
|
|
*/
|
|
workspace_panel_states: { [key in string]?: WorkspacePanelStateData },
|
|
/**
|
|
* Workspace sidebar filter preferences
|
|
*/
|
|
workspace_filters: WorkspaceFilterStateData,
|
|
/**
|
|
* Workspace sidebar sort preferences
|
|
*/
|
|
workspace_sort: WorkspaceSortStateData,
|
|
/**
|
|
* Last selected organization ID
|
|
*/
|
|
selected_org_id: string | null,
|
|
/**
|
|
* Last selected project ID
|
|
*/
|
|
selected_project_id: string | null,
|
|
/**
|
|
* Default setting for creating a draft workspace from new issues
|
|
*/
|
|
create_draft_workspace_by_default: boolean | null,
|
|
/**
|
|
* Kanban project view selections (active view per project)
|
|
*/
|
|
kanban_project_view_selections: { [key in string]?: JsonValue },
|
|
/**
|
|
* Kanban project view preferences (filters, toggles per project per view)
|
|
*/
|
|
kanban_project_view_preferences: { [key in string]?: JsonValue }, };
|
|
|
|
export type ProjectRepoDefaultsData = { repos: Array<DraftWorkspaceRepo>, };
|
|
|
|
export type ScratchPayload = { "type": "DRAFT_TASK", "data": string } | { "type": "DRAFT_FOLLOW_UP", "data": DraftFollowUpData } | { "type": "DRAFT_WORKSPACE", "data": DraftWorkspaceData } | { "type": "DRAFT_ISSUE", "data": DraftIssueData } | { "type": "PREVIEW_SETTINGS", "data": PreviewSettingsData } | { "type": "WORKSPACE_NOTES", "data": WorkspaceNotesData } | { "type": "UI_PREFERENCES", "data": UiPreferencesData } | { "type": "PROJECT_REPO_DEFAULTS", "data": ProjectRepoDefaultsData };
|
|
|
|
export enum ScratchType { DRAFT_TASK = "DRAFT_TASK", DRAFT_FOLLOW_UP = "DRAFT_FOLLOW_UP", DRAFT_WORKSPACE = "DRAFT_WORKSPACE", DRAFT_ISSUE = "DRAFT_ISSUE", PREVIEW_SETTINGS = "PREVIEW_SETTINGS", WORKSPACE_NOTES = "WORKSPACE_NOTES", UI_PREFERENCES = "UI_PREFERENCES", PROJECT_REPO_DEFAULTS = "PROJECT_REPO_DEFAULTS" }
|
|
|
|
export type Scratch = { id: string, payload: ScratchPayload, created_at: string, updated_at: string, };
|
|
|
|
export type CreateScratch = { payload: ScratchPayload, };
|
|
|
|
export type UpdateScratch = { payload: ScratchPayload, };
|
|
|
|
export type Workspace = { id: string, task_id: string | null, container_ref: string | null, branch: string, setup_completed_at: string | null, created_at: string, updated_at: string, archived: boolean, pinned: boolean, name: string | null, worktree_deleted: boolean, };
|
|
|
|
export type WorkspaceWithStatus = { is_running: boolean, is_errored: boolean, id: string, task_id: string | null, container_ref: string | null, branch: string, setup_completed_at: string | null, created_at: string, updated_at: string, archived: boolean, pinned: boolean, name: string | null, worktree_deleted: boolean, };
|
|
|
|
export type Session = { id: string, workspace_id: string, name: string | null, executor: string | null, agent_working_dir: string | null, created_at: string, updated_at: string, };
|
|
|
|
export type ExecutionProcess = { id: string, session_id: string, run_reason: ExecutionProcessRunReason, executor_action: ExecutorAction, status: ExecutionProcessStatus, exit_code: bigint | null,
|
|
/**
|
|
* dropped: true if this process is excluded from the current
|
|
* history view (due to restore/trimming). Hidden from logs/timeline;
|
|
* still listed in the Processes tab.
|
|
*/
|
|
dropped: boolean, started_at: string, completed_at: string | null, created_at: string, updated_at: string, };
|
|
|
|
export enum ExecutionProcessStatus { running = "running", completed = "completed", failed = "failed", killed = "killed" }
|
|
|
|
export type ExecutionProcessRunReason = "setupscript" | "cleanupscript" | "archivescript" | "codingagent" | "devserver";
|
|
|
|
export type ExecutionProcessRepoState = { id: string, execution_process_id: string, repo_id: string, before_head_commit: string | null, after_head_commit: string | null, merge_commit: string | null, created_at: Date, updated_at: Date, };
|
|
|
|
export type Merge = { "type": "direct" } & DirectMerge | { "type": "pr" } & PrMerge;
|
|
|
|
export type DirectMerge = { id: string, workspace_id: string, repo_id: string, merge_commit: string, target_branch_name: string, created_at: string, };
|
|
|
|
export type PrMerge = { id: string, workspace_id: string, repo_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, };
|
|
|
|
export type ApprovalInfo = { approval_id: string, tool_name: string, execution_process_id: string, is_question: boolean, created_at: string, timeout_at: string, };
|
|
|
|
export type ApprovalStatus = { "status": "pending" } | { "status": "approved" } | { "status": "denied", reason?: string, } | { "status": "timed_out" };
|
|
|
|
export type QuestionAnswer = { question: string, answer: Array<string>, };
|
|
|
|
export type QuestionStatus = { "status": "answered", answers: Array<QuestionAnswer>, } | { "status": "timed_out" };
|
|
|
|
export type ApprovalOutcome = { "status": "approved" } | { "status": "denied", reason?: string, } | { "status": "answered", answers: Array<QuestionAnswer>, } | { "status": "timed_out" };
|
|
|
|
export type ApprovalResponse = { execution_process_id: string, status: ApprovalOutcome, };
|
|
|
|
export type Diff = { change: DiffChangeKind, oldPath: string | null, newPath: string | null, oldContent: string | null, newContent: string | null,
|
|
/**
|
|
* True when file contents are intentionally omitted (e.g., too large)
|
|
*/
|
|
contentOmitted: boolean,
|
|
/**
|
|
* Optional precomputed stats for omitted content
|
|
*/
|
|
additions: number | null, deletions: number | null, repoId: string | null, };
|
|
|
|
export type DiffChangeKind = "added" | "deleted" | "modified" | "renamed" | "copied" | "permissionChange";
|
|
|
|
export type ApiResponse<T, E = T> = { success: boolean, data: T | null, error_data: E | null, message: string | null, };
|
|
|
|
export type LoginStatus = { "status": "loggedout" } | { "status": "loggedin", profile: ProfileResponse | null, };
|
|
|
|
export type ProfileResponse = { user_id: string, username: string | null, email: string, providers: Array<ProviderProfile>, };
|
|
|
|
export type ProviderProfile = { provider: string, username: string | null, display_name: string | null, email: string | null, avatar_url: string | null, };
|
|
|
|
export type StatusResponse = { logged_in: boolean, profile: ProfileResponse | null, degraded: boolean | null, };
|
|
|
|
export enum MemberRole { ADMIN = "ADMIN", MEMBER = "MEMBER" }
|
|
|
|
export enum InvitationStatus { PENDING = "PENDING", ACCEPTED = "ACCEPTED", DECLINED = "DECLINED", EXPIRED = "EXPIRED" }
|
|
|
|
export type Organization = { id: string, name: string, slug: string, is_personal: boolean, issue_prefix: string, created_at: string, updated_at: string, };
|
|
|
|
export type OrganizationWithRole = { id: string, name: string, slug: string, is_personal: boolean, issue_prefix: string, created_at: string, updated_at: string, user_role: MemberRole, };
|
|
|
|
export type ListOrganizationsResponse = { organizations: Array<OrganizationWithRole>, };
|
|
|
|
export type GetOrganizationResponse = { organization: Organization, user_role: string, };
|
|
|
|
export type CreateOrganizationRequest = { name: string, slug: string, };
|
|
|
|
export type CreateOrganizationResponse = { organization: OrganizationWithRole, };
|
|
|
|
export type UpdateOrganizationRequest = { name: string, };
|
|
|
|
export type Invitation = { id: string, organization_id: string, invited_by_user_id: string | null, email: string, role: MemberRole, status: InvitationStatus, token: string, created_at: string, expires_at: string, };
|
|
|
|
export type CreateInvitationRequest = { email: string, role: MemberRole, };
|
|
|
|
export type CreateInvitationResponse = { invitation: Invitation, };
|
|
|
|
export type ListInvitationsResponse = { invitations: Array<Invitation>, };
|
|
|
|
export type GetInvitationResponse = { id: string, organization_slug: string, role: MemberRole, expires_at: string, };
|
|
|
|
export type AcceptInvitationResponse = { organization_id: string, organization_slug: string, role: MemberRole, };
|
|
|
|
export type RevokeInvitationRequest = { invitation_id: string, };
|
|
|
|
export type OrganizationMemberInfo = { user_id: string, role: MemberRole, joined_at: string, };
|
|
|
|
export type OrganizationMemberWithProfile = { user_id: string, role: MemberRole, joined_at: string, first_name: string | null, last_name: string | null, username: string | null, email: string | null, avatar_url: string | null, };
|
|
|
|
export type ListMembersResponse = { members: Array<OrganizationMemberWithProfile>, };
|
|
|
|
export type UpdateMemberRoleRequest = { role: MemberRole, };
|
|
|
|
export type UpdateMemberRoleResponse = { user_id: string, role: MemberRole, };
|
|
|
|
export type RegisterRepoRequest = { path: string, display_name: string | null, };
|
|
|
|
export type InitRepoRequest = { parent_path: string, folder_name: string, };
|
|
|
|
export type TagSearchParams = { search: string | null, };
|
|
|
|
export type TokenResponse = { access_token: string, expires_at: string | null, };
|
|
|
|
export type UserSystemInfo = { version: string, config: Config, machine_id: string, login_status: LoginStatus, remote_auth_degraded: string | null, environment: Environment,
|
|
/**
|
|
* Capabilities supported per executor (e.g., { "CLAUDE_CODE": ["SESSION_FORK"] })
|
|
*/
|
|
capabilities: { [key in string]?: Array<BaseAgentCapability> }, shared_api_base: string | null, preview_proxy_port: number | null, executors: { [key in BaseCodingAgent]?: ExecutorProfile }, };
|
|
|
|
export type Environment = { os_type: string, os_version: string, os_architecture: string, bitness: string, };
|
|
|
|
export type McpServerQuery = { executor: BaseCodingAgent, };
|
|
|
|
export type UpdateMcpServersBody = { servers: { [key in string]?: JsonValue }, };
|
|
|
|
export type GetMcpServerResponse = { mcp_config: McpConfig, config_path: string, };
|
|
|
|
export type CheckEditorAvailabilityQuery = { editor_type: EditorType, };
|
|
|
|
export type CheckEditorAvailabilityResponse = { available: boolean, };
|
|
|
|
export type CheckAgentAvailabilityQuery = { executor: BaseCodingAgent, };
|
|
|
|
export type AgentPresetOptionsQuery = { executor: BaseCodingAgent, variant: string | null, };
|
|
|
|
export type AcpRegistryAgent = { id: string, name: string, version: string, description: string, icon: string | null,
|
|
/**
|
|
* Key the agent is (or would be) installed under in profiles
|
|
*/
|
|
executor: BaseCodingAgent,
|
|
/**
|
|
* Whether the agent's executor key already exists in profiles
|
|
*/
|
|
installed: boolean, };
|
|
|
|
export type CurrentUserResponse = { user_id: string, };
|
|
|
|
export type StartSpake2EnrollmentRequest = { enrollment_code: string, client_message_b64: string, };
|
|
|
|
export type FinishSpake2EnrollmentRequest = { enrollment_id: string, client_id: string, client_name: string, client_browser: string, client_os: string, client_device: string, public_key_b64: string, client_proof_b64: string, };
|
|
|
|
export type StartSpake2EnrollmentResponse = { enrollment_id: string, server_message_b64: string, };
|
|
|
|
export type FinishSpake2EnrollmentResponse = { signing_session_id: string, server_public_key_b64: string, server_proof_b64: string, };
|
|
|
|
export type RelayPairedClient = { client_id: string, client_name: string, client_browser: string, client_os: string, client_device: string, };
|
|
|
|
export type ListRelayPairedClientsResponse = { clients: Array<RelayPairedClient>, };
|
|
|
|
export type RemoveRelayPairedClientResponse = { removed: boolean, };
|
|
|
|
export type RefreshRelaySigningSessionRequest = { client_id: string, timestamp: bigint, nonce: string, signature_b64: string, };
|
|
|
|
export type RefreshRelaySigningSessionResponse = { signing_session_id: string, };
|
|
|
|
export type CreateFollowUpAttempt = { prompt: string, executor_config: ExecutorConfig, retry_process_id: string | null, force_when_dirty: boolean | null, perform_git_reset: boolean | null, };
|
|
|
|
export type ResetProcessRequest = { process_id: string, force_when_dirty: boolean | null, perform_git_reset: boolean | null, };
|
|
|
|
export type ChangeTargetBranchRequest = { repo_id: string, new_target_branch: string, };
|
|
|
|
export type ChangeTargetBranchResponse = { repo_id: string, new_target_branch: string, status: [number, number], };
|
|
|
|
export type AddWorkspaceRepoRequest = { repo_id: string, target_branch: string, };
|
|
|
|
export type AddWorkspaceRepoResponse = { workspace: Workspace, repo: RepoWithTargetBranch, };
|
|
|
|
export type MergeWorkspaceRequest = { repo_id: string, };
|
|
|
|
export type PushWorkspaceRequest = { repo_id: string, };
|
|
|
|
export type RenameBranchRequest = { new_branch_name: string, };
|
|
|
|
export type RenameBranchResponse = { branch: string, };
|
|
|
|
export type StartReviewRequest = { executor_config: ExecutorConfig, additional_prompt: string | null, use_all_workspace_commits: boolean, };
|
|
|
|
export type ReviewError = { "type": "process_already_running" };
|
|
|
|
export type OpenEditorRequest = { editor_type: string | null, file_path: string | null, };
|
|
|
|
export type OpenEditorResponse = { url: string | null, };
|
|
|
|
export type OpenRemoteEditorResponse = { url: string, local_port: number, ssh_alias: string, };
|
|
|
|
export type OpenRemoteWorkspaceInEditorRequest = { host_id: string, workspace_id: string, editor_type: string | null, file_path: string | null, };
|
|
|
|
export type PairRelayHostRequest = { host_id: string, host_name: string, enrollment_code: string, };
|
|
|
|
export type PairRelayHostResponse = { paired: boolean, };
|
|
|
|
export type RelayPairedHost = { host_id: string, host_name: string | null, paired_at: string | null, };
|
|
|
|
export type ListRelayPairedHostsResponse = { hosts: Array<RelayPairedHost>, };
|
|
|
|
export type RemoveRelayPairedHostResponse = { removed: boolean, };
|
|
|
|
export type CreateWorkspaceApiRequest = { name: string | null, };
|
|
|
|
export type LinkedIssueInfo = { remote_project_id: string, issue_id: string, };
|
|
|
|
export type CreatePrApiRequest = { title: string, body: string | null, target_branch: string | null, draft: boolean | null, repo_id: string, auto_generate_description: boolean, };
|
|
|
|
export type AttachmentResponse = { 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 AttachmentMetadata = { exists: boolean, file_name: string | null, path: string | null, size_bytes: bigint | null, format: string | null, proxy_url: string | null, };
|
|
|
|
export type WorkspaceRepoInput = { repo_id: string, target_branch: string, };
|
|
|
|
export type RunAgentSetupRequest = { executor_profile_id: ExecutorProfileId, };
|
|
|
|
export type RunAgentSetupResponse = Record<string, never>;
|
|
|
|
export type GhCliSetupError = "BREW_MISSING" | "SETUP_HELPER_NOT_SUPPORTED" | { "OTHER": { message: string, } };
|
|
|
|
export type RebaseWorkspaceRequest = { repo_id: string, old_base_branch: string | null, new_base_branch: string | null, };
|
|
|
|
export type ContinueRebaseRequest = { repo_id: string, };
|
|
|
|
export type AbortConflictsRequest = { repo_id: string, };
|
|
|
|
export type GitOperationError = { "type": "merge_conflicts", message: string, op: ConflictOp, conflicted_files: Array<string>, target_branch: string, } | { "type": "rebase_in_progress" };
|
|
|
|
export type PushError = { "type": "force_push_required" };
|
|
|
|
export type PrError = { "type": "cli_not_installed", provider: ProviderKind, } | { "type": "cli_not_logged_in", provider: ProviderKind, } | { "type": "git_cli_not_logged_in" } | { "type": "git_cli_not_installed" } | { "type": "target_branch_not_found", branch: string, } | { "type": "unsupported_provider" };
|
|
|
|
export type RunScriptError = { "type": "no_script_configured" } | { "type": "process_already_running" };
|
|
|
|
export type AssociateWorkspaceAttachmentsRequest = { attachment_ids: Array<string>, };
|
|
|
|
export type ImportIssueAttachmentsRequest = { issue_id: string, };
|
|
|
|
export type ImportIssueAttachmentsResponse = { attachment_ids: Array<string>, };
|
|
|
|
export type AttachPrResponse = { pr_attached: boolean, pr_url: string | null, pr_number: bigint | null, pr_status: MergeStatus | null, };
|
|
|
|
export type AttachExistingPrRequest = { repo_id: string, };
|
|
|
|
export type PrCommentsResponse = { comments: Array<UnifiedPrComment>, };
|
|
|
|
export type GetPrCommentsError = { "type": "no_pr_attached" } | { "type": "cli_not_installed", provider: ProviderKind, } | { "type": "cli_not_logged_in", provider: ProviderKind, };
|
|
|
|
export type GetPrCommentsQuery = { repo_id: string, };
|
|
|
|
export type CreateAndStartWorkspaceRequest = { name: string | null, repos: Array<WorkspaceRepoInput>, linked_issue: LinkedIssueInfo | null, executor_config: ExecutorConfig, prompt: string, attachment_ids: Array<string> | null, };
|
|
|
|
export type CreateAndStartWorkspaceResponse = { workspace: Workspace, execution_process: ExecutionProcess, };
|
|
|
|
export type UnifiedPrComment = { "comment_type": "general", id: string, author: string, author_association: string | null, body: string, created_at: string, url: string | null, } | { "comment_type": "review", id: bigint, author: string, author_association: string | null, body: string, created_at: string, url: string | null, path: string, line: bigint | null, side: string | null, diff_hunk: string | null, };
|
|
|
|
export type ProviderKind = "git_hub" | "azure_dev_ops" | "unknown";
|
|
|
|
export type PullRequestDetail = { number: bigint, url: string, status: MergeStatus, merged_at: string | null, merge_commit_sha: string | null, title: string, base_branch: string, head_branch: string, };
|
|
|
|
export type GitRemote = { name: string, url: string, };
|
|
|
|
export type ListPrsError = { "type": "cli_not_installed", provider: ProviderKind, } | { "type": "auth_failed", message: string, } | { "type": "unsupported_provider" };
|
|
|
|
export type LinkPrToIssueRequest = { pr_url: string, pr_number: number, base_branch: string, };
|
|
|
|
export type CreateWorkspaceFromPrBody = { repo_id: string, pr_number: bigint, pr_title: string, pr_url: string, head_branch: string, base_branch: string, run_setup: boolean, remote_name: string | null, };
|
|
|
|
export type CreateWorkspaceFromPrResponse = { workspace: Workspace, };
|
|
|
|
export type CreateFromPrError = { "type": "pr_not_found" } | { "type": "branch_fetch_failed", message: string, } | { "type": "cli_not_installed", provider: ProviderKind, } | { "type": "auth_failed", message: string, } | { "type": "unsupported_provider" };
|
|
|
|
export type RepoBranchStatus = { repo_id: string, repo_name: string, commits_behind: number | null, commits_ahead: number | null, has_uncommitted_changes: boolean | null, head_oid: string | null, uncommitted_count: number | null, untracked_count: number | null, target_branch_name: string, remote_commits_behind: number | null, remote_commits_ahead: number | null, merges: Array<Merge>, is_rebase_in_progress: boolean, conflict_op: ConflictOp | null, conflicted_files: Array<string>, is_target_remote: boolean, };
|
|
|
|
export type UpdateWorkspace = { archived: boolean | null, pinned: boolean | null, name: string | null, };
|
|
|
|
export type UpdateSession = { name: string | null, };
|
|
|
|
export type WorkspaceSummaryRequest = { archived: boolean, };
|
|
|
|
export type WorkspaceSummary = { workspace_id: string,
|
|
/**
|
|
* Session ID of the latest execution process
|
|
*/
|
|
latest_session_id: string | null,
|
|
/**
|
|
* Is a tool approval currently pending?
|
|
*/
|
|
has_pending_approval: boolean,
|
|
/**
|
|
* Number of files with changes
|
|
*/
|
|
files_changed: number | null,
|
|
/**
|
|
* Total lines added across all files
|
|
*/
|
|
lines_added: number | null,
|
|
/**
|
|
* Total lines removed across all files
|
|
*/
|
|
lines_removed: number | null,
|
|
/**
|
|
* When the latest execution process completed
|
|
*/
|
|
latest_process_completed_at?: string,
|
|
/**
|
|
* Status of the latest execution process
|
|
*/
|
|
latest_process_status: ExecutionProcessStatus | null,
|
|
/**
|
|
* Is a dev server currently running?
|
|
*/
|
|
has_running_dev_server: boolean,
|
|
/**
|
|
* Does this workspace have unseen coding agent turns?
|
|
*/
|
|
has_unseen_turns: boolean,
|
|
/**
|
|
* PR status for this workspace (if any PR exists)
|
|
*/
|
|
pr_status: MergeStatus | null,
|
|
/**
|
|
* PR number for this workspace (if any PR exists)
|
|
*/
|
|
pr_number: bigint | null,
|
|
/**
|
|
* PR URL for this workspace (if any PR exists)
|
|
*/
|
|
pr_url: string | null, };
|
|
|
|
export type WorkspaceSummaryResponse = { summaries: Array<WorkspaceSummary>, };
|
|
|
|
export type DiffStats = { files_changed: number, lines_added: number, lines_removed: number, };
|
|
|
|
export type DirectoryEntry = { name: string, path: string, is_directory: boolean, is_git_repo: boolean, last_modified: bigint | null, };
|
|
|
|
export type DirectoryListResponse = { entries: Array<DirectoryEntry>, current_path: string, };
|
|
|
|
export type SearchMode = "taskform" | "settings";
|
|
|
|
export type Config = { config_version: string, theme: ThemeMode, executor_profile: ExecutorProfileId, disclaimer_acknowledged: boolean, onboarding_acknowledged: boolean, remote_onboarding_acknowledged: boolean, notifications: NotificationConfig, editor: EditorConfig, github: GitHubConfig, analytics_enabled: boolean, workspace_dir: string | null, last_app_version: string | null, show_release_notes: boolean, language: UiLanguage, git_branch_prefix: string, showcases: ShowcaseState, pr_auto_description_enabled: boolean, pr_auto_description_prompt: string | null, commit_reminder_enabled: boolean, commit_reminder_prompt: string | null, send_message_shortcut: SendMessageShortcut, relay_enabled: boolean, host_nickname: string | null, };
|
|
|
|
export type NotificationConfig = { sound_enabled: boolean, push_enabled: boolean, sound_file: SoundFile, };
|
|
|
|
export enum ThemeMode { LIGHT = "LIGHT", DARK = "DARK", SYSTEM = "SYSTEM" }
|
|
|
|
export type EditorConfig = { editor_type: EditorType, custom_command: string | null, remote_ssh_host: string | null, remote_ssh_user: string | null, auto_install_extension: boolean, };
|
|
|
|
export enum EditorType { VS_CODE = "VS_CODE", VS_CODE_INSIDERS = "VS_CODE_INSIDERS", CURSOR = "CURSOR", WINDSURF = "WINDSURF", INTELLI_J = "INTELLI_J", ZED = "ZED", XCODE = "XCODE", GOOGLE_ANTIGRAVITY = "GOOGLE_ANTIGRAVITY", CUSTOM = "CUSTOM" }
|
|
|
|
export type EditorOpenError = { "type": "executable_not_found", executable: string, editor_type: EditorType, } | { "type": "invalid_command", details: string, editor_type: EditorType, } | { "type": "launch_failed", executable: string, details: string, editor_type: EditorType, };
|
|
|
|
export type GitHubConfig = { pat: string | null, oauth_token: string | null, username: string | null, primary_email: string | null, default_pr_base: string | null, };
|
|
|
|
export enum SoundFile { ABSTRACT_SOUND1 = "ABSTRACT_SOUND1", ABSTRACT_SOUND2 = "ABSTRACT_SOUND2", ABSTRACT_SOUND3 = "ABSTRACT_SOUND3", ABSTRACT_SOUND4 = "ABSTRACT_SOUND4", COW_MOOING = "COW_MOOING", FAHHHHH = "FAHHHHH", PHONE_VIBRATION = "PHONE_VIBRATION", ROOSTER = "ROOSTER" }
|
|
|
|
export type UiLanguage = "BROWSER" | "EN" | "FR" | "JA" | "ES" | "KO" | "ZH_HANS" | "ZH_HANT";
|
|
|
|
export type ShowcaseState = { seen_features: Array<string>, };
|
|
|
|
export type SendMessageShortcut = "ModifierEnter" | "Enter";
|
|
|
|
export type GitBranch = { name: string, is_current: boolean, is_remote: boolean, last_commit_date: Date, };
|
|
|
|
export type QueuedMessage = {
|
|
/**
|
|
* The session this message is queued for
|
|
*/
|
|
session_id: string,
|
|
/**
|
|
* The follow-up data (message + variant)
|
|
*/
|
|
data: DraftFollowUpData,
|
|
/**
|
|
* Timestamp when the message was queued
|
|
*/
|
|
queued_at: string, };
|
|
|
|
export type QueueStatus = { "status": "empty" } | { "status": "queued", message: QueuedMessage, };
|
|
|
|
export type ConflictOp = "rebase" | "merge" | "cherry_pick" | "revert";
|
|
|
|
export type ExecutorAction = { typ: ExecutorActionType, next_action: ExecutorAction | null, };
|
|
|
|
export type McpConfig = { servers: { [key in string]?: JsonValue }, servers_path: Array<string>, template: JsonValue, preconfigured: JsonValue, is_toml_config: boolean, };
|
|
|
|
export type ExecutorActionType = { "type": "CodingAgentInitialRequest" } & CodingAgentInitialRequest | { "type": "CodingAgentFollowUpRequest" } & CodingAgentFollowUpRequest | { "type": "ScriptRequest" } & ScriptRequest | { "type": "ReviewRequest" } & ReviewRequest;
|
|
|
|
export type ExecutorConfig = {
|
|
/**
|
|
* The executor type (e.g., CLAUDE_CODE, AMP)
|
|
*/
|
|
executor: BaseCodingAgent,
|
|
/**
|
|
* Optional variant/preset name (e.g., "PLAN", "ROUTER")
|
|
*/
|
|
variant?: string | null,
|
|
/**
|
|
* Model override (e.g., "anthropic/claude-sonnet-4-20250514")
|
|
*/
|
|
model_id?: string | null,
|
|
/**
|
|
* Agent mode override
|
|
*/
|
|
agent_id?: string | null,
|
|
/**
|
|
* Reasoning effort override (e.g., "high", "medium")
|
|
*/
|
|
reasoning_id?: string | null,
|
|
/**
|
|
* Permission policy override
|
|
*/
|
|
permission_policy?: PermissionPolicy | null, };
|
|
|
|
export type ScriptContext = "SetupScript" | "CleanupScript" | "ArchiveScript" | "DevServer" | "ToolInstallScript";
|
|
|
|
export type ScriptRequest = { script: string, language: ScriptRequestLanguage, context: ScriptContext,
|
|
/**
|
|
* Optional relative path to execute the script in (relative to container_ref).
|
|
* If None, uses the container_ref directory directly.
|
|
*/
|
|
working_dir: string | null, };
|
|
|
|
export type ScriptRequestLanguage = "Bash";
|
|
|
|
export type BaseCodingAgent = string;
|
|
|
|
export type CodingAgent = { "CLAUDE_CODE": ClaudeCode } | { "AMP": Amp } | { "GEMINI": Gemini } | { "CODEX": Codex } | { "OPENCODE": Opencode } | { "CURSOR_AGENT": CursorAgent } | { "QWEN_CODE": QwenCode } | { "COPILOT": Copilot } | { "DROID": Droid } | { "ACP_SERVER": AcpServer };
|
|
|
|
export type SlashCommandDescription = {
|
|
/**
|
|
* Command name without the leading slash, e.g. `help` for `/help`.
|
|
*/
|
|
name: string, description?: string | null, };
|
|
|
|
export type AvailabilityInfo = { "type": "LOGIN_DETECTED", last_auth_timestamp: bigint, } | { "type": "INSTALLATION_FOUND" } | { "type": "NOT_FOUND" };
|
|
|
|
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, };
|
|
|
|
export type ExecutorProfileId = {
|
|
/**
|
|
* The executor type (e.g., "CLAUDE_CODE", "AMP")
|
|
*/
|
|
executor: BaseCodingAgent,
|
|
/**
|
|
* Optional variant name (e.g., "PLAN", "ROUTER")
|
|
*/
|
|
variant: string | null, };
|
|
|
|
export type ExecutorRecentModels = {
|
|
/**
|
|
* Ordered list of recently used model keys (most recent last).
|
|
*/
|
|
models?: Array<string>,
|
|
/**
|
|
* Last-used reasoning effort per model
|
|
*/
|
|
reasoning_by_model?: { [key in string]?: string }, };
|
|
|
|
export type ExecutorProfile = { recently_used_models?: ExecutorRecentModels | null, } & ({ [key in string]?: { "CLAUDE_CODE": ClaudeCode } | { "AMP": Amp } | { "GEMINI": Gemini } | { "CODEX": Codex } | { "OPENCODE": Opencode } | { "CURSOR_AGENT": CursorAgent } | { "QWEN_CODE": QwenCode } | { "COPILOT": Copilot } | { "DROID": Droid } | { "ACP_SERVER": AcpServer } });
|
|
|
|
export type ExecutorConfigs = { executors: { [key in BaseCodingAgent]?: ExecutorProfile }, };
|
|
|
|
export enum BaseAgentCapability { SESSION_FORK = "SESSION_FORK", SETUP_HELPER = "SETUP_HELPER", CONTEXT_USAGE = "CONTEXT_USAGE" }
|
|
|
|
export type ClaudeEffort = "low" | "medium" | "high" | "xhigh" | "max";
|
|
|
|
export type ClaudeCode = { append_prompt: AppendPrompt, claude_code_router?: boolean | null, plan?: boolean | null, approvals?: boolean | null, model?: string | null, effort?: ClaudeEffort | null, agent?: string | null, dangerously_skip_permissions?: boolean | null, disable_api_key?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type Gemini = { append_prompt: AppendPrompt, model?: string | null, yolo?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type Amp = { append_prompt: AppendPrompt, dangerously_allow_all?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type Codex = { append_prompt: AppendPrompt, sandbox?: SandboxMode | null, ask_for_approval?: AskForApproval | null, oss?: boolean | null, model?: string | null, model_reasoning_effort?: ReasoningEffort | null, model_reasoning_summary?: ReasoningSummary | null, model_reasoning_summary_format?: ReasoningSummaryFormat | null, profile?: string | null, base_instructions?: string | null, include_apply_patch_tool?: boolean | null, model_provider?: string | null, compact_prompt?: string | null, developer_instructions?: string | null, plan: boolean, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type SandboxMode = "auto" | "read-only" | "workspace-write" | "danger-full-access";
|
|
|
|
export type AskForApproval = "unless-trusted" | "on-failure" | "on-request" | "never";
|
|
|
|
export type ReasoningEffort = "low" | "medium" | "high" | "xhigh";
|
|
|
|
export type ReasoningSummary = "auto" | "concise" | "detailed" | "none";
|
|
|
|
export type ReasoningSummaryFormat = "none" | "experimental";
|
|
|
|
export type CursorAgent = { append_prompt: AppendPrompt, force?: boolean | null, model?: string | null, reasoning?: string | null, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type Copilot = { append_prompt: AppendPrompt, model?: string | null, reasoning_effort?: string | null, allow_all_tools?: boolean | null,
|
|
/**
|
|
* Start in plan mode. Takes precedence over `allow_all_tools`.
|
|
*/
|
|
plan?: boolean | null, allow_tool?: string | null, deny_tool?: string | null, add_dir?: Array<string> | null, disable_mcp_server?: Array<string> | null, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type Opencode = { append_prompt: AppendPrompt, model?: string | null, variant?: string | null, agent?: string | null,
|
|
/**
|
|
* Auto-approve agent actions
|
|
*/
|
|
auto_approve: boolean,
|
|
/**
|
|
* Enable auto-compaction when the context length approaches the model's context window limit
|
|
*/
|
|
auto_compact: boolean, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type QwenCode = { append_prompt: AppendPrompt, model?: string | null, agent?: string | null, yolo?: boolean | null, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type Droid = { append_prompt: AppendPrompt, autonomy: Autonomy, model?: string | null, reasoning_effort?: DroidReasoningEffort | null, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type AcpServer = { registry_id: string, append_prompt: AppendPrompt, base_command_override?: string | null, additional_params?: Array<string> | null, env?: { [key in string]?: string } | null, };
|
|
|
|
export type Autonomy = "normal" | "low" | "medium" | "high" | "skip-permissions-unsafe";
|
|
|
|
export type DroidReasoningEffort = "none" | "dynamic" | "off" | "low" | "medium" | "high";
|
|
|
|
export type AppendPrompt = string | null;
|
|
|
|
export type CodingAgentInitialRequest = { prompt: string,
|
|
/**
|
|
* Unified executor identity + overrides
|
|
*/
|
|
executor_config: ExecutorConfig,
|
|
/**
|
|
* Optional relative path to execute the agent in (relative to container_ref).
|
|
* If None, uses the container_ref directory directly.
|
|
*/
|
|
working_dir: string | null, };
|
|
|
|
export type CodingAgentFollowUpRequest = { prompt: string, session_id: string, reset_to_message_id: string | null,
|
|
/**
|
|
* Unified executor identity + overrides
|
|
*/
|
|
executor_config: ExecutorConfig,
|
|
/**
|
|
* Optional relative path to execute the agent in (relative to container_ref).
|
|
* If None, uses the container_ref directory directly.
|
|
*/
|
|
working_dir: string | null, };
|
|
|
|
export type ReviewRequest = {
|
|
/**
|
|
* Unified executor identity + overrides
|
|
*/
|
|
executor_config: ExecutorConfig, context: Array<RepoReviewContext> | null, prompt: string,
|
|
/**
|
|
* Optional session ID to resume an existing session
|
|
*/
|
|
session_id: string | null,
|
|
/**
|
|
* Optional relative path to execute the agent in (relative to container_ref).
|
|
*/
|
|
working_dir: string | null, };
|
|
|
|
export type RepoReviewContext = { repo_id: string, repo_name: string, base_commit: string, };
|
|
|
|
export type CommandExitStatus = { "type": "exit_code", code: number, } | { "type": "success", success: boolean, };
|
|
|
|
export type CommandRunResult = { exit_status: CommandExitStatus | null, output: string | null, };
|
|
|
|
export type CommandCategory = "read" | "search" | "edit" | "fetch" | "other";
|
|
|
|
export type NormalizedEntry = { timestamp: string | null, entry_type: NormalizedEntryType, content: string, };
|
|
|
|
export type NormalizedEntryType = { "type": "user_message" } | { "type": "user_feedback", denied_tool: string, } | { "type": "assistant_message" } | { "type": "tool_use", tool_name: string, action_type: ActionType, status: ToolStatus, } | { "type": "system_message" } | { "type": "error_message", error_type: NormalizedEntryError, } | { "type": "thinking" } | { "type": "loading" } | { "type": "next_action", failed: boolean, execution_processes: number, needs_setup: boolean,
|
|
/**
|
|
* Profile of the agent that needs setup, for the Sign in button
|
|
*/
|
|
executor_profile_id?: ExecutorProfileId, } | { "type": "token_usage_info" } & TokenUsageInfo | { "type": "user_answered_questions", answers: Array<AnsweredQuestion>, };
|
|
|
|
export type TokenUsageInfo = { total_tokens: number, model_context_window: number, };
|
|
|
|
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, category: CommandCategory, } | { "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, subagent_type: string | null, result: ToolResult | null, } | { "action": "plan_presentation", plan: string, } | { "action": "todo_management", todos: Array<TodoItem>, operation: string, } | { "action": "ask_user_question", questions: Array<AskUserQuestionItem>, } | { "action": "other", description: string, };
|
|
|
|
export type AnsweredQuestion = { question: string, answer: Array<string>, };
|
|
|
|
export type AskUserQuestionItem = { question: string, header: string, options: Array<AskUserQuestionOption>, multiSelect: boolean, };
|
|
|
|
export type AskUserQuestionOption = { label: string, description: string, };
|
|
|
|
export type TodoItem = { content: string, status: string, priority: string | null, };
|
|
|
|
export type NormalizedEntryError = { "type": "setup_required" } | { "type": "other" };
|
|
|
|
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" };
|
|
|
|
export type ToolStatus = { "status": "created" } | { "status": "success" } | { "status": "failed" } | { "status": "denied", reason: string | null, } | { "status": "pending_approval", approval_id: string, } | { "status": "timed_out" };
|
|
|
|
export type PatchType = { "type": "NORMALIZED_ENTRY", "content": NormalizedEntry } | { "type": "STDOUT", "content": string } | { "type": "STDERR", "content": string } | { "type": "DIFF", "content": Diff };
|
|
|
|
export type ModelInfo = {
|
|
/**
|
|
* Model identifier
|
|
*/
|
|
id: string,
|
|
/**
|
|
* Display name
|
|
*/
|
|
name: string,
|
|
/**
|
|
* Provider this model belongs to
|
|
*/
|
|
provider_id?: string | null,
|
|
/**
|
|
* Configurable reasoning options if supported
|
|
*/
|
|
reasoning_options: Array<ReasoningOption>, };
|
|
|
|
export type ReasoningOption = { id: string, label: string, is_default: boolean, };
|
|
|
|
export type ModelProvider = {
|
|
/**
|
|
* Provider identifier
|
|
*/
|
|
id: string,
|
|
/**
|
|
* Display name
|
|
*/
|
|
name: string, };
|
|
|
|
export type AgentInfo = { id: string, label: string, description?: string | null, is_default: boolean, };
|
|
|
|
export enum PermissionPolicy { AUTO = "AUTO", SUPERVISED = "SUPERVISED", PLAN = "PLAN" }
|
|
|
|
export type ModelSelectorConfig = {
|
|
/**
|
|
* Available providers
|
|
*/
|
|
providers: Array<ModelProvider>,
|
|
/**
|
|
* Available models
|
|
*/
|
|
models: Array<ModelInfo>,
|
|
/**
|
|
* Global default model (format: provider_id/model_id)
|
|
*/
|
|
default_model?: string | null,
|
|
/**
|
|
* Available agents
|
|
*/
|
|
agents: Array<AgentInfo>,
|
|
/**
|
|
* Supported permission policies
|
|
*/
|
|
permissions: Array<PermissionPolicy>, };
|
|
|
|
export type ExecutorDiscoveredOptions = { model_selector: ModelSelectorConfig, slash_commands: Array<SlashCommandDescription>, loading_models: boolean, loading_agents: boolean, loading_slash_commands: boolean, error: string | null,
|
|
/**
|
|
* True only for a model list read from the agent itself in the last few minutes. Then a
|
|
* saved model or permission that isn't offered is stale and can be dropped. Never set
|
|
* for lists from the disk cache or a built-in fallback.
|
|
*/
|
|
models_complete: boolean, };
|
|
|
|
export type JsonValue = number | string | boolean | Array<JsonValue> | { [key in string]?: JsonValue } | null;
|
|
|
|
export type RelayWsMessageType = "text" | "binary" | "ping" | "pong" | "close";
|
|
|
|
export type DataChannelMessage = { "type": "http_request" } & DataChannelRequest | { "type": "http_response" } & DataChannelResponse | { "type": "ws_open" } & WsOpen | { "type": "ws_opened" } & WsOpened | { "type": "ws_frame" } & WsFrame | { "type": "ws_close" } & WsClose | { "type": "ws_error" } & WsError;
|
|
|
|
export type DataChannelRequest = { id: string, method: string, path: string, headers: { [key in string]?: Array<string> },
|
|
/**
|
|
* Base64-encoded request body, if any.
|
|
*/
|
|
body_b64?: string | null, };
|
|
|
|
export type DataChannelResponse = { id: string, status: number, headers: { [key in string]?: Array<string> },
|
|
/**
|
|
* Base64-encoded response body, if any.
|
|
*/
|
|
body_b64?: string | null, };
|
|
|
|
export type WsOpen = {
|
|
/**
|
|
* Unique connection ID for multiplexing.
|
|
*/
|
|
conn_id: string,
|
|
/**
|
|
* Target path, e.g. `/api/sessions/abc/queue`.
|
|
*/
|
|
path: string,
|
|
/**
|
|
* Optional sub-protocol(s) to negotiate.
|
|
*/
|
|
protocols?: string | null, };
|
|
|
|
export type WsOpened = { conn_id: string,
|
|
/**
|
|
* The sub-protocol selected by the server, if any.
|
|
*/
|
|
selected_protocol?: string | null, };
|
|
|
|
export type WsFrame = { conn_id: string, msg_type: RelayWsMessageType,
|
|
/**
|
|
* Base64-encoded payload.
|
|
*/
|
|
payload_b64?: string | null, };
|
|
|
|
export type WsClose = { conn_id: string,
|
|
/**
|
|
* Close code (RFC 6455 §7.4).
|
|
*/
|
|
code?: number | null,
|
|
/**
|
|
* Close reason.
|
|
*/
|
|
reason?: string | null, };
|
|
|
|
export type WsError = { conn_id: string, error: string, };
|
|
|
|
export type SdpOffer = {
|
|
/**
|
|
* The SDP string from the peer's `RTCPeerConnection.createOffer()`.
|
|
*/
|
|
sdp: string,
|
|
/**
|
|
* Caller-provided session identifier to correlate offer/answer/candidates.
|
|
*/
|
|
session_id: string, };
|
|
|
|
export type SdpAnswer = {
|
|
/**
|
|
* The SDP string from `Rtc::direct_api().create_answer()`.
|
|
*/
|
|
sdp: string,
|
|
/**
|
|
* Echoed session identifier from the offer.
|
|
*/
|
|
session_id: string, };
|
|
|
|
export const DEFAULT_PR_DESCRIPTION_PROMPT = "Update the PR that was just created with a better title and description.\nThe PR number is #{pr_number} and the URL is {pr_url}.\n\nAnalyze the changes in this branch and write:\n1. A concise, descriptive title that summarizes the changes, postfixed with \"(Vibe Kanban)\"\n2. A detailed description that explains:\n - What changes were made\n - Why they were made (based on the task context)\n - Any important implementation details\n - At the end, include a note: \"This PR was written using [Vibe Kanban](https://vibekanban.com)\"\n\nUse the appropriate CLI tool to update the PR (gh pr edit for GitHub, az repos pr update for Azure DevOps).";
|
|
|
|
export const DEFAULT_COMMIT_REMINDER_PROMPT = "There are uncommitted changes. Please stage and commit them now with a descriptive commit message."; |