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>
80 lines
3.9 KiB
TypeScript
80 lines
3.9 KiB
TypeScript
import type { EventEmitter } from 'node:events';
|
|
import type { CommandEndpoint } from '@wdio/protocols';
|
|
import type { Options } from '@wdio/types';
|
|
import type { Client, JSONWPCommandError, SessionFlags, RemoteConfig, CommandRuntimeOptions } from './types.js';
|
|
/**
|
|
* start browser session with WebDriver protocol
|
|
*/
|
|
export declare function startWebDriverSession(params: RemoteConfig): Promise<{
|
|
sessionId: string;
|
|
capabilities: WebdriverIO.Capabilities;
|
|
}>;
|
|
/**
|
|
* Validates the given WebdriverIO capabilities.
|
|
*
|
|
* @param {WebdriverIO.Capabilities} capabilities - The capabilities to validate.
|
|
* @throws {Error} If the capabilities contain incognito mode.
|
|
*/
|
|
export declare function validateCapabilities(capabilities: WebdriverIO.Capabilities): void;
|
|
/**
|
|
* check if WebDriver requests was successful
|
|
* @param {number} statusCode status code of request
|
|
* @param {Object} body body payload of response
|
|
* @return {Boolean} true if request was successful
|
|
*/
|
|
export declare function isSuccessfulResponse(statusCode?: number, body?: unknown): boolean;
|
|
/**
|
|
* creates the base prototype for the webdriver monad
|
|
*/
|
|
export declare function getPrototype({ isW3C, isChromium, isFirefox, isMobile, isSauce, isSeleniumStandalone }: Partial<SessionFlags>): Record<string, PropertyDescriptor>;
|
|
/**
|
|
* return all supported flags and return them in a format so we can attach them
|
|
* to the instance protocol
|
|
* @param {Object} options driver instance or option object containing these flags
|
|
* @return {Object} prototype object
|
|
*/
|
|
export declare function getEnvironmentVars({ isW3C, isMobile, isIOS, isAndroid, isFirefox, isSauce, isSeleniumStandalone, isChromium, isWindowsApp, isMacApp }: Partial<SessionFlags>): PropertyDescriptorMap;
|
|
/**
|
|
* Decorate the client's options object with host updates based on the presence of
|
|
* directConnect capabilities in the new session response. Note that this
|
|
* mutates the object.
|
|
* @param {Client} params post-new-session client
|
|
*/
|
|
export declare function setupDirectConnect(client: Client): void;
|
|
/**
|
|
* get human-readable message from response error
|
|
* @param {Error} err response error
|
|
* @param params
|
|
*/
|
|
export declare const getSessionError: (err: JSONWPCommandError, params?: Partial<Options.WebDriver>) => string;
|
|
/**
|
|
* Enhance the monad with WebDriver Bidi primitives if a connection can be established successfully
|
|
* @param socketUrl url to bidi interface
|
|
* @param strictSSL
|
|
* @param userHeaders
|
|
* @returns prototype with interface for bidi primitives
|
|
*/
|
|
export declare function initiateBidi(socketUrl: string, strictSSL?: boolean, userHeaders?: Record<string, string>): PropertyDescriptorMap;
|
|
export declare function parseBidiMessage(this: EventEmitter, data: ArrayBuffer): void;
|
|
/**
|
|
* Masks the `text` parameter in a WebDriver command if masking is enabled in the options.
|
|
*
|
|
* - If `options.mask` is not set or the command does not have a `text` parameter, returns the original body and args.
|
|
* - If masking is enabled and a `text` parameter is present and non-empty, replaces its value with the mask in both the body and args.
|
|
*
|
|
* @param {CommandEndpoint} commandInfo - The command endpoint metadata, including parameters and variables.
|
|
* @param {CommandRuntimeOptions} options - Runtime options for the command, including the `mask` flag.
|
|
* @param {Record<string, unknown>} body - The request body object to potentially mask.
|
|
* @param {unknown[]} args - The arguments array to potentially mask.
|
|
* @returns {{
|
|
* maskedBody: Record<string, unknown>,
|
|
* maskedArgs: unknown[],
|
|
* isMasked: boolean
|
|
* }} An object containing the (possibly) masked body and args, and a flag indicating if masking was applied.
|
|
*/
|
|
export declare function mask(commandInfo: CommandEndpoint, options: CommandRuntimeOptions, body: Record<string, unknown>, args: unknown[]): {
|
|
maskedBody: Record<string, unknown>;
|
|
maskedArgs: unknown[];
|
|
isMasked: boolean;
|
|
};
|
|
//# sourceMappingURL=utils.d.ts.map
|