feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
import { invoke } from "@tauri-apps/api/core";
|
|
|
|
|
|
|
|
|
|
// ─── Types matching Rust backend models ───────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export interface ProviderConfig {
|
|
|
|
|
provider_type?: string;
|
|
|
|
|
max_tokens?: number;
|
|
|
|
|
temperature?: number;
|
|
|
|
|
name: string;
|
|
|
|
|
api_url: string;
|
|
|
|
|
api_key: string;
|
|
|
|
|
model: string;
|
2026-04-03 20:45:42 +00:00
|
|
|
custom_endpoint_path?: string;
|
|
|
|
|
custom_auth_header?: string;
|
|
|
|
|
custom_auth_prefix?: string;
|
|
|
|
|
api_format?: string;
|
|
|
|
|
session_id?: string;
|
2026-04-03 21:34:00 +00:00
|
|
|
user_id?: string;
|
2026-04-09 23:05:44 +00:00
|
|
|
use_datastore_upload?: boolean;
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Message {
|
|
|
|
|
role: string;
|
|
|
|
|
content: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface TokenUsage {
|
|
|
|
|
prompt_tokens: number;
|
|
|
|
|
completion_tokens: number;
|
|
|
|
|
total_tokens: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ChatResponse {
|
|
|
|
|
content: string;
|
|
|
|
|
model: string;
|
|
|
|
|
usage?: TokenUsage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AnalysisResult {
|
|
|
|
|
summary: string;
|
|
|
|
|
key_findings: string[];
|
|
|
|
|
suggested_why1: string;
|
|
|
|
|
severity_assessment: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ProviderInfo {
|
|
|
|
|
name: string;
|
|
|
|
|
supports_streaming: boolean;
|
|
|
|
|
models: string[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Issue {
|
|
|
|
|
id: string;
|
|
|
|
|
title: string;
|
|
|
|
|
description: string;
|
|
|
|
|
severity: string;
|
|
|
|
|
status: string;
|
|
|
|
|
category: string;
|
|
|
|
|
source: string;
|
|
|
|
|
created_at: string;
|
|
|
|
|
updated_at: string;
|
|
|
|
|
resolved_at?: string;
|
|
|
|
|
assigned_to: string;
|
|
|
|
|
tags: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface FiveWhyEntry {
|
|
|
|
|
id: string;
|
|
|
|
|
why_number: number;
|
|
|
|
|
question: string;
|
|
|
|
|
answer?: string;
|
|
|
|
|
created_at: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface TimelineEvent {
|
|
|
|
|
id: string;
|
2026-04-19 23:25:53 +00:00
|
|
|
issue_id: string;
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
event_type: string;
|
|
|
|
|
description: string;
|
2026-04-19 23:25:53 +00:00
|
|
|
metadata: string;
|
|
|
|
|
created_at: string;
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AiConversation {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
provider: string;
|
|
|
|
|
model: string;
|
|
|
|
|
created_at: string;
|
|
|
|
|
title: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ResolutionStep {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
step_order: number;
|
|
|
|
|
why_question: string;
|
|
|
|
|
answer: string;
|
|
|
|
|
evidence: string;
|
|
|
|
|
created_at: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IssueDetail {
|
|
|
|
|
issue: Issue;
|
|
|
|
|
log_files: LogFile[];
|
2026-04-09 01:03:34 +00:00
|
|
|
image_attachments: ImageAttachment[];
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
resolution_steps: ResolutionStep[];
|
|
|
|
|
conversations: AiConversation[];
|
2026-04-19 23:25:53 +00:00
|
|
|
timeline_events: TimelineEvent[];
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IssueSummary {
|
|
|
|
|
id: string;
|
|
|
|
|
title: string;
|
|
|
|
|
severity: string;
|
|
|
|
|
status: string;
|
|
|
|
|
category: string;
|
|
|
|
|
created_at: string;
|
|
|
|
|
updated_at: string;
|
|
|
|
|
domain?: string;
|
|
|
|
|
log_count: number;
|
|
|
|
|
step_count: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IssueListQuery {
|
|
|
|
|
status?: string;
|
|
|
|
|
domain?: string;
|
|
|
|
|
severity?: string;
|
|
|
|
|
search?: string;
|
|
|
|
|
limit?: number;
|
|
|
|
|
offset?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface NewIssue {
|
|
|
|
|
title: string;
|
|
|
|
|
domain: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
severity?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface LogFile {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
file_name: string;
|
|
|
|
|
file_path: string;
|
|
|
|
|
file_size: number;
|
|
|
|
|
mime_type: string;
|
|
|
|
|
content_hash: string;
|
|
|
|
|
uploaded_at: string;
|
|
|
|
|
redacted: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 01:03:34 +00:00
|
|
|
export interface ImageAttachment {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
file_name: string;
|
|
|
|
|
file_path: string;
|
|
|
|
|
file_size: number;
|
|
|
|
|
mime_type: string;
|
|
|
|
|
upload_hash: string;
|
|
|
|
|
uploaded_at: string;
|
|
|
|
|
pii_warning_acknowledged: boolean;
|
|
|
|
|
is_paste: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
export interface PiiSpan {
|
|
|
|
|
id: string;
|
|
|
|
|
pii_type: string;
|
|
|
|
|
start: number;
|
|
|
|
|
end: number;
|
|
|
|
|
original: string;
|
|
|
|
|
replacement: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface PiiDetectionResult {
|
|
|
|
|
log_file_id: string;
|
|
|
|
|
detections: PiiSpan[];
|
|
|
|
|
total_pii_found: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface RedactedLogFile {
|
|
|
|
|
id: string;
|
|
|
|
|
original_file_id: string;
|
|
|
|
|
file_name: string;
|
|
|
|
|
file_hash: string;
|
|
|
|
|
redaction_count: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface Document_ {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
doc_type: string;
|
|
|
|
|
title: string;
|
|
|
|
|
content_md: string;
|
|
|
|
|
created_at: number;
|
|
|
|
|
updated_at: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface HardwareInfo {
|
|
|
|
|
total_ram_gb: number;
|
|
|
|
|
cpu_arch: string;
|
|
|
|
|
gpu_vendor?: string;
|
|
|
|
|
gpu_vram_gb?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ModelRecommendation {
|
|
|
|
|
name: string;
|
|
|
|
|
size: string;
|
|
|
|
|
min_ram_gb: number;
|
|
|
|
|
description: string;
|
|
|
|
|
recommended: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface OllamaModel {
|
|
|
|
|
name: string;
|
|
|
|
|
size: number;
|
|
|
|
|
modified: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface OllamaStatus {
|
|
|
|
|
installed: boolean;
|
|
|
|
|
version?: string;
|
|
|
|
|
running: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface InstallGuide {
|
|
|
|
|
platform: string;
|
|
|
|
|
steps: string[];
|
|
|
|
|
url: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AuditEntry {
|
|
|
|
|
id: string;
|
|
|
|
|
timestamp: string;
|
|
|
|
|
action: string;
|
|
|
|
|
entity_type: string;
|
|
|
|
|
entity_id: string;
|
|
|
|
|
user_id: string;
|
|
|
|
|
details: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AuditFilter {
|
|
|
|
|
action?: string;
|
|
|
|
|
entity_type?: string;
|
|
|
|
|
entity_id?: string;
|
|
|
|
|
limit?: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AppSettings {
|
|
|
|
|
theme: string;
|
|
|
|
|
ai_providers: ProviderConfig[];
|
|
|
|
|
active_provider?: string;
|
|
|
|
|
default_provider: string;
|
|
|
|
|
default_model: string;
|
|
|
|
|
ollama_url: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ─── TriageMessage (for UI store, not a DB type) ──────────────────────────────
|
|
|
|
|
|
|
|
|
|
export interface TriageMessage {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
role: string;
|
|
|
|
|
content: string;
|
|
|
|
|
why_level?: number;
|
|
|
|
|
created_at: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ─── AI commands ──────────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const analyzeLogsCmd = (issueId: string, logFileIds: string[], providerConfig: ProviderConfig) =>
|
|
|
|
|
invoke<AnalysisResult>("analyze_logs", { issueId, logFileIds, providerConfig });
|
|
|
|
|
|
2026-04-19 23:13:47 +00:00
|
|
|
export const chatMessageCmd = (issueId: string, message: string, providerConfig: ProviderConfig, systemPrompt?: string) =>
|
|
|
|
|
invoke<ChatResponse>("chat_message", { issueId, message, providerConfig, systemPrompt: systemPrompt ?? null });
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
|
|
|
|
|
export const listProvidersCmd = () => invoke<ProviderInfo[]>("list_providers");
|
|
|
|
|
|
|
|
|
|
// ─── Analysis / PII commands ──────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const uploadLogFileCmd = (issueId: string, filePath: string) =>
|
|
|
|
|
invoke<LogFile>("upload_log_file", { issueId, filePath });
|
|
|
|
|
|
2026-04-09 23:05:44 +00:00
|
|
|
export const uploadLogFileByContentCmd = (issueId: string, fileName: string, content: string) =>
|
|
|
|
|
invoke<LogFile>("upload_log_file_by_content", { issueId, fileName, content });
|
|
|
|
|
|
2026-04-09 01:03:34 +00:00
|
|
|
export const uploadImageAttachmentCmd = (issueId: string, filePath: string) =>
|
|
|
|
|
invoke<ImageAttachment>("upload_image_attachment", { issueId, filePath });
|
|
|
|
|
|
2026-04-09 23:05:44 +00:00
|
|
|
export const uploadImageAttachmentByContentCmd = (issueId: string, fileName: string, base64Content: string) =>
|
|
|
|
|
invoke<ImageAttachment>("upload_image_attachment_by_content", { issueId, fileName, base64Content });
|
|
|
|
|
|
|
|
|
|
export const uploadFileToDatastoreCmd = (providerConfig: ProviderConfig, filePath: string) =>
|
|
|
|
|
invoke<string>("upload_file_to_datastore", { providerConfig, filePath });
|
|
|
|
|
|
|
|
|
|
export const uploadFileToDatastoreAnyCmd = (providerConfig: ProviderConfig, filePath: string) =>
|
|
|
|
|
invoke<string>("upload_file_to_datastore_any", { providerConfig, filePath });
|
|
|
|
|
|
2026-04-09 01:03:34 +00:00
|
|
|
export const uploadPasteImageCmd = (issueId: string, base64Image: string, mimeType: string) =>
|
|
|
|
|
invoke<ImageAttachment>("upload_paste_image", { issueId, base64Image, mimeType });
|
|
|
|
|
|
|
|
|
|
export const listImageAttachmentsCmd = (issueId: string) =>
|
|
|
|
|
invoke<ImageAttachment[]>("list_image_attachments", { issueId });
|
|
|
|
|
|
|
|
|
|
export const deleteImageAttachmentCmd = (attachmentId: string) =>
|
|
|
|
|
invoke<void>("delete_image_attachment", { attachmentId });
|
|
|
|
|
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
export const detectPiiCmd = (logFileId: string) =>
|
|
|
|
|
invoke<PiiDetectionResult>("detect_pii", { logFileId });
|
|
|
|
|
|
|
|
|
|
export const applyRedactionsCmd = (logFileId: string, approvedSpanIds: string[]) =>
|
|
|
|
|
invoke<RedactedLogFile>("apply_redactions", { logFileId, approvedSpanIds });
|
|
|
|
|
|
|
|
|
|
// ─── Issue CRUD ───────────────────────────────────────────────────────────────
|
|
|
|
|
|
2026-03-31 12:46:36 +00:00
|
|
|
export const testProviderConnectionCmd = (providerConfig: ProviderConfig) =>
|
|
|
|
|
invoke<ChatResponse>("test_provider_connection", { providerConfig });
|
|
|
|
|
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
export const createIssueCmd = (newIssue: NewIssue) =>
|
2026-03-30 20:52:43 +00:00
|
|
|
invoke<Issue>("create_issue", {
|
|
|
|
|
title: newIssue.title,
|
|
|
|
|
description: newIssue.description ?? "",
|
|
|
|
|
severity: newIssue.severity ?? "P3",
|
|
|
|
|
category: newIssue.domain,
|
|
|
|
|
});
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
|
|
|
|
|
export const getIssueCmd = (issueId: string) =>
|
|
|
|
|
invoke<IssueDetail>("get_issue", { issueId });
|
|
|
|
|
|
|
|
|
|
export const listIssuesCmd = (query: IssueListQuery) =>
|
2026-03-31 14:09:57 +00:00
|
|
|
invoke<IssueSummary[]>("list_issues", { filter: query });
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
|
|
|
|
|
export const updateIssueCmd = (
|
|
|
|
|
issueId: string,
|
|
|
|
|
updates: { title?: string; status?: string; severity?: string; description?: string; domain?: string }
|
2026-03-31 17:50:39 +00:00
|
|
|
) => invoke<Issue>("update_issue", { issueId, updates });
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
|
|
|
|
|
export const deleteIssueCmd = (issueId: string) =>
|
|
|
|
|
invoke<void>("delete_issue", { issueId });
|
|
|
|
|
|
|
|
|
|
export const searchIssuesCmd = (query: string) =>
|
|
|
|
|
invoke<IssueSummary[]>("search_issues", { query });
|
|
|
|
|
|
2026-03-31 17:50:39 +00:00
|
|
|
export interface IssueMessage {
|
|
|
|
|
id: string;
|
|
|
|
|
conversation_id: string;
|
|
|
|
|
role: string;
|
|
|
|
|
content: string;
|
|
|
|
|
token_count: number;
|
|
|
|
|
created_at: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getIssueMessagesCmd = (issueId: string) =>
|
|
|
|
|
invoke<IssueMessage[]>("get_issue_messages", { issueId });
|
|
|
|
|
|
|
|
|
|
export const addFiveWhyCmd = (
|
|
|
|
|
issueId: string,
|
|
|
|
|
stepOrder: number,
|
|
|
|
|
whyQuestion: string,
|
|
|
|
|
answer: string,
|
|
|
|
|
evidence: string
|
|
|
|
|
) => invoke<ResolutionStep>("add_five_why", { issueId, stepOrder, whyQuestion, answer, evidence });
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
|
|
|
|
|
export const updateFiveWhyCmd = (entryId: string, answer: string) =>
|
|
|
|
|
invoke<void>("update_five_why", { entryId, answer });
|
|
|
|
|
|
2026-04-19 23:13:47 +00:00
|
|
|
export const addTimelineEventCmd = (issueId: string, eventType: string, description: string, metadata?: string) =>
|
|
|
|
|
invoke<TimelineEvent>("add_timeline_event", { issueId, eventType, description, metadata: metadata ?? null });
|
|
|
|
|
|
|
|
|
|
export const getTimelineEventsCmd = (issueId: string) =>
|
|
|
|
|
invoke<TimelineEvent[]>("get_timeline_events", { issueId });
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
|
|
|
|
|
// ─── Document commands ────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const generateRcaCmd = (issueId: string) => invoke<Document_>("generate_rca", { issueId });
|
|
|
|
|
|
|
|
|
|
export const generatePostmortemCmd = (issueId: string) =>
|
|
|
|
|
invoke<Document_>("generate_postmortem", { issueId });
|
|
|
|
|
|
|
|
|
|
export const updateDocumentCmd = (docId: string, contentMd: string) =>
|
|
|
|
|
invoke<Document_>("update_document", { docId, contentMd });
|
|
|
|
|
|
2026-04-03 13:05:58 +00:00
|
|
|
export const exportDocumentCmd = (docId: string, title: string, contentMd: string, format: string, outputDir: string) =>
|
|
|
|
|
invoke<string>("export_document", { title, contentMd, format, outputDir });
|
feat: initial implementation of TFTSR IT Triage & RCA application
Implements Phases 1-8 of the TFTSR implementation plan.
Rust backend (Tauri 2.x, src-tauri/):
- Multi-provider AI: OpenAI-compatible, Anthropic, Gemini, Mistral, Ollama
- PII detection engine: 11 regex patterns with overlap resolution
- SQLCipher AES-256 encrypted database with 10 versioned migrations
- 28 Tauri IPC commands for triage, analysis, document, and system ops
- Ollama: hardware probe, model recommendations, pull/delete with events
- RCA and blameless post-mortem Markdown document generators
- PDF export via printpdf
- Audit log: SHA-256 hash of every external data send
- Integration stubs for Confluence, ServiceNow, Azure DevOps (v0.2)
Frontend (React 18 + TypeScript + Vite, src/):
- 9 pages: full triage workflow NewIssue→LogUpload→Triage→Resolution→RCA→Postmortem→History+Settings
- 7 components: ChatWindow, TriageProgress, PiiDiffViewer, DocEditor, HardwareReport, ModelSelector, UI primitives
- 3 Zustand stores: session, settings (persisted), history
- Type-safe tauriCommands.ts matching Rust backend types exactly
- 8 IT domain system prompts (Linux, Windows, Network, K8s, DB, Virt, HW, Obs)
DevOps:
- .woodpecker/test.yml: rustfmt, clippy, cargo test, tsc, vitest on every push
- .woodpecker/release.yml: linux/amd64 + linux/arm64 builds, Gogs release upload
Verified:
- cargo check: zero errors
- tsc --noEmit: zero errors
- vitest run: 13/13 unit tests passing
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:36:25 +00:00
|
|
|
|
|
|
|
|
// ─── Ollama & System ──────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const checkOllamaInstalledCmd = () => invoke<OllamaStatus>("check_ollama_installed");
|
|
|
|
|
|
|
|
|
|
export const getOllamaInstallGuideCmd = (platform: string) =>
|
|
|
|
|
invoke<InstallGuide>("get_ollama_install_guide", { platform });
|
|
|
|
|
|
|
|
|
|
export const listOllamaModelsCmd = () => invoke<OllamaModel[]>("list_ollama_models");
|
|
|
|
|
|
|
|
|
|
export const pullOllamaModelCmd = (modelName: string) =>
|
|
|
|
|
invoke<void>("pull_ollama_model", { modelName });
|
|
|
|
|
|
|
|
|
|
export const deleteOllamaModelCmd = (modelName: string) =>
|
|
|
|
|
invoke<void>("delete_ollama_model", { modelName });
|
|
|
|
|
|
|
|
|
|
export const detectHardwareCmd = () => invoke<HardwareInfo>("detect_hardware");
|
|
|
|
|
|
|
|
|
|
export const recommendModelsCmd = () => invoke<ModelRecommendation[]>("recommend_models");
|
|
|
|
|
|
|
|
|
|
// ─── Settings & Audit ─────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const getSettingsCmd = () => invoke<AppSettings>("get_settings");
|
|
|
|
|
|
|
|
|
|
export const updateSettingsCmd = (partialSettings: Partial<AppSettings>) =>
|
|
|
|
|
invoke<AppSettings>("update_settings", { partialSettings });
|
|
|
|
|
|
|
|
|
|
export const getAuditLogCmd = (filter: AuditFilter) =>
|
|
|
|
|
invoke<AuditEntry[]>("get_audit_log", { filter });
|
feat: add OAuth2 frontend UI and complete integration flow
Phase 2.2: OAuth2 flow - FRONTEND COMPLETE ✅
Implemented:
- TypeScript command wrappers in tauriCommands.ts
* initiateOauthCmd(service) -> OAuthInitResponse
* handleOauthCallbackCmd(service, code, stateKey)
* test*ConnectionCmd() for all services
* OAuthInitResponse and ConnectionResult types
- Complete Settings/Integrations UI
* Three integration cards: Confluence, ServiceNow, ADO
* Connect with OAuth2 buttons (Confluence, ADO)
* Basic auth note for ServiceNow
* Configuration inputs: baseUrl, username, projectName, spaceKey
* Test connection buttons with loading states
* Success/error feedback with color-coded messages
* OAuth2 flow instructions for users
- OAuth2 flow in browser
* Opens auth URL in default browser via shell plugin
* User authenticates with service
* Redirected to localhost:8765/callback
* Callback server handles token exchange automatically
* Success message shown to user
- CSP updates in tauri.conf.json
* Added http://localhost:8765 (callback server)
* Added https://auth.atlassian.com (Confluence OAuth)
* Added https://*.atlassian.net (Confluence API)
* Added https://login.microsoftonline.com (ADO OAuth)
* Added https://dev.azure.com (ADO API)
- UI improvements
* Fixed Cancel button variant (ghost instead of secondary)
* Loading spinners with Loader2 icon
* Check/X icons for success/error states
* Disabled states when not configured
* Optimistic UI updates on connect
Frontend + Backend = COMPLETE END-TO-END OAUTH2 FLOW:
1. User goes to Settings → Integrations
2. Enters base URL and config
3. Clicks 'Connect with OAuth2'
4. Browser opens with service auth page
5. User logs in and authorizes
6. Redirected to localhost:8765/callback
7. Token exchanged and encrypted automatically
8. Stored in SQLite credentials table
9. Ready for API calls to external services ✅
TypeScript: All types checked, no errors
Frontend build: ✅ Built in 2.26s
Total lines: ~400 lines of new UI code
Next: Phase 2.3 - Integration API clients (Confluence REST, ServiceNow REST, ADO REST)
2026-04-03 20:04:12 +00:00
|
|
|
|
|
|
|
|
// ─── OAuth & Integrations ─────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export interface OAuthInitResponse {
|
|
|
|
|
auth_url: string;
|
|
|
|
|
state: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ConnectionResult {
|
|
|
|
|
success: boolean;
|
|
|
|
|
message: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const initiateOauthCmd = (service: string) =>
|
|
|
|
|
invoke<OAuthInitResponse>("initiate_oauth", { service });
|
|
|
|
|
|
|
|
|
|
export const handleOauthCallbackCmd = (service: string, code: string, stateKey: string) =>
|
|
|
|
|
invoke<void>("handle_oauth_callback", { service, code, stateKey });
|
|
|
|
|
|
|
|
|
|
export const testConfluenceConnectionCmd = (baseUrl: string, credentials: Record<string, unknown>) =>
|
|
|
|
|
invoke<ConnectionResult>("test_confluence_connection", { baseUrl, credentials });
|
|
|
|
|
|
|
|
|
|
export const testServiceNowConnectionCmd = (instanceUrl: string, credentials: Record<string, unknown>) =>
|
|
|
|
|
invoke<ConnectionResult>("test_servicenow_connection", { instanceUrl, credentials });
|
|
|
|
|
|
|
|
|
|
export const testAzureDevOpsConnectionCmd = (orgUrl: string, credentials: Record<string, unknown>) =>
|
|
|
|
|
invoke<ConnectionResult>("test_azuredevops_connection", { orgUrl, credentials });
|
2026-04-03 22:26:09 +00:00
|
|
|
|
|
|
|
|
// ─── Webview & Token Authentication ──────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export interface WebviewAuthResponse {
|
|
|
|
|
success: boolean;
|
|
|
|
|
message: string;
|
|
|
|
|
webview_id: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface TokenAuthRequest {
|
|
|
|
|
service: string;
|
|
|
|
|
token: string;
|
|
|
|
|
token_type: string;
|
|
|
|
|
base_url: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-04 14:57:22 +00:00
|
|
|
export interface IntegrationConfig {
|
|
|
|
|
service: string;
|
|
|
|
|
base_url: string;
|
|
|
|
|
username?: string;
|
|
|
|
|
project_name?: string;
|
|
|
|
|
space_key?: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 01:44:51 +00:00
|
|
|
export const authenticateWithWebviewCmd = (service: string, baseUrl: string, projectName?: string) =>
|
|
|
|
|
invoke<WebviewAuthResponse>("authenticate_with_webview", { service, baseUrl, projectName });
|
2026-04-03 22:26:09 +00:00
|
|
|
|
|
|
|
|
export const extractCookiesFromWebviewCmd = (service: string, webviewId: string) =>
|
|
|
|
|
invoke<ConnectionResult>("extract_cookies_from_webview", { service, webviewId });
|
|
|
|
|
|
|
|
|
|
export const saveManualTokenCmd = (request: TokenAuthRequest) =>
|
|
|
|
|
invoke<ConnectionResult>("save_manual_token", { request });
|
2026-04-04 14:57:22 +00:00
|
|
|
|
|
|
|
|
// ─── Integration Configuration Persistence ────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const saveIntegrationConfigCmd = (config: IntegrationConfig) =>
|
|
|
|
|
invoke<void>("save_integration_config", { config });
|
|
|
|
|
|
|
|
|
|
export const getIntegrationConfigCmd = (service: string) =>
|
|
|
|
|
invoke<IntegrationConfig | null>("get_integration_config", { service });
|
|
|
|
|
|
|
|
|
|
export const getAllIntegrationConfigsCmd = () =>
|
|
|
|
|
invoke<IntegrationConfig[]>("get_all_integration_configs");
|
2026-04-09 01:44:51 +00:00
|
|
|
|
|
|
|
|
// ─── AI Provider Configuration ────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const saveAiProviderCmd = (config: ProviderConfig) =>
|
2026-04-09 19:15:01 +00:00
|
|
|
invoke<void>("save_ai_provider", { provider: config });
|
2026-04-09 01:44:51 +00:00
|
|
|
|
|
|
|
|
export const loadAiProvidersCmd = () =>
|
|
|
|
|
invoke<ProviderConfig[]>("load_ai_providers");
|
|
|
|
|
|
|
|
|
|
export const deleteAiProviderCmd = (name: string) =>
|
|
|
|
|
invoke<void>("delete_ai_provider", { name });
|
2026-04-13 21:08:34 +00:00
|
|
|
|
feat(mcp): add MCP Server Support with TDD implementation
Adds full Model Context Protocol (MCP) server management, enabling the
AI assistant to discover and call tools from external MCP servers during
triage conversations.
Backend (Rust):
- rmcp 1.7.0 dependency (client + stdio + Streamable HTTP transports)
- Migration 018: mcp_servers, mcp_tools, mcp_resources tables with
CHECK constraints for transport_type, auth_type, discovery_status
- src/mcp/ module: models, store, client, adapter, discovery, commands,
transport/{stdio,http}
- AppState gains mcp_connections: Arc<TokioMutex<HashMap<...>>>
- .setup() hook auto-discovers enabled servers at startup
- 8 new Tauri commands wired into invoke_handler
- execute_mcp_tool_call: PII scan + mandatory audit_log before execution
- Auth values encrypted at rest via integrations::auth::encrypt_token();
scrubbed before any frontend response
Frontend:
- MCPServers.tsx settings page (/settings/mcp) with server list,
status badges, Discover Now, Add/Edit modal, enable/disable toggle
- tauriCommands.ts: McpServer, McpTool, McpServerStatus types + 8 cmds
- App.tsx: Plug icon, /settings/mcp route, sidebar nav entry
Tests (TDD): 15 new tests, all green
- 5 migration tests (written before migration, red → green)
- 5 store CRUD + encryption tests
- 5 adapter sanitization + conversion tests
Verification: 185/185 Rust, 94/94 Vitest, clippy -D warnings: 0
2026-05-23 21:23:48 +00:00
|
|
|
// ─── MCP Server types ────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export interface McpServer {
|
|
|
|
|
id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
url: string;
|
|
|
|
|
transport_type: "stdio" | "http";
|
|
|
|
|
transport_config: string;
|
|
|
|
|
auth_type: "none" | "api_key" | "bearer" | "oauth2";
|
|
|
|
|
auth_value?: string;
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
last_discovered_at?: string;
|
|
|
|
|
discovery_status: "pending" | "connected" | "unreachable" | "error";
|
|
|
|
|
discovery_error?: string;
|
|
|
|
|
created_at: string;
|
|
|
|
|
updated_at: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface McpTool {
|
|
|
|
|
id: string;
|
|
|
|
|
server_id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
tool_key: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
parameters: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface McpResource {
|
|
|
|
|
id: string;
|
|
|
|
|
server_id: string;
|
|
|
|
|
uri: string;
|
|
|
|
|
name?: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface McpServerStatus {
|
|
|
|
|
server_id: string;
|
|
|
|
|
status: "pending" | "connected" | "unreachable" | "error";
|
|
|
|
|
error?: string;
|
|
|
|
|
tool_count: number;
|
|
|
|
|
resource_count: number;
|
|
|
|
|
last_discovered_at?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface CreateMcpServerRequest {
|
|
|
|
|
name: string;
|
|
|
|
|
url: string;
|
|
|
|
|
transport_type: "stdio" | "http";
|
|
|
|
|
transport_config: string;
|
|
|
|
|
auth_type: "none" | "api_key" | "bearer" | "oauth2";
|
|
|
|
|
auth_value?: string;
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface UpdateMcpServerRequest {
|
|
|
|
|
name?: string;
|
|
|
|
|
url?: string;
|
|
|
|
|
transport_type?: "stdio" | "http";
|
|
|
|
|
transport_config?: string;
|
|
|
|
|
auth_type?: "none" | "api_key" | "bearer" | "oauth2";
|
|
|
|
|
auth_value?: string;
|
|
|
|
|
enabled?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ─── MCP Commands ─────────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export function listMcpServersCmd(): Promise<McpServer[]> {
|
|
|
|
|
return invoke<McpServer[]>("list_mcp_servers");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function createMcpServerCmd(request: CreateMcpServerRequest): Promise<McpServer> {
|
|
|
|
|
return invoke<McpServer>("create_mcp_server", { request });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function updateMcpServerCmd(id: string, request: UpdateMcpServerRequest): Promise<McpServer> {
|
|
|
|
|
return invoke<McpServer>("update_mcp_server", { id, request });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function deleteMcpServerCmd(id: string): Promise<void> {
|
|
|
|
|
return invoke<void>("delete_mcp_server", { id });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function toggleMcpServerCmd(id: string, enabled: boolean): Promise<void> {
|
|
|
|
|
return invoke<void>("toggle_mcp_server", { id, enabled });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function discoverMcpServerCmd(id: string): Promise<McpServerStatus> {
|
|
|
|
|
return invoke<McpServerStatus>("discover_mcp_server", { id });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getMcpServerStatusCmd(id: string): Promise<McpServerStatus> {
|
|
|
|
|
return invoke<McpServerStatus>("get_mcp_server_status", { id });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function initiateMcpOauthCmd(id: string): Promise<void> {
|
|
|
|
|
return invoke<void>("initiate_mcp_oauth", { id });
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-31 18:51:08 +00:00
|
|
|
// ─── Sudo credential commands ─────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export interface SudoConfigStatus {
|
|
|
|
|
configured: boolean;
|
|
|
|
|
username: string;
|
|
|
|
|
updated_at: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const setSudoPasswordCmd = (password: string, username?: string) =>
|
|
|
|
|
invoke<void>("set_sudo_password", { password, username: username ?? null });
|
|
|
|
|
|
|
|
|
|
export const getSudoConfigStatusCmd = () =>
|
|
|
|
|
invoke<SudoConfigStatus>("get_sudo_config_status");
|
|
|
|
|
|
|
|
|
|
export const testSudoPasswordCmd = () =>
|
|
|
|
|
invoke<boolean>("test_sudo_password");
|
|
|
|
|
|
|
|
|
|
export const clearSudoPasswordCmd = () =>
|
|
|
|
|
invoke<void>("clear_sudo_password");
|
|
|
|
|
|
2026-04-13 21:08:34 +00:00
|
|
|
// ─── System / Version ─────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const getAppVersionCmd = () =>
|
|
|
|
|
invoke<string>("get_app_version");
|
feat: attachment DB storage and cross-incident recall
Store compressed log content and raw image bytes in SQLite so attachments
are self-contained regardless of source file availability on disk.
DB (migrations 020-022):
- log_files.content_compressed BLOB — gzip-compressed extracted text
- image_attachments.image_data BLOB — raw image bytes
- Views v_log_files_with_issue and v_image_attachments_with_issue for
cross-incident queries with joined issue title
Rust backend:
- compress_text / decompress_text helpers (flate2 rust_backend / miniz_oxide)
with 100 MB decompression-bomb guard
- upload_log_file*, upload_log_file_by_content store content_compressed
- upload_image_attachment*, upload_paste_image store image_data
- New commands: get_log_file_content, list_all_log_files (analysis.rs)
- New commands: get_image_attachment_data, list_all_image_attachments (image.rs)
- All commands fall back to file_path for pre-migration records
Frontend:
- LogFileSummary, ImageAttachmentSummary types in tauriCommands.ts
- attachmentStore (Zustand) — loadAttachments, searchAttachments
- History page: Issues tab (existing) + Attachments tab (new)
with log/image tables, search bar, View modals, lazy thumbnails
Tests: 227 Rust (+16 new), 103 frontend (+9 new), tsc clean, clippy clean
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 22:55:47 +00:00
|
|
|
|
|
|
|
|
// ─── Attachment cross-incident types ─────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export interface LogFileSummary {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
issue_title: string;
|
|
|
|
|
file_name: string;
|
|
|
|
|
file_path: string;
|
|
|
|
|
file_size: number;
|
|
|
|
|
mime_type: string;
|
|
|
|
|
content_hash: string;
|
|
|
|
|
uploaded_at: string;
|
|
|
|
|
redacted: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ImageAttachmentSummary {
|
|
|
|
|
id: string;
|
|
|
|
|
issue_id: string;
|
|
|
|
|
issue_title: string;
|
|
|
|
|
file_name: string;
|
|
|
|
|
file_path: string;
|
|
|
|
|
file_size: number;
|
|
|
|
|
mime_type: string;
|
|
|
|
|
upload_hash: string;
|
|
|
|
|
uploaded_at: string;
|
|
|
|
|
pii_warning_acknowledged: boolean;
|
|
|
|
|
is_paste: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ─── Attachment cross-incident commands ───────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
export const getLogFileContentCmd = (logFileId: string) =>
|
|
|
|
|
invoke<string>("get_log_file_content", { logFileId });
|
|
|
|
|
|
|
|
|
|
export const listAllLogFilesCmd = (search?: string, issueId?: string) =>
|
|
|
|
|
invoke<LogFileSummary[]>("list_all_log_files", {
|
|
|
|
|
search: search ?? null,
|
|
|
|
|
issueId: issueId ?? null,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const getImageAttachmentDataCmd = (attachmentId: string) =>
|
|
|
|
|
invoke<string>("get_image_attachment_data", { attachmentId });
|
|
|
|
|
|
|
|
|
|
export const listAllImageAttachmentsCmd = (search?: string, issueId?: string) =>
|
|
|
|
|
invoke<ImageAttachmentSummary[]>("list_all_image_attachments", {
|
|
|
|
|
search: search ?? null,
|
|
|
|
|
issueId: issueId ?? null,
|
|
|
|
|
});
|