opensafari-mcp 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +341 -0
- package/dist/115.index.js +2 -0
- package/dist/115.index.js.map +1 -0
- package/dist/67.index.js +2 -0
- package/dist/67.index.js.map +1 -0
- package/dist/679.index.js +2 -0
- package/dist/679.index.js.map +1 -0
- package/dist/681.index.js +2 -0
- package/dist/681.index.js.map +1 -0
- package/dist/838.index.js +2 -0
- package/dist/838.index.js.map +1 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/manager.d.ts +33 -0
- package/dist/auth/manager.d.ts.map +1 -0
- package/dist/cli/148.index.js +3 -0
- package/dist/cli/148.index.js.map +1 -0
- package/dist/cli/473.index.js +3 -0
- package/dist/cli/473.index.js.map +1 -0
- package/dist/cli/622.index.js +3 -0
- package/dist/cli/622.index.js.map +1 -0
- package/dist/cli/712.index.js +3 -0
- package/dist/cli/712.index.js.map +1 -0
- package/dist/cli/844.index.js +3 -0
- package/dist/cli/844.index.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/comparison/cross-viewport.d.ts +36 -0
- package/dist/comparison/cross-viewport.d.ts.map +1 -0
- package/dist/comparison/index.d.ts +4 -0
- package/dist/comparison/index.d.ts.map +1 -0
- package/dist/comparison/report.d.ts +10 -0
- package/dist/comparison/report.d.ts.map +1 -0
- package/dist/config/defaults.d.ts +33 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/global.d.ts +25 -0
- package/dist/config/global.d.ts.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/tool-tiers.d.ts +7 -0
- package/dist/config/tool-tiers.d.ts.map +1 -0
- package/dist/errors/codes.d.ts +20 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/timeout.d.ts +20 -0
- package/dist/errors/timeout.d.ts.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server.d.ts +41 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/metrics/collector.d.ts +43 -0
- package/dist/metrics/collector.d.ts.map +1 -0
- package/dist/orchestration/index.d.ts +3 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/workflow-engine.d.ts +90 -0
- package/dist/orchestration/workflow-engine.d.ts.map +1 -0
- package/dist/qa/audit.d.ts +42 -0
- package/dist/qa/audit.d.ts.map +1 -0
- package/dist/qa/detectors/auto-zoom.d.ts +4 -0
- package/dist/qa/detectors/auto-zoom.d.ts.map +1 -0
- package/dist/qa/detectors/dark-mode.d.ts +5 -0
- package/dist/qa/detectors/dark-mode.d.ts.map +1 -0
- package/dist/qa/detectors/fixed-stacking.d.ts +4 -0
- package/dist/qa/detectors/fixed-stacking.d.ts.map +1 -0
- package/dist/qa/detectors/horizontal-overflow.d.ts +4 -0
- package/dist/qa/detectors/horizontal-overflow.d.ts.map +1 -0
- package/dist/qa/detectors/hover-only.d.ts +4 -0
- package/dist/qa/detectors/hover-only.d.ts.map +1 -0
- package/dist/qa/detectors/index.d.ts +14 -0
- package/dist/qa/detectors/index.d.ts.map +1 -0
- package/dist/qa/detectors/input-type.d.ts +4 -0
- package/dist/qa/detectors/input-type.d.ts.map +1 -0
- package/dist/qa/detectors/keyboard-overlap.d.ts +4 -0
- package/dist/qa/detectors/keyboard-overlap.d.ts.map +1 -0
- package/dist/qa/detectors/orientation.d.ts +5 -0
- package/dist/qa/detectors/orientation.d.ts.map +1 -0
- package/dist/qa/detectors/pwa-meta.d.ts +4 -0
- package/dist/qa/detectors/pwa-meta.d.ts.map +1 -0
- package/dist/qa/detectors/safe-area.d.ts +4 -0
- package/dist/qa/detectors/safe-area.d.ts.map +1 -0
- package/dist/qa/detectors/scroll-lock.d.ts +4 -0
- package/dist/qa/detectors/scroll-lock.d.ts.map +1 -0
- package/dist/qa/detectors/touch-targets.d.ts +4 -0
- package/dist/qa/detectors/touch-targets.d.ts.map +1 -0
- package/dist/qa/detectors/vh100.d.ts +4 -0
- package/dist/qa/detectors/vh100.d.ts.map +1 -0
- package/dist/qa/history.d.ts +44 -0
- package/dist/qa/history.d.ts.map +1 -0
- package/dist/qa/index.d.ts +8 -0
- package/dist/qa/index.d.ts.map +1 -0
- package/dist/qa/report-markdown.d.ts +3 -0
- package/dist/qa/report-markdown.d.ts.map +1 -0
- package/dist/qa/types.d.ts +29 -0
- package/dist/qa/types.d.ts.map +1 -0
- package/dist/reliability/crash-watcher.d.ts +16 -0
- package/dist/reliability/crash-watcher.d.ts.map +1 -0
- package/dist/reliability/graceful-shutdown.d.ts +3 -0
- package/dist/reliability/graceful-shutdown.d.ts.map +1 -0
- package/dist/reliability/index.d.ts +4 -0
- package/dist/reliability/index.d.ts.map +1 -0
- package/dist/reliability/zombie-cleanup.d.ts +53 -0
- package/dist/reliability/zombie-cleanup.d.ts.map +1 -0
- package/dist/security/audit-logger.d.ts +2 -0
- package/dist/security/audit-logger.d.ts.map +1 -0
- package/dist/security/content-sanitizer.d.ts +32 -0
- package/dist/security/content-sanitizer.d.ts.map +1 -0
- package/dist/security/domain-guard.d.ts +16 -0
- package/dist/security/domain-guard.d.ts.map +1 -0
- package/dist/session-manager.d.ts +54 -0
- package/dist/session-manager.d.ts.map +1 -0
- package/dist/simulator/batch.d.ts +22 -0
- package/dist/simulator/batch.d.ts.map +1 -0
- package/dist/simulator/index.d.ts +15 -0
- package/dist/simulator/index.d.ts.map +1 -0
- package/dist/simulator/manager.d.ts +66 -0
- package/dist/simulator/manager.d.ts.map +1 -0
- package/dist/simulator/pool.d.ts +52 -0
- package/dist/simulator/pool.d.ts.map +1 -0
- package/dist/simulator/presets.d.ts +4 -0
- package/dist/simulator/presets.d.ts.map +1 -0
- package/dist/simulator/proxy.d.ts +78 -0
- package/dist/simulator/proxy.d.ts.map +1 -0
- package/dist/simulator/simctl.d.ts +12 -0
- package/dist/simulator/simctl.d.ts.map +1 -0
- package/dist/simulator/socket-finder.d.ts +22 -0
- package/dist/simulator/socket-finder.d.ts.map +1 -0
- package/dist/simulator/types.d.ts +21 -0
- package/dist/simulator/types.d.ts.map +1 -0
- package/dist/simulator/xcode-check.d.ts +15 -0
- package/dist/simulator/xcode-check.d.ts.map +1 -0
- package/dist/tools/appearance-toggle.d.ts +3 -0
- package/dist/tools/appearance-toggle.d.ts.map +1 -0
- package/dist/tools/auth.d.ts +3 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/batch-execute.d.ts +5 -0
- package/dist/tools/batch-execute.d.ts.map +1 -0
- package/dist/tools/batch-navigate.d.ts +5 -0
- package/dist/tools/batch-navigate.d.ts.map +1 -0
- package/dist/tools/batch-screenshot.d.ts +5 -0
- package/dist/tools/batch-screenshot.d.ts.map +1 -0
- package/dist/tools/click.d.ts +3 -0
- package/dist/tools/click.d.ts.map +1 -0
- package/dist/tools/cookies.d.ts +3 -0
- package/dist/tools/cookies.d.ts.map +1 -0
- package/dist/tools/cross-viewport-compare.d.ts +4 -0
- package/dist/tools/cross-viewport-compare.d.ts.map +1 -0
- package/dist/tools/device-boot.d.ts +3 -0
- package/dist/tools/device-boot.d.ts.map +1 -0
- package/dist/tools/device-list.d.ts +3 -0
- package/dist/tools/device-list.d.ts.map +1 -0
- package/dist/tools/device-rotate.d.ts +3 -0
- package/dist/tools/device-rotate.d.ts.map +1 -0
- package/dist/tools/device-shutdown.d.ts +3 -0
- package/dist/tools/device-shutdown.d.ts.map +1 -0
- package/dist/tools/dismiss-keyboard.d.ts +3 -0
- package/dist/tools/dismiss-keyboard.d.ts.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/inspect.d.ts +3 -0
- package/dist/tools/inspect.d.ts.map +1 -0
- package/dist/tools/javascript.d.ts +3 -0
- package/dist/tools/javascript.d.ts.map +1 -0
- package/dist/tools/long-press.d.ts +3 -0
- package/dist/tools/long-press.d.ts.map +1 -0
- package/dist/tools/navigate.d.ts +3 -0
- package/dist/tools/navigate.d.ts.map +1 -0
- package/dist/tools/orchestration-tools.d.ts +5 -0
- package/dist/tools/orchestration-tools.d.ts.map +1 -0
- package/dist/tools/press.d.ts +3 -0
- package/dist/tools/press.d.ts.map +1 -0
- package/dist/tools/qa-audit.d.ts +3 -0
- package/dist/tools/qa-audit.d.ts.map +1 -0
- package/dist/tools/qa-detectors.d.ts +3 -0
- package/dist/tools/qa-detectors.d.ts.map +1 -0
- package/dist/tools/query-dom.d.ts +3 -0
- package/dist/tools/query-dom.d.ts.map +1 -0
- package/dist/tools/read-page.d.ts +3 -0
- package/dist/tools/read-page.d.ts.map +1 -0
- package/dist/tools/screenshot.d.ts +3 -0
- package/dist/tools/screenshot.d.ts.map +1 -0
- package/dist/tools/scroll.d.ts +3 -0
- package/dist/tools/scroll.d.ts.map +1 -0
- package/dist/tools/select-option.d.ts +3 -0
- package/dist/tools/select-option.d.ts.map +1 -0
- package/dist/tools/swipe.d.ts +3 -0
- package/dist/tools/swipe.d.ts.map +1 -0
- package/dist/tools/type.d.ts +3 -0
- package/dist/tools/type.d.ts.map +1 -0
- package/dist/tools/wait-for.d.ts +3 -0
- package/dist/tools/wait-for.d.ts.map +1 -0
- package/dist/transports/http.d.ts +57 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/index.d.ts +38 -0
- package/dist/transports/index.d.ts.map +1 -0
- package/dist/transports/stdio.d.ts +16 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/types/browser-backend.d.ts +84 -0
- package/dist/types/browser-backend.d.ts.map +1 -0
- package/dist/types/mcp.d.ts +63 -0
- package/dist/types/mcp.d.ts.map +1 -0
- package/dist/types/tool-manifest.d.ts +52 -0
- package/dist/types/tool-manifest.d.ts.map +1 -0
- package/dist/utils/format-age.d.ts +5 -0
- package/dist/utils/format-age.d.ts.map +1 -0
- package/dist/utils/format-error.d.ts +5 -0
- package/dist/utils/format-error.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +10 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/rate-limiter.d.ts +72 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -0
- package/dist/utils/request-queue.d.ts +37 -0
- package/dist/utils/request-queue.d.ts.map +1 -0
- package/dist/utils/schema-validator.d.ts +12 -0
- package/dist/utils/schema-validator.d.ts.map +1 -0
- package/dist/utils/url-utils.d.ts +5 -0
- package/dist/utils/url-utils.d.ts.map +1 -0
- package/dist/utils/with-timeout.d.ts +5 -0
- package/dist/utils/with-timeout.d.ts.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/watchdog/event-loop-monitor.d.ts +86 -0
- package/dist/watchdog/event-loop-monitor.d.ts.map +1 -0
- package/dist/watchdog/simulator-monitor.d.ts +16 -0
- package/dist/watchdog/simulator-monitor.d.ts.map +1 -0
- package/dist/webkit/client.d.ts +106 -0
- package/dist/webkit/client.d.ts.map +1 -0
- package/dist/webkit/index.d.ts +3 -0
- package/dist/webkit/index.d.ts.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenSafari MCP Server
|
|
3
|
+
* Handles JSON-RPC 2.0 protocol, tool registration, and progressive disclosure.
|
|
4
|
+
* Safari-specific tools are registered externally via registerTool().
|
|
5
|
+
*
|
|
6
|
+
* Chrome/CDP references have been removed. Safari/WebKit/Simulator placeholders
|
|
7
|
+
* are in place; actual implementations land in Epic 1B/1C.
|
|
8
|
+
*/
|
|
9
|
+
import { MCPToolDefinition, ToolHandler } from './types/mcp';
|
|
10
|
+
import { TransportMode } from './transports';
|
|
11
|
+
import { TOOL_TIERS, getToolTier } from './config/tool-tiers';
|
|
12
|
+
import { BrowserBackend } from './types/browser-backend';
|
|
13
|
+
export type { MCPToolDefinition as ToolDefinition, ToolHandler };
|
|
14
|
+
export { TOOL_TIERS, getToolTier };
|
|
15
|
+
export declare function getWebKitClient(): BrowserBackend | null;
|
|
16
|
+
export declare function setWebKitClient(client: BrowserBackend | null): void;
|
|
17
|
+
export interface MCPServerOptions {
|
|
18
|
+
/** Wire transport to use. Defaults to 'stdio'. */
|
|
19
|
+
transport?: TransportMode;
|
|
20
|
+
/** HTTP port — only relevant when transport === 'http'. */
|
|
21
|
+
port?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare class MCPServer {
|
|
24
|
+
private tools;
|
|
25
|
+
private transport;
|
|
26
|
+
private currentTier;
|
|
27
|
+
private auditLogEnabled;
|
|
28
|
+
registerTool(definition: MCPToolDefinition, handler: ToolHandler): void;
|
|
29
|
+
getToolHandler(name: string): ToolHandler | undefined;
|
|
30
|
+
getRegisteredTools(): string[];
|
|
31
|
+
start(options?: MCPServerOptions): Promise<void>;
|
|
32
|
+
stop(): Promise<void>;
|
|
33
|
+
setTier(tier: number): void;
|
|
34
|
+
getTier(): number;
|
|
35
|
+
enableAuditLog(): void;
|
|
36
|
+
private handleMessage;
|
|
37
|
+
private handleInitialize;
|
|
38
|
+
private handleToolsList;
|
|
39
|
+
private handleToolsCall;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=mcp-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIL,iBAAiB,EACjB,WAAW,EAEZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAiC,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD,YAAY,EAAE,iBAAiB,IAAI,cAAc,EAAE,WAAW,EAAE,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;AAUnC,wBAAgB,eAAe,IAAI,cAAc,GAAG,IAAI,CAEvD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAEnE;AAgBD,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,KAAK,CAA0C;IACvD,OAAO,CAAC,SAAS,CAA6B;IAC9C,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,eAAe,CAAS;IAMhC,YAAY,CAAC,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI;IAKvE,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIrD,kBAAkB,IAAI,MAAM,EAAE;IAQxB,KAAK,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUpD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI3B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,IAAI;YAQR,aAAa;IAsD3B,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,eAAe;YAYT,eAAe;CA6D9B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight Prometheus metrics collector.
|
|
3
|
+
* Hand-rolled text format — no prom-client dependency.
|
|
4
|
+
* Supports counters, gauges, and histograms with labels.
|
|
5
|
+
*/
|
|
6
|
+
export type MetricType = 'counter' | 'gauge' | 'histogram';
|
|
7
|
+
export declare class MetricsCollector {
|
|
8
|
+
private counters;
|
|
9
|
+
private gauges;
|
|
10
|
+
private histograms;
|
|
11
|
+
private meta;
|
|
12
|
+
private histogramBuckets;
|
|
13
|
+
/**
|
|
14
|
+
* Register a counter metric.
|
|
15
|
+
*/
|
|
16
|
+
registerCounter(name: string, help: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Register a gauge metric.
|
|
19
|
+
*/
|
|
20
|
+
registerGauge(name: string, help: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Register a histogram metric.
|
|
23
|
+
*/
|
|
24
|
+
registerHistogram(name: string, help: string, buckets?: number[]): void;
|
|
25
|
+
/**
|
|
26
|
+
* Increment a counter by 1 (or by a custom amount).
|
|
27
|
+
*/
|
|
28
|
+
inc(name: string, labels?: Record<string, string>, amount?: number): void;
|
|
29
|
+
/**
|
|
30
|
+
* Set a gauge to a specific value.
|
|
31
|
+
*/
|
|
32
|
+
set(name: string, labels: Record<string, string>, value: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* Observe a value in a histogram.
|
|
35
|
+
*/
|
|
36
|
+
observe(name: string, labels: Record<string, string>, value: number): void;
|
|
37
|
+
/**
|
|
38
|
+
* Export all metrics in Prometheus text exposition format.
|
|
39
|
+
*/
|
|
40
|
+
export(): string;
|
|
41
|
+
}
|
|
42
|
+
export declare function getMetricsCollector(): MetricsCollector;
|
|
43
|
+
//# sourceMappingURL=collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/metrics/collector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;AAsB3D,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAA0C;IAC1D,OAAO,CAAC,MAAM,CAA0C;IACxD,OAAO,CAAC,UAAU,CAA2C;IAC7D,OAAO,CAAC,IAAI,CAAsC;IAClD,OAAO,CAAC,gBAAgB,CAAoC;IAE5D;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKjD;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAK/C;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI;IAMvE;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAAE,MAAM,SAAI,GAAG,IAAI;IAWxE;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAWtE;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAyB1E;;OAEG;IACH,MAAM,IAAI,MAAM;CAiDjB;AAuBD,wBAAgB,mBAAmB,IAAI,gBAAgB,CAetD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,cAAc,EACd,eAAe,GAChB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { SimulatorPool } from '../simulator/pool';
|
|
3
|
+
import { AuthManager } from '../auth/manager';
|
|
4
|
+
export interface WorkflowInitOptions {
|
|
5
|
+
devices: string[];
|
|
6
|
+
url?: string;
|
|
7
|
+
authProfile?: string;
|
|
8
|
+
taskDescription?: string;
|
|
9
|
+
workerNames?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface WorkflowInitResult {
|
|
12
|
+
workflowId: string;
|
|
13
|
+
workers: Array<{
|
|
14
|
+
name: string;
|
|
15
|
+
device: string;
|
|
16
|
+
}>;
|
|
17
|
+
prompts: Array<{
|
|
18
|
+
workerName: string;
|
|
19
|
+
prompt: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
export interface WorkerEntry {
|
|
23
|
+
name: string;
|
|
24
|
+
deviceId: string;
|
|
25
|
+
preset: string;
|
|
26
|
+
status: 'pending' | 'active' | 'completed' | 'failed';
|
|
27
|
+
startedAt: number;
|
|
28
|
+
completedAt?: number;
|
|
29
|
+
results?: unknown;
|
|
30
|
+
error?: string;
|
|
31
|
+
lastUpdate?: string;
|
|
32
|
+
lastUpdateAt?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface WorkflowState {
|
|
35
|
+
id: string;
|
|
36
|
+
status: 'running' | 'completed' | 'partial' | 'failed';
|
|
37
|
+
workers: WorkerEntry[];
|
|
38
|
+
startedAt: number;
|
|
39
|
+
completedAt?: number;
|
|
40
|
+
options: WorkflowInitOptions;
|
|
41
|
+
}
|
|
42
|
+
export interface WorkflowStatus {
|
|
43
|
+
id: string;
|
|
44
|
+
status: string;
|
|
45
|
+
workers: Array<{
|
|
46
|
+
name: string;
|
|
47
|
+
device: string;
|
|
48
|
+
status: string;
|
|
49
|
+
lastUpdate?: string;
|
|
50
|
+
lastUpdateAt?: number;
|
|
51
|
+
}>;
|
|
52
|
+
completedCount: number;
|
|
53
|
+
totalCount: number;
|
|
54
|
+
elapsed: number;
|
|
55
|
+
}
|
|
56
|
+
export interface WorkflowResults {
|
|
57
|
+
id: string;
|
|
58
|
+
status: string;
|
|
59
|
+
duration: number;
|
|
60
|
+
workers: Array<{
|
|
61
|
+
name: string;
|
|
62
|
+
device: string;
|
|
63
|
+
viewport?: {
|
|
64
|
+
width: number;
|
|
65
|
+
height: number;
|
|
66
|
+
};
|
|
67
|
+
status: string;
|
|
68
|
+
results?: unknown;
|
|
69
|
+
error?: string;
|
|
70
|
+
duration: number;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
export declare class SimulatorWorkflowEngine extends EventEmitter {
|
|
74
|
+
private pool;
|
|
75
|
+
private authManager;
|
|
76
|
+
private workflows;
|
|
77
|
+
private completionLock;
|
|
78
|
+
constructor(pool: SimulatorPool, authManager: AuthManager);
|
|
79
|
+
initWorkflow(options: WorkflowInitOptions): Promise<WorkflowInitResult>;
|
|
80
|
+
updateWorker(workflowId: string, workerName: string, update: string): Promise<void>;
|
|
81
|
+
completeWorker(workflowId: string, workerName: string, results: unknown): Promise<void>;
|
|
82
|
+
failWorker(workflowId: string, workerName: string, error: string): Promise<void>;
|
|
83
|
+
getStatus(workflowId: string): WorkflowStatus;
|
|
84
|
+
collectResults(workflowId: string): WorkflowResults;
|
|
85
|
+
collectPartialResults(workflowId: string): WorkflowResults;
|
|
86
|
+
cleanupWorkflow(workflowId: string): Promise<void>;
|
|
87
|
+
private checkWorkflowCompletion;
|
|
88
|
+
private generateWorkerPrompt;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=workflow-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-engine.d.ts","sourceRoot":"","sources":["../../src/orchestration/workflow-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;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,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBtF,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc;IAoB7C,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe;IAuBnD,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe;IAOpD,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxD,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,oBAAoB;CAc7B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BrowserBackend } from '../types/browser-backend';
|
|
2
|
+
import { DetectorResult, QAConfig } from './types';
|
|
3
|
+
import { SimulatorManager } from '../simulator/manager';
|
|
4
|
+
export interface AuditSummary {
|
|
5
|
+
totalIssues: number;
|
|
6
|
+
critical: number;
|
|
7
|
+
high: number;
|
|
8
|
+
medium: number;
|
|
9
|
+
low: number;
|
|
10
|
+
passed: number;
|
|
11
|
+
failed: number;
|
|
12
|
+
errors: number;
|
|
13
|
+
}
|
|
14
|
+
export interface AuditReport {
|
|
15
|
+
url: string;
|
|
16
|
+
device: string;
|
|
17
|
+
viewport: {
|
|
18
|
+
w: number;
|
|
19
|
+
h: number;
|
|
20
|
+
};
|
|
21
|
+
timestamp: string;
|
|
22
|
+
duration: number;
|
|
23
|
+
score: number;
|
|
24
|
+
summary: AuditSummary;
|
|
25
|
+
detectors: DetectorResult[];
|
|
26
|
+
}
|
|
27
|
+
export declare class QAAudit {
|
|
28
|
+
private client;
|
|
29
|
+
private config;
|
|
30
|
+
private simulator?;
|
|
31
|
+
private deviceId?;
|
|
32
|
+
private deviceInfo?;
|
|
33
|
+
constructor(client: BrowserBackend, config?: QAConfig, simulator?: SimulatorManager | undefined, deviceId?: string | undefined, deviceInfo?: {
|
|
34
|
+
name: string;
|
|
35
|
+
w: number;
|
|
36
|
+
h: number;
|
|
37
|
+
} | undefined);
|
|
38
|
+
runFullAudit(url?: string): Promise<AuditReport>;
|
|
39
|
+
private calculateScore;
|
|
40
|
+
private summarize;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/qa/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAoB,MAAM,SAAS,CAAC;AAcrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,cAAc,EAAE,CAAC;CAC7B;AASD,qBAAa,OAAO;IAEhB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,SAAS,CAAC;IAClB,OAAO,CAAC,QAAQ,CAAC;IACjB,OAAO,CAAC,UAAU,CAAC;gBAJX,MAAM,EAAE,cAAc,EACtB,MAAM,GAAE,QAAa,EACrB,SAAS,CAAC,EAAE,gBAAgB,YAAA,EAC5B,QAAQ,CAAC,EAAE,MAAM,YAAA,EACjB,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,YAAA;IAGvD,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAsEtD,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,SAAS;CAYlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-zoom.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/auto-zoom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAoBpF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BrowserBackend } from '../../types/browser-backend';
|
|
2
|
+
import { DetectorResult } from '../types';
|
|
3
|
+
import { SimulatorManager } from '../../simulator/manager';
|
|
4
|
+
export declare function detectDarkMode(client: BrowserBackend, simulator?: SimulatorManager, deviceId?: string): Promise<DetectorResult>;
|
|
5
|
+
//# sourceMappingURL=dark-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark-mode.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/dark-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,wBAAsB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAiDrI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixed-stacking.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/fixed-stacking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CA8BzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"horizontal-overflow.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/horizontal-overflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CA0B9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-only.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/hover-only.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CA8BrF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { detectAutoZoom } from './auto-zoom';
|
|
2
|
+
export { detectTouchTargets } from './touch-targets';
|
|
3
|
+
export { detectHoverOnly } from './hover-only';
|
|
4
|
+
export { detectInputType } from './input-type';
|
|
5
|
+
export { detectSafeArea } from './safe-area';
|
|
6
|
+
export { detectKeyboardOverlap } from './keyboard-overlap';
|
|
7
|
+
export { detectHorizontalOverflow } from './horizontal-overflow';
|
|
8
|
+
export { detect100vh } from './vh100';
|
|
9
|
+
export { detectFixedStacking } from './fixed-stacking';
|
|
10
|
+
export { detectScrollLock } from './scroll-lock';
|
|
11
|
+
export { detectDarkMode } from './dark-mode';
|
|
12
|
+
export { detectOrientation } from './orientation';
|
|
13
|
+
export { detectPwaMeta } from './pwa-meta';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-type.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/input-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAqBrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-overlap.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/keyboard-overlap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CA+D3F"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BrowserBackend } from '../../types/browser-backend';
|
|
2
|
+
import { DetectorResult } from '../types';
|
|
3
|
+
import { SimulatorManager } from '../../simulator/manager';
|
|
4
|
+
export declare function detectOrientation(client: BrowserBackend, simulator?: SimulatorManager, deviceId?: string): Promise<DetectorResult>;
|
|
5
|
+
//# sourceMappingURL=orientation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orientation.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/orientation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA4CxI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-meta.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/pwa-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAmBnF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-area.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/safe-area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CA2BpF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-lock.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/scroll-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAgBtF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touch-targets.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/touch-targets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAsBxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vh100.d.ts","sourceRoot":"","sources":["../../../src/qa/detectors/vh100.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAsB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAsBjF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AuditReport } from './audit';
|
|
2
|
+
export interface RegressionReport {
|
|
3
|
+
currentScore: number;
|
|
4
|
+
previousScore: number;
|
|
5
|
+
scoreDelta: number;
|
|
6
|
+
newIssues: Array<{
|
|
7
|
+
detector: string;
|
|
8
|
+
selector: string;
|
|
9
|
+
problem: string;
|
|
10
|
+
fingerprint: string;
|
|
11
|
+
}>;
|
|
12
|
+
fixedIssues: Array<{
|
|
13
|
+
detector: string;
|
|
14
|
+
selector: string;
|
|
15
|
+
problem: string;
|
|
16
|
+
fingerprint: string;
|
|
17
|
+
}>;
|
|
18
|
+
recurringIssues: Array<{
|
|
19
|
+
detector: string;
|
|
20
|
+
selector: string;
|
|
21
|
+
problem: string;
|
|
22
|
+
fingerprint: string;
|
|
23
|
+
}>;
|
|
24
|
+
summary: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class QAHistory {
|
|
27
|
+
private reportsDir;
|
|
28
|
+
constructor(reportsDir?: string);
|
|
29
|
+
save(report: AuditReport): Promise<string>;
|
|
30
|
+
getLatest(url: string): Promise<AuditReport | null>;
|
|
31
|
+
getPrevious(url: string): Promise<AuditReport | null>;
|
|
32
|
+
detectRegressions(current: AuditReport, previous: AuditReport): Promise<RegressionReport>;
|
|
33
|
+
getExitCode(report: AuditReport, options?: {
|
|
34
|
+
failOnCritical?: boolean;
|
|
35
|
+
failOnHigh?: boolean;
|
|
36
|
+
minScore?: number;
|
|
37
|
+
}): number;
|
|
38
|
+
private buildFingerprints;
|
|
39
|
+
private fingerprint;
|
|
40
|
+
private sanitizeSite;
|
|
41
|
+
private listReportFiles;
|
|
42
|
+
private rotate;
|
|
43
|
+
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,OAAO,CAAC,gBAAgB,CAAC;IAsB/F,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAQzH,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,YAAY;YAKN,eAAe;YAQf,MAAM;CAWrB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './detectors/index';
|
|
3
|
+
export { QAAudit } from './audit';
|
|
4
|
+
export type { AuditReport, AuditSummary } from './audit';
|
|
5
|
+
export { generateAuditMarkdown } from './report-markdown';
|
|
6
|
+
export { QAHistory } from './history';
|
|
7
|
+
export type { RegressionReport } from './history';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/qa/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-markdown.d.ts","sourceRoot":"","sources":["../../src/qa/report-markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAgCjE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface DetectorIssue {
|
|
2
|
+
selector: string;
|
|
3
|
+
element?: string;
|
|
4
|
+
problem: string;
|
|
5
|
+
fix: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface DetectorResult {
|
|
9
|
+
detector: string;
|
|
10
|
+
severity: 'critical' | 'high' | 'medium' | 'low' | 'pass' | 'error';
|
|
11
|
+
issues: DetectorIssue[];
|
|
12
|
+
passed: boolean;
|
|
13
|
+
totalScanned: number;
|
|
14
|
+
issueCount: number;
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface QAConfig {
|
|
19
|
+
thresholds?: {
|
|
20
|
+
touchTargetMinSize?: number;
|
|
21
|
+
inputMinFontSize?: number;
|
|
22
|
+
};
|
|
23
|
+
ignore?: Array<{
|
|
24
|
+
detector: string;
|
|
25
|
+
selector: string;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
export declare function applyIgnoreRules(result: DetectorResult, config: QAConfig): DetectorResult;
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/qa/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IACpE,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,UAAU,CAAC,EAAE;QACX,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;CACJ;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,GAAG,cAAc,CAWzF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { SimulatorPool } from '../simulator/pool';
|
|
3
|
+
export declare class SimulatorCrashWatcher extends EventEmitter {
|
|
4
|
+
private pool;
|
|
5
|
+
private authProfile?;
|
|
6
|
+
private interval;
|
|
7
|
+
private knownStates;
|
|
8
|
+
constructor(pool: SimulatorPool, authProfile?: string | undefined);
|
|
9
|
+
start(checkIntervalMs?: number): void;
|
|
10
|
+
stop(): void;
|
|
11
|
+
private check;
|
|
12
|
+
private recover;
|
|
13
|
+
addDevice(deviceId: string): void;
|
|
14
|
+
removeDevice(deviceId: string): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=crash-watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crash-watcher.d.ts","sourceRoot":"","sources":["../../src/reliability/crash-watcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,qBAAa,qBAAsB,SAAQ,YAAY;IAKnD,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,WAAW,CAAC;IALtB,OAAO,CAAC,QAAQ,CAA+C;IAC/D,OAAO,CAAC,WAAW,CAAkC;gBAG3C,IAAI,EAAE,aAAa,EACnB,WAAW,CAAC,EAAE,MAAM,YAAA;IAK9B,KAAK,CAAC,eAAe,SAAQ,GAAG,IAAI;IAWpC,IAAI,IAAI,IAAI;YAOE,KAAK;YAkBL,OAAO;IAsCrB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIjC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAGrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graceful-shutdown.d.ts","sourceRoot":"","sources":["../../src/reliability/graceful-shutdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAa/D"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { SimulatorCrashWatcher } from './crash-watcher';
|
|
2
|
+
export { setupGracefulShutdown } from './graceful-shutdown';
|
|
3
|
+
export { cleanupZombieProcesses, startPeriodicCleanup, stopPeriodicCleanup, registerManagedDevices, addManagedDevice, unregisterManagedDevices, getAllManagedDeviceIds, } from './zombie-cleanup';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reliability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape of the shared device registry file.
|
|
3
|
+
* Each key is a PID (stringified) that owns a set of simulator UDIDs.
|
|
4
|
+
*/
|
|
5
|
+
export interface DeviceRegistry {
|
|
6
|
+
[pid: string]: {
|
|
7
|
+
udids: string[];
|
|
8
|
+
startedAt: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Register the current process's managed device UDIDs in the shared registry.
|
|
13
|
+
* Safe to call multiple times; replaces the entry for the current PID.
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerManagedDevices(udids: string[]): void;
|
|
16
|
+
/**
|
|
17
|
+
* Add a single device UDID to the current process's registry entry.
|
|
18
|
+
* Unlike registerManagedDevices() which replaces the entire list, this
|
|
19
|
+
* appends without overwriting devices already registered by the same process
|
|
20
|
+
* (e.g. devices managed by SimulatorPool).
|
|
21
|
+
*/
|
|
22
|
+
export declare function addManagedDevice(udid: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Remove the current process from the shared registry (e.g. on shutdown).
|
|
25
|
+
*/
|
|
26
|
+
export declare function unregisterManagedDevices(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Return the set of all device UDIDs currently claimed by any live process.
|
|
29
|
+
* Stale entries (dead PIDs) are pruned automatically.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getAllManagedDeviceIds(): Set<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Find and clean up orphaned simulator processes.
|
|
34
|
+
* When knownDeviceIds is provided, only shuts down booted simulators
|
|
35
|
+
* NOT in that set. When omitted (startup), reports orphaned CoreSimulator
|
|
36
|
+
* processes without killing them (conservative first-run behavior).
|
|
37
|
+
*
|
|
38
|
+
* Returns the number of processes cleaned up or detected.
|
|
39
|
+
*/
|
|
40
|
+
export declare function cleanupZombieProcesses(knownDeviceIds?: Set<string>): Promise<number>;
|
|
41
|
+
/**
|
|
42
|
+
* Start periodic zombie cleanup that compares booted simulators against
|
|
43
|
+
* the pool's known devices and shuts down orphans.
|
|
44
|
+
*
|
|
45
|
+
* @param graceMs - Delay before the first cleanup run (default 30 000 ms).
|
|
46
|
+
* This gives other MCP sessions time to register their devices after boot.
|
|
47
|
+
*/
|
|
48
|
+
export declare function startPeriodicCleanup(getKnownDeviceIds: () => Set<string>, intervalMs?: number, graceMs?: number): void;
|
|
49
|
+
/**
|
|
50
|
+
* Stop periodic zombie cleanup.
|
|
51
|
+
*/
|
|
52
|
+
export declare function stopPeriodicCleanup(): void;
|
|
53
|
+
//# sourceMappingURL=zombie-cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zombie-cleanup.d.ts","sourceRoot":"","sources":["../../src/reliability/zombie-cleanup.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAMD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAY5D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAmBnD;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAS/C;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,GAAG,CAAC,MAAM,CAAC,CA0BpD;AAmCD;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAK1F;AAuDD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,EACpC,UAAU,SAAQ,EAClB,OAAO,SAAQ,GACd,IAAI,CAsBN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAS1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-logger.d.ts","sourceRoot":"","sources":["../../src/security/audit-logger.ts"],"names":[],"mappings":"AAqDA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAyBpH"}
|