Skip to content

Commit b23419b

Browse files
committed
chore: Remove execute_sequence tool and its related dependencies
- Deleted the `execute_sequence` tool and its corresponding tests, utilities, and type definitions. - Updated `server.ts` to unregister the tool. - Removed `stability-detector` and `state-diff` utilities, along with their tests. - Refactored `package.json` with separate linting for source and test files. - Cleaned up documentation references to `execute_sequence`.
1 parent e0d94c7 commit b23419b

10 files changed

Lines changed: 16 additions & 605 deletions

docs/architecture/interaction-sequencing-proposal.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ interface SequenceResult {
122122
### Why Stability Matters
123123

124124
After clicking a button, the page might:
125+
125126
- Navigate (URL change)
126127
- Show a loading spinner
127128
- Fetch data and render new elements
@@ -201,7 +202,7 @@ src/
201202

202203
1. Create `interaction.tool.ts` with basic `execute_sequence`
203204
2. Implement action dispatch (reuse existing tool logic)
204-
3. Capture before/after state using `getVisibleElements`
205+
3. Capture before/after state using `getElements`
205206
4. Compute simple delta (appeared/disappeared by selector)
206207

207208
### Phase 2: Stability Detection
@@ -241,6 +242,7 @@ execute_sequence({
241242
```
242243

243244
Response:
245+
244246
```json
245247
{
246248
"completed": 3,
@@ -271,6 +273,7 @@ execute_sequence({
271273
```
272274

273275
Response:
276+
274277
```json
275278
{
276279
"completed": 2,
@@ -300,6 +303,7 @@ execute_sequence({
300303
```
301304

302305
Response:
306+
303307
```json
304308
{
305309
"completed": 1,
@@ -331,6 +335,7 @@ execute_sequence({
331335
```
332336

333337
Response:
338+
334339
```json
335340
{
336341
"completed": 3,
@@ -361,6 +366,7 @@ Some actions (like `set_value`) rarely cause async changes. Could skip stability
361366
### 2. How to handle infinite loading states?
362367

363368
Options:
369+
364370
- Hard timeout (current approach) — returns partial delta
365371
- Detect specific loading patterns — report "page still loading"
366372
- Let AI decide — return `{ stable: false, reason: 'loading indicator visible' }`
@@ -369,7 +375,8 @@ Options:
369375

370376
### 3. Should delta include off-screen elements?
371377

372-
Current `getVisibleElements` filters to viewport by default. For delta:
378+
Current `getElements` filters to viewport by default. For delta:
379+
373380
- Viewport only = might miss elements that scrolled in/out
374381
- Full page = more accurate but larger payload
375382

@@ -378,6 +385,7 @@ Current `getVisibleElements` filters to viewport by default. For delta:
378385
### 4. Performance: Full diff vs. key signals
379386

380387
Two comparison strategies:
388+
381389
- **Full diff**: Compare all elements every poll (accurate, expensive)
382390
- **Key signals**: Compare signature only during polling, full diff only at end (fast, might miss rapid changes)
383391

@@ -386,6 +394,7 @@ Two comparison strategies:
386394
### 5. What about conditional actions?
387395

388396
Should we support:
397+
389398
```typescript
390399
{ action: 'click_element', selector: '#cookie-banner', optional: true }
391400
```
@@ -399,13 +408,15 @@ Should we support:
399408
### Existing Tools
400409

401410
`execute_sequence` complements existing tools:
411+
402412
- Simple single actions still use `click_element`, `set_value`, etc.
403413
- Complex workflows use `execute_sequence`
404414
- No breaking changes to existing tools
405415

406416
### Mobile Support
407417

408418
Works identically for mobile sessions:
419+
409420
```typescript
410421
execute_sequence({
411422
actions: [
@@ -419,6 +430,7 @@ execute_sequence({
419430
### Multi-Session (Future)
420431

421432
When multi-session support lands:
433+
422434
```typescript
423435
execute_sequence({
424436
sessionId: 'user-a',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"prebundle": "rimraf lib --glob ./*.tgz",
3838
"bundle": "tsup && shx chmod +x lib/server.js",
3939
"postbundle": "npm pack",
40-
"lint": "eslint src/ --fix && tsc --noEmit",
40+
"lint": "npm run lint:src && npm run lint:tests",
41+
"lint:src": "eslint src/ --fix && tsc --noEmit",
4142
"lint:tests": "eslint tests/ --fix && tsc -p tsconfig.test.json --noEmit",
4243
"start": "node lib/server.js",
4344
"dev": "tsx --watch src/server.ts",

src/server.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import {
3333
setGeolocationToolDefinition,
3434
} from './tools/device.tool';
3535
import { executeScriptTool, executeScriptToolDefinition } from './tools/execute-script.tool';
36-
import { executeSequenceTool, executeSequenceToolDefinition } from './tools/execute-sequence.tool';
3736
import { getElementsTool, getElementsToolDefinition } from './tools/get-elements.tool';
3837
import { launchChromeTool, launchChromeToolDefinition } from './tools/launch-chrome.tool';
3938
import { emulateDeviceTool, emulateDeviceToolDefinition } from './tools/emulate-device.tool';
@@ -134,8 +133,6 @@ registerTool(setGeolocationToolDefinition, setGeolocationTool);
134133
registerTool(executeScriptToolDefinition, executeScriptTool);
135134
registerTool(getElementsToolDefinition, getElementsTool);
136135

137-
registerTool(executeSequenceToolDefinition, withRecording('execute_sequence', executeSequenceTool));
138-
139136
registerResource(sessionsIndexResource);
140137
registerResource(sessionCurrentStepsResource);
141138
registerResource(sessionCurrentCodeResource);

src/tools/execute-sequence.tool.ts

Lines changed: 0 additions & 210 deletions
This file was deleted.

src/utils/parse-variables.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)