kin: KIN-BIZ-006 Проверить промпт sysadmin.md на поддержку сценария env_scan
This commit is contained in:
parent
531275e4ce
commit
a58578bb9d
14 changed files with 1619 additions and 13 deletions
|
|
@ -226,6 +226,19 @@ export interface AuditResult {
|
|||
error?: string
|
||||
}
|
||||
|
||||
export interface ProjectEnvironment {
|
||||
id: number
|
||||
project_id: string
|
||||
name: string
|
||||
host: string
|
||||
port: number
|
||||
username: string
|
||||
auth_type: string
|
||||
is_installed: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface EscalationNotification {
|
||||
task_id: string
|
||||
project_id: string
|
||||
|
|
@ -236,6 +249,26 @@ export interface EscalationNotification {
|
|||
telegram_sent: boolean
|
||||
}
|
||||
|
||||
export interface ChatMessage {
|
||||
id: number
|
||||
project_id: string
|
||||
role: 'user' | 'assistant'
|
||||
content: string
|
||||
message_type: string
|
||||
task_id: string | null
|
||||
created_at: string
|
||||
task_stub?: {
|
||||
id: string
|
||||
title: string
|
||||
status: string
|
||||
} | null
|
||||
}
|
||||
|
||||
export interface ChatSendResult {
|
||||
user_message: ChatMessage
|
||||
assistant_message: ChatMessage
|
||||
}
|
||||
|
||||
export const api = {
|
||||
projects: () => get<Project[]>('/projects'),
|
||||
project: (id: string) => get<ProjectDetail>(`/projects/${id}`),
|
||||
|
|
@ -291,4 +324,18 @@ export const api = {
|
|||
post<{ phase: Phase; new_task: Task }>(`/phases/${phaseId}/revise`, { comment }),
|
||||
startPhase: (projectId: string) =>
|
||||
post<{ status: string; phase_id: number; task_id: string }>(`/projects/${projectId}/phases/start`, {}),
|
||||
environments: (projectId: string) =>
|
||||
get<ProjectEnvironment[]>(`/projects/${projectId}/environments`),
|
||||
createEnvironment: (projectId: string, data: { name: string; host: string; port?: number; username: string; auth_type?: string; auth_value?: string; is_installed?: boolean }) =>
|
||||
post<ProjectEnvironment & { scan_task_id?: string }>(`/projects/${projectId}/environments`, data),
|
||||
updateEnvironment: (projectId: string, envId: number, data: { name?: string; host?: string; port?: number; username?: string; auth_type?: string; auth_value?: string; is_installed?: boolean }) =>
|
||||
patch<ProjectEnvironment & { scan_task_id?: string }>(`/projects/${projectId}/environments/${envId}`, data),
|
||||
deleteEnvironment: (projectId: string, envId: number) =>
|
||||
del<void>(`/projects/${projectId}/environments/${envId}`),
|
||||
scanEnvironment: (projectId: string, envId: number) =>
|
||||
post<{ status: string; task_id: string }>(`/projects/${projectId}/environments/${envId}/scan`, {}),
|
||||
chatHistory: (projectId: string, limit = 50) =>
|
||||
get<ChatMessage[]>(`/projects/${projectId}/chat?limit=${limit}`),
|
||||
sendChatMessage: (projectId: string, content: string) =>
|
||||
post<ChatSendResult>(`/projects/${projectId}/chat`, { content }),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue