@weavetab/skills 2.5.0-beta.5 → 2.5.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/README.md +108 -108
- package/ROUTER.md +43 -43
- package/bin/cli.js +232 -232
- package/browser/dom-strategy.md +121 -119
- package/browser/form-automation.md +84 -87
- package/browser/interaction-pipeline.md +242 -216
- package/browser/tab-and-window.md +136 -136
- package/desktop/desktop-targeting.md +85 -85
- package/desktop/electron-discovery.md +115 -115
- package/developer/github-forensics.md +89 -74
- package/dist/bundled/weavetab-all.md +1885 -1709
- package/dist/bundled/weavetab-browser.md +504 -479
- package/dist/bundled/weavetab-desktop.md +164 -164
- package/dist/bundled/weavetab-developer.md +77 -60
- package/dist/bundled/weavetab-documents.md +173 -131
- package/dist/bundled/weavetab-memory.md +259 -233
- package/dist/bundled/weavetab-network-and-perf.md +233 -206
- package/dist/bundled/weavetab-plugins.md +30 -25
- package/dist/bundled/weavetab-resilience.md +229 -201
- package/dist/bundled/weavetab-security.md +81 -75
- package/dist/granular/browser_dom-strategy.md +121 -119
- package/dist/granular/browser_form-automation.md +84 -87
- package/dist/granular/browser_interaction-pipeline.md +242 -216
- package/dist/granular/browser_tab-and-window.md +136 -136
- package/dist/granular/desktop_desktop-targeting.md +85 -85
- package/dist/granular/desktop_electron-discovery.md +115 -115
- package/dist/granular/developer_github-forensics.md +89 -74
- package/dist/granular/documents_canvas-and-visual-capture.md +117 -103
- package/dist/granular/documents_office-document-ingestion.md +91 -63
- package/dist/granular/memory_selector-memory-system.md +127 -127
- package/dist/granular/memory_session-trail.md +111 -95
- package/dist/granular/memory_site-learning.md +62 -53
- package/dist/granular/network-and-perf_device-and-environment.md +100 -87
- package/dist/granular/network-and-perf_network-intercept-and-mock.md +97 -84
- package/dist/granular/network-and-perf_performance-and-vitals.md +86 -84
- package/dist/granular/plugins_hooks-and-overrides.md +40 -35
- package/dist/granular/plugins_plugin-runtime.md +3 -3
- package/dist/granular/resilience_loop-breaker.md +72 -67
- package/dist/granular/resilience_session-time-travel.md +146 -131
- package/dist/granular/resilience_stale-ref-recovery.md +61 -53
- package/dist/granular/security_rbac-and-policies.md +50 -47
- package/dist/granular/security_secret-containment-protocol.md +62 -59
- package/documents/canvas-and-visual-capture.md +117 -103
- package/documents/office-document-ingestion.md +91 -63
- package/evals/evaluator.js +146 -146
- package/evals/scenarios.json +239 -239
- package/memory/selector-memory-system.md +127 -127
- package/memory/session-trail.md +111 -95
- package/memory/site-learning.md +62 -53
- package/network-and-perf/device-and-environment.md +100 -87
- package/network-and-perf/network-intercept-and-mock.md +97 -84
- package/network-and-perf/performance-and-vitals.md +86 -84
- package/package.json +4 -3
- package/plugins/hooks-and-overrides.md +40 -35
- package/plugins/plugin-runtime.md +3 -3
- package/resilience/loop-breaker.md +72 -67
- package/resilience/session-time-travel.md +146 -131
- package/resilience/stale-ref-recovery.md +61 -53
- package/security/rbac-and-policies.md +50 -47
- package/security/secret-containment-protocol.md +62 -59
- package/skills.json +26 -27
- package/src/api.js +239 -239
|
@@ -1,74 +1,89 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: github-forensics
|
|
3
|
-
domain: developer
|
|
4
|
-
triggers:
|
|
5
|
-
- "analyze github"
|
|
6
|
-
- "read repository"
|
|
7
|
-
- "check pull request"
|
|
8
|
-
- "github issues"
|
|
9
|
-
- "inspect repo"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 1. High-Level Repository Analysis (action: "analyze")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"action": "analyze",
|
|
28
|
-
"repo": "Weavetab/MCP"
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
---
|
|
2
|
+
id: github-forensics
|
|
3
|
+
domain: developer
|
|
4
|
+
triggers:
|
|
5
|
+
- "analyze github"
|
|
6
|
+
- "read repository"
|
|
7
|
+
- "check pull request"
|
|
8
|
+
- "github issues"
|
|
9
|
+
- "inspect repo"
|
|
10
|
+
weavetab: ">=2.5.0"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# GitHub Forensics & Repository Architecture Inspection
|
|
14
|
+
|
|
15
|
+
Navigating GitHub repositories via web browsing burns massive token budgets loading HTML chrome, comment threads, and diff trees. The official `@weavetab/plugin-github` plugin provides a dedicated `github` tool that talks to the GitHub REST API and raw content endpoints directly — no browser DOM, no cloning.
|
|
16
|
+
|
|
17
|
+
Responses are cached on disk (`~/.weavetab-system/github_cache`) and subject to GitHub's API rate limits.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 1. High-Level Repository Analysis (action: "analyze")
|
|
22
|
+
|
|
23
|
+
Fetches repo metadata, the default branch, a flat recursive file tree, and a README snippet (first 100 lines). Results are cached and reused by `read`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"action": "analyze",
|
|
28
|
+
"repo": "Weavetab/MCP"
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Returns fields such as `owner`, `repo`, `default_branch`, `description`, `language`, `file_tree` (array of `{path, type, size, sha}`), and `readme_snippet`.
|
|
33
|
+
|
|
34
|
+
If `repo` is omitted, the active tab's repository is used.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 2. Reading Repository Source Files (action: "read")
|
|
39
|
+
|
|
40
|
+
Stream specific files from a public or authenticated repo via `raw.githubusercontent.com`. Requires a prior `analyze` (to cache the default branch and tree), or it will run one automatically:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"action": "read",
|
|
45
|
+
"repo": "Weavetab/MCP",
|
|
46
|
+
"paths": ["src/server.ts"],
|
|
47
|
+
"line_range": [1, 200]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`paths` is relative to the repo root; `line_range` is an optional `[start, end]` (1-indexed).
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. Pull Request Forensics (action: "pr")
|
|
56
|
+
|
|
57
|
+
Retrieve PR details, changed files, and review comments:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"action": "pr",
|
|
62
|
+
"repo": "Weavetab/MCP",
|
|
63
|
+
"number": 42
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Passing `number` fetches that PR; omitting it lists recent PRs.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 4. Issue Triage & Search (action: "issues")
|
|
72
|
+
|
|
73
|
+
Query the issue tracker with state, label, keyword, and limit filters:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"action": "issues",
|
|
78
|
+
"repo": "Weavetab/MCP",
|
|
79
|
+
"state": "open",
|
|
80
|
+
"labels": ["bug"],
|
|
81
|
+
"limit": 5
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- **`number`** fetches a single issue plus its comments.
|
|
86
|
+
- **`search`** runs a keyword search across issues.
|
|
87
|
+
- **`state`** (`open`/`closed`/`all`) and **`labels`** filter the listing; `limit` caps results (default 5).
|
|
88
|
+
|
|
89
|
+
> The GitHub **search** API is rate-limited more aggressively than raw/GET reads. `read` and `analyze` file fetches do not consume search-quota calls. If a call fails with a rate-limit message, wait until the reported reset time before retrying.
|
|
@@ -1,103 +1,117 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: canvas-and-visual-capture
|
|
3
|
-
domain: documents
|
|
4
|
-
triggers:
|
|
5
|
-
- "take screenshot"
|
|
6
|
-
- "capture viewport"
|
|
7
|
-
- "export pdf"
|
|
8
|
-
- "canvas inspection"
|
|
9
|
-
- "extract design tokens"
|
|
10
|
-
tools:
|
|
11
|
-
- "browser_screenshot"
|
|
12
|
-
- "browser_viewport"
|
|
13
|
-
- "browser_canvas"
|
|
14
|
-
- "browser_pdf"
|
|
15
|
-
- "browser_extract_design"
|
|
16
|
-
- "browser_map"
|
|
17
|
-
- "browser_click"
|
|
18
|
-
weavetab: ">=2.5.0
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
# Visual Capture, Canvas Forensics & Design Extraction
|
|
22
|
-
|
|
23
|
-
Beyond textual DOM manipulation, modern web applications contain dynamic HTML5 canvas renderings (charts, maps, WebGL games), and agents often need high-fidelity visual artifacts.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## 1. Targeted Screenshots (`browser_screenshot`)
|
|
28
|
-
|
|
29
|
-
Capture full page layouts, the visible viewport, or specific element bounding boxes:
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"fullPage": true,
|
|
34
|
-
"format": "png"
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Or
|
|
39
|
-
```json
|
|
40
|
-
{
|
|
41
|
-
"
|
|
42
|
-
"format": "jpeg",
|
|
43
|
-
"quality": 80
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
```json
|
|
98
|
-
{
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
1
|
+
---
|
|
2
|
+
id: canvas-and-visual-capture
|
|
3
|
+
domain: documents
|
|
4
|
+
triggers:
|
|
5
|
+
- "take screenshot"
|
|
6
|
+
- "capture viewport"
|
|
7
|
+
- "export pdf"
|
|
8
|
+
- "canvas inspection"
|
|
9
|
+
- "extract design tokens"
|
|
10
|
+
tools:
|
|
11
|
+
- "browser_screenshot"
|
|
12
|
+
- "browser_viewport"
|
|
13
|
+
- "browser_canvas"
|
|
14
|
+
- "browser_pdf"
|
|
15
|
+
- "browser_extract_design"
|
|
16
|
+
- "browser_map"
|
|
17
|
+
- "browser_click"
|
|
18
|
+
weavetab: ">=2.5.0"
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Visual Capture, Canvas Forensics & Design Extraction
|
|
22
|
+
|
|
23
|
+
Beyond textual DOM manipulation, modern web applications contain dynamic HTML5 canvas renderings (charts, maps, WebGL games), and agents often need high-fidelity visual artifacts.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 1. Targeted Screenshots (`browser_screenshot`)
|
|
28
|
+
|
|
29
|
+
Capture full page layouts, the visible viewport, or specific element bounding boxes:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"fullPage": true,
|
|
34
|
+
"format": "png"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or crop to a specific element by CSS selector, or to a pixel rectangle with `clip`:
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"selector": "#pricing-table",
|
|
42
|
+
"format": "jpeg",
|
|
43
|
+
"quality": 80
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Options: `format` (`png` default, or `jpeg`), `quality` (JPEG only), `fullPage`, `selector`, and `clip` (`{x, y, width, height}`).
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 2. PDF Document Generation (`browser_pdf`)
|
|
52
|
+
|
|
53
|
+
Render the current page into a print-ready PDF file:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"filename": "report.pdf",
|
|
58
|
+
"landscape": false,
|
|
59
|
+
"scale": 1.0,
|
|
60
|
+
"pageRanges": "1-5",
|
|
61
|
+
"margin": { "top": 0.4, "bottom": 0.4, "left": 0.4, "right": 0.4 }
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Options: `filename` (defaults to `capture_<timestamp>.pdf`), `landscape`, `scale` (default 1.0), `pageRanges` (e.g. `"1-5"`, empty for all), and `margin` — either a single number in inches or a `{top,bottom,left,right}` object (default 0.4).
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 3. HTML5 Canvas Pixel Inspection & Visual Grounding (`browser_canvas` & `browser_map`)
|
|
70
|
+
|
|
71
|
+
When a chart or graphic is rendered via `<canvas>`, standard DOM reading tools cannot see individual buttons or nodes. You have two strategies:
|
|
72
|
+
|
|
73
|
+
### A. Set-of-Marks Visual Grounding (Recommended for Canvas UIs & WebGL)
|
|
74
|
+
Run `browser_map({ visual: "auto" })`. It detects canvas elements and high-contrast regions, attaches numbered badges `[1]…[N]`, and returns an annotated image:
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"visual": "auto"
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
Then interact directly by mark number without guessing pixel coordinates:
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"mark": 3
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### B. Direct Canvas Pixel Export (`browser_canvas`)
|
|
88
|
+
To export the raw canvas as an image, or simulate a drag/gesture path across it:
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"ref": "w:19",
|
|
92
|
+
"action": "get_image"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For drawing or selecting a region, pass `"action": "draw"` with a `points` array of `{x, y}` positions (relative to the canvas):
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"action": "draw",
|
|
100
|
+
"selector": "canvas#chart",
|
|
101
|
+
"points": [ { "x": 40, "y": 10 }, { "x": 200, "y": 120 } ]
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 4. Design System Extraction (`browser_extract_design`)
|
|
108
|
+
|
|
109
|
+
Reverse-engineer UI stylesheets, active CSS custom properties (variables), typography scales, and color palettes:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"selector": ".antigravity-hud-panel"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Returns structured JSON representing colors, font families, shadows, and spacing tokens.
|
|
@@ -1,63 +1,91 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: office-document-ingestion
|
|
3
|
-
domain: documents
|
|
4
|
-
triggers:
|
|
5
|
-
- "read excel"
|
|
6
|
-
- "read docx"
|
|
7
|
-
- "parse csv"
|
|
8
|
-
- "spreadsheet"
|
|
9
|
-
- "word document"
|
|
10
|
-
- "parse table"
|
|
11
|
-
tools:
|
|
12
|
-
- "browser_office"
|
|
13
|
-
weavetab: ">=2.5.0
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# Office Document Ingestion: Word, Excel & CSV Parsing
|
|
17
|
-
|
|
18
|
-
Agents frequently need to parse structured spreadsheets or corporate documents downloaded during automation runs. `browser_office`
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## 1.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
---
|
|
2
|
+
id: office-document-ingestion
|
|
3
|
+
domain: documents
|
|
4
|
+
triggers:
|
|
5
|
+
- "read excel"
|
|
6
|
+
- "read docx"
|
|
7
|
+
- "parse csv"
|
|
8
|
+
- "spreadsheet"
|
|
9
|
+
- "word document"
|
|
10
|
+
- "parse table"
|
|
11
|
+
tools:
|
|
12
|
+
- "browser_office"
|
|
13
|
+
weavetab: ">=2.5.0"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Office Document Ingestion: Word, Excel, PDF & CSV Parsing
|
|
17
|
+
|
|
18
|
+
Agents frequently need to parse structured spreadsheets or corporate documents downloaded during automation runs. `browser_office` reads `.xlsx`, `.xls`, `.docx`, `.pdf`, and `.csv` content directly into JSON.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Two Modes: `url` and `file`
|
|
23
|
+
|
|
24
|
+
`browser_office({ action: "read" })` accepts exactly one source:
|
|
25
|
+
|
|
26
|
+
- **`url`** — fetch a document URL in-browser using the active session cookies. Ideal for authenticated downloads, SharePoint links, and Google Drive exports. The format is auto-detected from the URL path or MIME type (and magic bytes as a fallback).
|
|
27
|
+
- **`file`** — parse a file already present in the local downloads directory. Pass a **bare filename** only (e.g. `"report.xlsx"`); path separators are rejected.
|
|
28
|
+
|
|
29
|
+
`max_rows` (default 500) caps Excel/CSV rows; `max_chars` (default 50000) caps PDF/Word text.
|
|
30
|
+
|
|
31
|
+
Use `action: "list"` first if you don't know what files are in the downloads directory.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. Parsing Spreadsheets (`.xlsx`, `.xls`, `.csv`)
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"action": "read",
|
|
40
|
+
"file": "quarterly_revenue.xlsx",
|
|
41
|
+
"max_rows": 100
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Excel returns per-sheet tables (rows as objects keyed by header):
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"success": true,
|
|
50
|
+
"source": "quarterly_revenue.xlsx",
|
|
51
|
+
"type": "excel",
|
|
52
|
+
"data": {
|
|
53
|
+
"Q3_Summary": [
|
|
54
|
+
{ "Department": "Engineering", "Budget": 1250000, "Actual": 1180000 },
|
|
55
|
+
{ "Department": "Marketing", "Budget": 600000, "Actual": 620000 }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"truncated": false
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
CSV returns `type: "csv"` with a flat `data` array of row objects.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 3. Ingesting Word & PDF Documents (`.docx`, `.pdf`)
|
|
67
|
+
|
|
68
|
+
Word and PDF extraction return text in `content` (truncated by `max_chars`). PDF additionally reports page metadata under `data`:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"action": "read",
|
|
73
|
+
"url": "https://intranet.example.com/docs/service_agreement.pdf"
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"success": true,
|
|
80
|
+
"source": "https://intranet.example.com/docs/service_agreement.pdf",
|
|
81
|
+
"type": "pdf",
|
|
82
|
+
"content": "SERVICE AGREEMENT ...",
|
|
83
|
+
"truncated": true,
|
|
84
|
+
"data": { "numpages": 12, "info": { "Title": "Service Agreement" } }
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Operational Notes:
|
|
89
|
+
- PDF/Word parsing relies on local binary dependencies (e.g. poppler); if unavailable the call returns `success: false` with an explanatory `error`.
|
|
90
|
+
- If the URL resolves to an HTML login page rather than a document, `type` is `"html"` and `success` is `false` — the link is likely gated.
|
|
91
|
+
- Never point `browser_scrape` or `browser_map` at binary documents; they cannot read inside Excel, Word, or PDF files.
|