cdp-skill 1.0.0

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/src/index.js ADDED
@@ -0,0 +1,155 @@
1
+ /**
2
+ * CDP Browser Driver Skill
3
+ * A minimal, CDP-only browser automation library for Claude Code
4
+ *
5
+ * Functional API - All functions are stateless or return objects with closures
6
+ */
7
+
8
+ // ============================================================================
9
+ // Core CDP Protocol and Browser Management
10
+ // ============================================================================
11
+ export {
12
+ createConnection,
13
+ createDiscovery,
14
+ discoverChrome,
15
+ createTargetManager,
16
+ createSessionRegistry,
17
+ createPageSession,
18
+ createBrowser
19
+ } from './cdp.js';
20
+
21
+ // ============================================================================
22
+ // Page Operations and Waiting
23
+ // ============================================================================
24
+ export {
25
+ WaitCondition,
26
+ createPageController,
27
+ waitForCondition,
28
+ waitForFunction,
29
+ waitForNetworkIdle,
30
+ waitForDocumentReady,
31
+ waitForSelector,
32
+ waitForText,
33
+ createCookieManager,
34
+ createWebStorageManager,
35
+ // LCS DOM Stability (improvement #9)
36
+ lcsLength,
37
+ lcsSimilarity,
38
+ getDOMSignature,
39
+ waitForDOMStability
40
+ } from './page.js';
41
+
42
+ // ============================================================================
43
+ // DOM Operations and Input
44
+ // ============================================================================
45
+ export {
46
+ createElementHandle,
47
+ createElementLocator,
48
+ createInputEmulator,
49
+ querySelector,
50
+ querySelectorAll,
51
+ findElement,
52
+ getBoundingBox,
53
+ isVisible,
54
+ isActionable,
55
+ scrollIntoView,
56
+ click,
57
+ type,
58
+ fill,
59
+ press,
60
+ scroll,
61
+ createClickExecutor,
62
+ createFillExecutor,
63
+ createWaitExecutor,
64
+ createKeyboardExecutor,
65
+ createActionabilityChecker,
66
+ createElementValidator,
67
+ createReactInputFiller
68
+ } from './dom.js';
69
+
70
+ // ============================================================================
71
+ // ARIA and Role-based Queries
72
+ // ============================================================================
73
+ export {
74
+ createAriaSnapshot,
75
+ createRoleQueryExecutor,
76
+ createQueryOutputProcessor
77
+ } from './aria.js';
78
+
79
+ // ============================================================================
80
+ // Capture and Monitoring
81
+ // ============================================================================
82
+ export {
83
+ createScreenshotCapture,
84
+ captureViewport,
85
+ captureFullPage,
86
+ captureRegion,
87
+ saveScreenshot,
88
+ createConsoleCapture,
89
+ createNetworkCapture,
90
+ createErrorAggregator,
91
+ aggregateErrors,
92
+ createPdfCapture,
93
+ createDebugCapture,
94
+ createEvalSerializer
95
+ } from './capture.js';
96
+
97
+ // ============================================================================
98
+ // Test Execution
99
+ // ============================================================================
100
+ export {
101
+ validateSteps,
102
+ executeStep,
103
+ runSteps,
104
+ createTestRunner
105
+ } from './runner.js';
106
+
107
+ // ============================================================================
108
+ // Utilities and Errors
109
+ // ============================================================================
110
+ export {
111
+ // Error types and factories
112
+ ErrorTypes,
113
+ createError,
114
+ connectionError,
115
+ navigationError,
116
+ navigationAbortedError,
117
+ timeoutError,
118
+ elementNotFoundError,
119
+ elementNotEditableError,
120
+ staleElementError,
121
+ pageCrashedError,
122
+ contextDestroyedError,
123
+ stepValidationError,
124
+ isErrorType,
125
+ isContextDestroyed,
126
+ isStaleElementError,
127
+ // Utilities
128
+ sleep,
129
+ releaseObject,
130
+ resetInputState,
131
+ getCurrentUrl,
132
+ getElementAtPoint,
133
+ detectNavigation,
134
+ // Temp directory utilities
135
+ getTempDir,
136
+ getTempDirSync,
137
+ resolveTempPath,
138
+ generateTempPath,
139
+ // Backoff with jitter (improvement #5)
140
+ createBackoffSleeper,
141
+ sleepWithBackoff,
142
+ // Validators
143
+ createKeyValidator,
144
+ createFormValidator,
145
+ // Device presets
146
+ DEVICE_PRESETS,
147
+ getDevicePreset,
148
+ resolveViewport
149
+ } from './utils.js';
150
+
151
+ // ============================================================================
152
+ // Default Export - High-level browser factory
153
+ // ============================================================================
154
+ import { createBrowser } from './cdp.js';
155
+ export default createBrowser;