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>
195 lines
5.9 KiB
TypeScript
195 lines
5.9 KiB
TypeScript
import type { ProtocolCommandResponse } from '../types.js';
|
|
export default interface SaucelabsCommands {
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Get webpage specific log information based on the last page load.
|
|
* @ref https://docs.saucelabs.com/insights/debug/#network-logs
|
|
*
|
|
* @example
|
|
* ```js
|
|
* // Get Network Logs
|
|
* console.log(browser.getPageLogs('sauce:network'));
|
|
* //
|
|
* // outputs:
|
|
* // [{
|
|
* // "url": "https://app.saucelabs.com/dashboard",
|
|
* // "statusCode": 200,
|
|
* // "method": "GET",
|
|
* // "requestHeaders": {
|
|
* // ...
|
|
* // },
|
|
* // "responseHeaders": {
|
|
* // ...
|
|
* // },
|
|
* // "timing": {
|
|
* // ...
|
|
* // }
|
|
* // }, {,
|
|
* // ...
|
|
* // }]
|
|
* //
|
|
* ```*
|
|
* @example
|
|
* ```js
|
|
* // Get Performance Logs (needs capturePerformance capability see: https://docs.saucelabs.com/performance/transitions/#setting-performance-capabilities
|
|
* console.log(browser.getPageLogs('sauce:performance'));
|
|
* //
|
|
* // outputs:
|
|
* // {
|
|
* // "speedIndex": 1472.023,
|
|
* // "timeToFirstInteractive": 1243.214,
|
|
* // "firstMeaningfulPaint": 892.643,
|
|
* // ...
|
|
* // }
|
|
* //
|
|
* ```
|
|
*/
|
|
getPageLogs(type: string): Promise<ProtocolCommandResponse>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* With network conditioning you can test your site on a variety of network connections, including Edge, 3G, and even offline. You can throttle the data throughput, including the maximum download and upload throughput, and use latency manipulation to enforce a minimum delay in connection round-trip time (RTT).
|
|
* @ref https://docs.saucelabs.com/insights/debug/#saucethrottlenetwork
|
|
*
|
|
* @example
|
|
* ```js
|
|
* // predefined network condition
|
|
* browser.sauceThrottleNetwork('offline')
|
|
* ```*
|
|
* @example
|
|
* ```js
|
|
* // custom network condition
|
|
* browser.sauceThrottleNetwork({
|
|
* download: 1000,
|
|
* upload: 500,
|
|
* latency: 40'
|
|
* })
|
|
* ```
|
|
*/
|
|
sauceThrottleNetwork(condition: (string | object)): Promise<void>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* You can throttle the CPU in DevTools to understand how your page performs under that constraint.
|
|
* @ref https://docs.saucelabs.com/insights/debug/#saucethrottlecpu
|
|
*
|
|
* @example
|
|
* ```js
|
|
* // throttle CPU and make it run 4x slower
|
|
* browser.throttleCPU(4)
|
|
* ```*
|
|
* @example
|
|
* ```js
|
|
* // reset CPU throttling
|
|
* browser.throttleCPU(0)
|
|
* ```
|
|
*/
|
|
throttleCPU(rate: number): Promise<void>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Allows modifying any request made by the browser. You can blacklist, modify, or redirect these as required for your tests.
|
|
* @ref https://docs.saucelabs.com/insights/debug/#intercept-network-requests
|
|
*
|
|
* @example
|
|
* ```js
|
|
* // redirect a request
|
|
* browser.interceptRequest({
|
|
* url: 'https://saucelabs.com',
|
|
* redirect: 'https://google.com'
|
|
* })
|
|
* ```*
|
|
* @example
|
|
* ```js
|
|
* // Blacklist requests to 3rd party vendors
|
|
* browser.interceptRequest({
|
|
* url: 'https://api.segment.io/v1/p',
|
|
* error: 'Failed'
|
|
* })
|
|
* ```*
|
|
* @example
|
|
* ```js
|
|
* // Modify requests to REST API (Mock REST API response)
|
|
* browser.interceptRequest({
|
|
* url: 'http://sampleapp.appspot.com/api/todos',
|
|
* response: {
|
|
* headers: {
|
|
* 'x-custom-headers': 'foobar'
|
|
* },
|
|
* body: [{
|
|
* title: 'My custom todo',
|
|
* order: 1,
|
|
* completed: false,
|
|
* url: 'http://todo-backend-express.herokuapp.com/15727'
|
|
* }]
|
|
* }
|
|
* })
|
|
* ```
|
|
*/
|
|
interceptRequest(rule: object): Promise<void>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Assert against the performance baseline of your app.
|
|
* @ref https://docs.saucelabs.com/performance/transitions/#setting-performance-capabilities
|
|
*
|
|
* @example
|
|
* ```js
|
|
* // test performance for a page
|
|
* browser.url('https://webdriver.io')
|
|
* const hasRegression = browser.assertPerformance({
|
|
* name: 'my performance test', // make sure that the name is also set in the sauce options in your capabilities
|
|
* metrics: ['score', 'firstPaint']
|
|
* })
|
|
* ```
|
|
*/
|
|
assertPerformance(name: string, metrics?: string[]): Promise<ProtocolCommandResponse>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Perform a scroll test that evaluates the jankiness of the application.
|
|
* @ref https://docs.saucelabs.com/performance/motion/#implementing-the-jankiness-custom-command
|
|
*
|
|
* @example
|
|
* ```js
|
|
* // test performance for a page
|
|
* browser.url('https://webdriver.io')
|
|
* browser.jankinessCheck()
|
|
* ```
|
|
*/
|
|
jankinessCheck(): Promise<ProtocolCommandResponse>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Mocks a network resource.
|
|
* @ref https://docs.saucelabs.com/
|
|
*
|
|
*/
|
|
mockRequest(url: string, filterOptions?: object): Promise<ProtocolCommandResponse>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Receive request information about requests that match the mocked resource.
|
|
* @ref https://docs.saucelabs.com/
|
|
*
|
|
*/
|
|
getMockCalls(mockId: string): Promise<ProtocolCommandResponse>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Clear list of mock calls.
|
|
* @ref https://docs.saucelabs.com/
|
|
*
|
|
*/
|
|
clearMockCalls(mockId: string, restore?: boolean): Promise<void>;
|
|
/**
|
|
* Saucelabs Protocol Command
|
|
*
|
|
* Respond if mock matches a specific resource.
|
|
* @ref https://docs.saucelabs.com/
|
|
*
|
|
*/
|
|
respondMock(mockId: string, payload?: object): Promise<void>;
|
|
}
|
|
//# sourceMappingURL=saucelabs.d.ts.map
|