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>
42 lines
2.1 KiB
JavaScript
42 lines
2.1 KiB
JavaScript
"use strict";
|
|
// tslint:disable-next-line: no-reference
|
|
/// <reference path="./userhome.d.ts" />
|
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
});
|
|
};
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.locateAppOnMacOs = void 0;
|
|
const child_process_1 = require("child_process");
|
|
const userhome_1 = __importDefault(require("userhome"));
|
|
const util_1 = require("util");
|
|
const isExecutable_1 = require("../utils/isExecutable");
|
|
const exec = (0, util_1.promisify)(child_process_1.exec);
|
|
function locateAppOnMacOs({ appName, macOsName, }) {
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
const toExec = `/Contents/MacOS/${macOsName}`;
|
|
const regPath = `/Applications/${macOsName}.app` + toExec;
|
|
const altPath = (0, userhome_1.default)(regPath.slice(1));
|
|
if (yield (0, isExecutable_1.isExecutable)(regPath)) {
|
|
return regPath;
|
|
}
|
|
else if (yield (0, isExecutable_1.isExecutable)(altPath)) {
|
|
return altPath;
|
|
}
|
|
const { stderr, stdout } = yield exec(`mdfind \'kMDItemDisplayName == "${macOsName}" && kMDItemKind == Application\'`);
|
|
if (!stderr && stdout) {
|
|
return stdout.trim() + toExec;
|
|
}
|
|
throw new Error(`Can not locate app ${appName} on macOS.\n ${stderr}`);
|
|
});
|
|
}
|
|
exports.locateAppOnMacOs = locateAppOnMacOs;
|
|
//# sourceMappingURL=locateAppOnMacOs.js.map
|