@staticn0va/wigolo 0.4.0 → 0.6.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.
Files changed (138) hide show
  1. package/SKILL.md +279 -68
  2. package/dist/agent/executor.d.ts +13 -0
  3. package/dist/agent/executor.d.ts.map +1 -0
  4. package/dist/agent/executor.js +128 -0
  5. package/dist/agent/executor.js.map +1 -0
  6. package/dist/agent/pipeline.d.ts +5 -0
  7. package/dist/agent/pipeline.d.ts.map +1 -0
  8. package/dist/agent/pipeline.js +198 -0
  9. package/dist/agent/pipeline.js.map +1 -0
  10. package/dist/agent/planner.d.ts +9 -0
  11. package/dist/agent/planner.d.ts.map +1 -0
  12. package/dist/agent/planner.js +190 -0
  13. package/dist/agent/planner.js.map +1 -0
  14. package/dist/cache/db.d.ts.map +1 -1
  15. package/dist/cache/db.js +32 -0
  16. package/dist/cache/db.js.map +1 -1
  17. package/dist/cache/store.d.ts +14 -0
  18. package/dist/cache/store.d.ts.map +1 -1
  19. package/dist/cache/store.js +69 -0
  20. package/dist/cache/store.js.map +1 -1
  21. package/dist/cli/warmup.d.ts +4 -0
  22. package/dist/cli/warmup.d.ts.map +1 -1
  23. package/dist/cli/warmup.js +58 -0
  24. package/dist/cli/warmup.js.map +1 -1
  25. package/dist/config.d.ts +8 -0
  26. package/dist/config.d.ts.map +1 -1
  27. package/dist/config.js +8 -0
  28. package/dist/config.js.map +1 -1
  29. package/dist/embedding/embed.d.ts +19 -0
  30. package/dist/embedding/embed.d.ts.map +1 -0
  31. package/dist/embedding/embed.js +131 -0
  32. package/dist/embedding/embed.js.map +1 -0
  33. package/dist/embedding/key-terms.d.ts +12 -0
  34. package/dist/embedding/key-terms.d.ts.map +1 -0
  35. package/dist/embedding/key-terms.js +138 -0
  36. package/dist/embedding/key-terms.js.map +1 -0
  37. package/dist/embedding/subprocess.d.ts +31 -0
  38. package/dist/embedding/subprocess.d.ts.map +1 -0
  39. package/dist/embedding/subprocess.js +213 -0
  40. package/dist/embedding/subprocess.js.map +1 -0
  41. package/dist/embedding/vector-index.d.ts +26 -0
  42. package/dist/embedding/vector-index.d.ts.map +1 -0
  43. package/dist/embedding/vector-index.js +78 -0
  44. package/dist/embedding/vector-index.js.map +1 -0
  45. package/dist/fetch/browser-pool.d.ts.map +1 -1
  46. package/dist/fetch/browser-pool.js +61 -0
  47. package/dist/fetch/browser-pool.js.map +1 -1
  48. package/dist/fetch/browser-types.js +1 -1
  49. package/dist/fetch/browser-types.js.map +1 -1
  50. package/dist/fetch/lightpanda.d.ts +28 -0
  51. package/dist/fetch/lightpanda.d.ts.map +1 -0
  52. package/dist/fetch/lightpanda.js +177 -0
  53. package/dist/fetch/lightpanda.js.map +1 -0
  54. package/dist/fetch/router.d.ts +1 -0
  55. package/dist/fetch/router.d.ts.map +1 -1
  56. package/dist/fetch/router.js.map +1 -1
  57. package/dist/instructions.d.ts +9 -6
  58. package/dist/instructions.d.ts.map +1 -1
  59. package/dist/instructions.js +111 -21
  60. package/dist/instructions.js.map +1 -1
  61. package/dist/logger.d.ts +1 -1
  62. package/dist/logger.d.ts.map +1 -1
  63. package/dist/repl/commands/agent.d.ts +5 -0
  64. package/dist/repl/commands/agent.d.ts.map +1 -0
  65. package/dist/repl/commands/agent.js +48 -0
  66. package/dist/repl/commands/agent.js.map +1 -0
  67. package/dist/repl/commands/find-similar.d.ts +5 -0
  68. package/dist/repl/commands/find-similar.d.ts.map +1 -0
  69. package/dist/repl/commands/find-similar.js +61 -0
  70. package/dist/repl/commands/find-similar.js.map +1 -0
  71. package/dist/repl/commands/research.d.ts +5 -0
  72. package/dist/repl/commands/research.d.ts.map +1 -0
  73. package/dist/repl/commands/research.js +50 -0
  74. package/dist/repl/commands/research.js.map +1 -0
  75. package/dist/repl/formatters.d.ts +4 -1
  76. package/dist/repl/formatters.d.ts.map +1 -1
  77. package/dist/repl/formatters.js +73 -0
  78. package/dist/repl/formatters.js.map +1 -1
  79. package/dist/repl/shell.d.ts.map +1 -1
  80. package/dist/repl/shell.js +22 -1
  81. package/dist/repl/shell.js.map +1 -1
  82. package/dist/research/decompose.d.ts +7 -0
  83. package/dist/research/decompose.d.ts.map +1 -0
  84. package/dist/research/decompose.js +195 -0
  85. package/dist/research/decompose.js.map +1 -0
  86. package/dist/research/pipeline.d.ts +5 -0
  87. package/dist/research/pipeline.d.ts.map +1 -0
  88. package/dist/research/pipeline.js +135 -0
  89. package/dist/research/pipeline.js.map +1 -0
  90. package/dist/research/synthesize.d.ts +10 -0
  91. package/dist/research/synthesize.d.ts.map +1 -0
  92. package/dist/research/synthesize.js +119 -0
  93. package/dist/research/synthesize.js.map +1 -0
  94. package/dist/search/answer-synthesis.d.ts +13 -0
  95. package/dist/search/answer-synthesis.d.ts.map +1 -0
  96. package/dist/search/answer-synthesis.js +120 -0
  97. package/dist/search/answer-synthesis.js.map +1 -0
  98. package/dist/search/find-similar.d.ts +5 -0
  99. package/dist/search/find-similar.d.ts.map +1 -0
  100. package/dist/search/find-similar.js +436 -0
  101. package/dist/search/find-similar.js.map +1 -0
  102. package/dist/search/multi-query.d.ts +22 -0
  103. package/dist/search/multi-query.d.ts.map +1 -0
  104. package/dist/search/multi-query.js +157 -0
  105. package/dist/search/multi-query.js.map +1 -0
  106. package/dist/search/rrf.d.ts +17 -0
  107. package/dist/search/rrf.d.ts.map +1 -0
  108. package/dist/search/rrf.js +48 -0
  109. package/dist/search/rrf.js.map +1 -0
  110. package/dist/search/sampling.d.ts +25 -0
  111. package/dist/search/sampling.d.ts.map +1 -0
  112. package/dist/search/sampling.js +52 -0
  113. package/dist/search/sampling.js.map +1 -0
  114. package/dist/server.d.ts.map +1 -1
  115. package/dist/server.js +210 -5
  116. package/dist/server.js.map +1 -1
  117. package/dist/tools/agent.d.ts +5 -0
  118. package/dist/tools/agent.d.ts.map +1 -0
  119. package/dist/tools/agent.js +67 -0
  120. package/dist/tools/agent.js.map +1 -0
  121. package/dist/tools/fetch.d.ts.map +1 -1
  122. package/dist/tools/fetch.js +16 -4
  123. package/dist/tools/fetch.js.map +1 -1
  124. package/dist/tools/find-similar.d.ts +5 -0
  125. package/dist/tools/find-similar.d.ts.map +1 -0
  126. package/dist/tools/find-similar.js +48 -0
  127. package/dist/tools/find-similar.js.map +1 -0
  128. package/dist/tools/research.d.ts +5 -0
  129. package/dist/tools/research.d.ts.map +1 -0
  130. package/dist/tools/research.js +50 -0
  131. package/dist/tools/research.js.map +1 -0
  132. package/dist/tools/search.d.ts +3 -2
  133. package/dist/tools/search.d.ts.map +1 -1
  134. package/dist/tools/search.js +217 -14
  135. package/dist/tools/search.js.map +1 -1
  136. package/dist/types.d.ts +108 -3
  137. package/dist/types.d.ts.map +1 -1
  138. package/package.json +10 -3
@@ -0,0 +1,177 @@
1
+ import { chromium } from 'playwright';
2
+ import { getConfig } from '../config.js';
3
+ import { createLogger } from '../logger.js';
4
+ import { isCDPReachable } from './cdp-client.js';
5
+ import { getDatabase } from '../cache/db.js';
6
+ const log = createLogger('fetch');
7
+ export function shouldUseLightpanda(domain) {
8
+ try {
9
+ const config = getConfig();
10
+ if (!config.lightpandaEnabled || !config.lightpandaUrl) {
11
+ return false;
12
+ }
13
+ const db = getDatabase();
14
+ const row = db.prepare('SELECT failure_count, prefer_chromium FROM lightpanda_routing WHERE domain = ?').get(domain);
15
+ if (!row)
16
+ return true;
17
+ if (row.prefer_chromium === 1) {
18
+ log.debug('domain prefers chromium over lightpanda', { domain });
19
+ return false;
20
+ }
21
+ if (row.failure_count >= config.lightpandaFailureThreshold) {
22
+ log.debug('domain failure threshold reached for lightpanda', {
23
+ domain,
24
+ failures: row.failure_count,
25
+ threshold: config.lightpandaFailureThreshold,
26
+ });
27
+ return false;
28
+ }
29
+ return true;
30
+ }
31
+ catch (err) {
32
+ log.warn('shouldUseLightpanda check failed, defaulting to chromium', {
33
+ domain,
34
+ error: String(err),
35
+ });
36
+ return false;
37
+ }
38
+ }
39
+ export function recordSuccess(domain) {
40
+ try {
41
+ const db = getDatabase();
42
+ db.prepare(`
43
+ INSERT INTO lightpanda_routing (domain, success_count, last_success, last_updated)
44
+ VALUES (?, 1, datetime('now'), datetime('now'))
45
+ ON CONFLICT(domain) DO UPDATE SET
46
+ success_count = success_count + 1,
47
+ last_success = datetime('now'),
48
+ last_updated = datetime('now')
49
+ `).run(domain);
50
+ log.debug('recorded lightpanda success', { domain });
51
+ }
52
+ catch (err) {
53
+ log.warn('failed to record lightpanda success', { domain, error: String(err) });
54
+ }
55
+ }
56
+ export function recordFailure(domain) {
57
+ try {
58
+ const config = getConfig();
59
+ const db = getDatabase();
60
+ db.prepare(`
61
+ INSERT INTO lightpanda_routing (domain, failure_count, last_failure, last_updated)
62
+ VALUES (?, 1, datetime('now'), datetime('now'))
63
+ ON CONFLICT(domain) DO UPDATE SET
64
+ failure_count = failure_count + 1,
65
+ last_failure = datetime('now'),
66
+ last_updated = datetime('now'),
67
+ prefer_chromium = CASE
68
+ WHEN failure_count + 1 >= ?
69
+ THEN 1
70
+ ELSE prefer_chromium
71
+ END
72
+ `).run(domain, config.lightpandaFailureThreshold);
73
+ log.debug('recorded lightpanda failure', { domain });
74
+ }
75
+ catch (err) {
76
+ log.warn('failed to record lightpanda failure', { domain, error: String(err) });
77
+ }
78
+ }
79
+ export function getDomainStats(domain) {
80
+ try {
81
+ const db = getDatabase();
82
+ const row = db.prepare('SELECT * FROM lightpanda_routing WHERE domain = ?').get(domain);
83
+ if (!row)
84
+ return null;
85
+ return {
86
+ domain: row.domain,
87
+ successCount: row.success_count,
88
+ failureCount: row.failure_count,
89
+ preferChromium: row.prefer_chromium === 1,
90
+ lastSuccess: row.last_success ?? undefined,
91
+ lastFailure: row.last_failure ?? undefined,
92
+ };
93
+ }
94
+ catch (err) {
95
+ log.warn('getDomainStats failed', { domain, error: String(err) });
96
+ return null;
97
+ }
98
+ }
99
+ export class LightpandaAdapter {
100
+ browser = null;
101
+ url;
102
+ constructor(url) {
103
+ const config = getConfig();
104
+ this.url = url ?? config.lightpandaUrl ?? 'http://localhost:9222';
105
+ }
106
+ async connect() {
107
+ try {
108
+ const reachable = await isCDPReachable(this.url);
109
+ if (!reachable) {
110
+ log.debug('lightpanda CDP not reachable', { url: this.url });
111
+ return { connected: false, error: 'CDP endpoint not reachable' };
112
+ }
113
+ this.browser = await chromium.connectOverCDP(this.url);
114
+ log.info('connected to lightpanda via CDP', { url: this.url });
115
+ return { connected: true };
116
+ }
117
+ catch (err) {
118
+ log.warn('lightpanda connection failed', {
119
+ url: this.url,
120
+ error: err instanceof Error ? err.message : String(err),
121
+ });
122
+ this.browser = null;
123
+ return {
124
+ connected: false,
125
+ error: err instanceof Error ? err.message : String(err),
126
+ };
127
+ }
128
+ }
129
+ async disconnect() {
130
+ try {
131
+ if (this.browser) {
132
+ await this.browser.close();
133
+ this.browser = null;
134
+ log.debug('disconnected from lightpanda');
135
+ }
136
+ }
137
+ catch (err) {
138
+ log.warn('lightpanda disconnect error', { error: String(err) });
139
+ this.browser = null;
140
+ }
141
+ }
142
+ async isHealthy() {
143
+ try {
144
+ if (!this.browser)
145
+ return false;
146
+ if (typeof this.browser.isConnected === 'function') {
147
+ if (!this.browser.isConnected())
148
+ return false;
149
+ }
150
+ return await isCDPReachable(this.url);
151
+ }
152
+ catch {
153
+ return false;
154
+ }
155
+ }
156
+ async getContext() {
157
+ try {
158
+ if (!this.browser) {
159
+ const result = await this.connect();
160
+ if (!result.connected || !this.browser)
161
+ return null;
162
+ }
163
+ const contexts = this.browser.contexts();
164
+ if (contexts.length > 0)
165
+ return contexts[0];
166
+ return await this.browser.newContext();
167
+ }
168
+ catch (err) {
169
+ log.warn('failed to get lightpanda context', { error: String(err) });
170
+ return null;
171
+ }
172
+ }
173
+ getBrowser() {
174
+ return this.browser;
175
+ }
176
+ }
177
+ //# sourceMappingURL=lightpanda.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lightpanda.js","sourceRoot":"","sources":["../../src/fetch/lightpanda.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA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,IAAI,CAAE,IAAI,CAAC,OAAe,CAAC,WAAW,EAAE;oBAAE,OAAO,KAAK,CAAC;YACzD,CAAC;YAED,OAAO,MAAM,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;gBACpC,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,OAAO;oBAAE,OAAO,IAAI,CAAC;YACtD,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YACzC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC5C,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACzC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACrE,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF"}
@@ -5,6 +5,7 @@ export interface RouterFetchOptions {
5
5
  headers?: Record<string, string>;
6
6
  screenshot?: boolean;
7
7
  actions?: BrowserAction[];
8
+ force_refresh?: boolean;
8
9
  }
9
10
  export interface HttpClient {
10
11
  fetch(url: string, options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/fetch/router.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,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M;YACd,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC;IACJ,CAAC;CACF"}
@@ -14,13 +14,16 @@
14
14
  * Parameter schemas (types, enums, required/optional) belong on the JSON
15
15
  * Schema, not here. Installation/configuration is for humans, not LLMs.
16
16
  */
17
- export declare const WIGOLO_INSTRUCTIONS = "Wigolo is a local-first web access layer: search the open web, fetch pages, crawl sites, and extract structured data. All results land in a local SQLite cache that persists across sessions.\n\n## When to use which tool\n\n- `search` \u2014 you need information on a topic but do not have a URL yet.\n- `fetch` \u2014 you already have a specific URL to read.\n- `crawl` \u2014 you need multiple pages from the same site (docs, wikis, references).\n- `cache` \u2014 you want to know if the content is already on disk from an earlier read.\n- `extract` \u2014 you need specific data points (tables, metadata, schema-shaped fields) rather than a whole page as markdown.\n\n## Check the cache before going to the network\n\nBefore every `search` or `fetch`, consider a `cache` call with the query text or URL pattern. Pages read in this or a prior session return instantly with their full markdown \u2014 no network, no rate limits.\n\n## Pick the right strategy\n\n- For documentation sites, prefer `crawl` with `strategy: \"sitemap\"` \u2014 it is faster and more complete than BFS because it reads sitemap.xml directly.\n- When you only need to discover what pages exist on a site, use `crawl` with `strategy: \"map\"`. It returns URLs only, no content, and is far cheaper than a full crawl. Follow up with targeted `fetch` calls.\n- For structured data (prices, specs, listings, table rows), use `extract` with `mode: \"schema\"` or `mode: \"tables\"`. Reach for `fetch` only when you want the whole page as markdown.\n\n## Scope searches, do not just broaden queries\n\n`search` accepts `include_domains` (e.g. `[\"react.dev\", \"developer.mozilla.org\"]`) and a `category` such as `\"docs\"`, `\"code\"`, `\"news\"`, or `\"papers\"`. A scoped query usually beats a broader query with post-filtering.\n\n## Performance\n\n- `max_results: 3` for focused lookups; `5` is the default; `10+` only for broad research.\n- `fetch` with `section: \"Heading Name\"` returns just the content under that heading. Cheaper and more relevant than the whole page.\n- Repeated fetches of the same URL are free \u2014 served directly from the SQLite cache.\n\n## Capabilities worth knowing\n\n- Localhost URLs work: `http://localhost:3000`, `http://127.0.0.1:8080`, and similar. Useful for reading local dev servers and internal docs.\n- `use_auth: true` on `fetch` and `crawl` reuses the user's configured browser session for pages behind a login.\n- `cache` accepts FTS5 query syntax (`AND`, `OR`, `NOT`, `\"exact phrase\"`) for precise lookups.\n- `crawl` accepts regex `include_patterns` and `exclude_patterns` to stay inside a section of a large site.";
17
+ export declare const WIGOLO_INSTRUCTIONS = "Wigolo is a local-first web access layer: search the open web, fetch pages, crawl sites, extract structured data, find related content, run multi-step research, and execute agent-driven data gathering. All results land in a local SQLite cache that persists across sessions.\n\n## When to use which tool\n\n- `search` -- you need information on a topic but do not have a URL yet. Pass a query string or an array of 3-5 semantically varied keyword forms for broader coverage.\n- `fetch` -- you already have a specific URL to read.\n- `crawl` -- you need multiple pages from the same site (docs, wikis, references).\n- `cache` -- you want to know if the content is already on disk from an earlier read.\n- `extract` -- you need specific data points (tables, metadata, schema-shaped fields) rather than a whole page as markdown.\n- `find_similar` -- you have a URL or concept and want related content from the cache or web. Useful for \"more like this\" discovery.\n- `research` -- you have a complex question that needs multi-step investigation: question decomposition, parallel search, source synthesis into a report. Set `depth` to control thoroughness.\n- `agent` -- you need to gather structured or unstructured data from multiple sources based on a natural-language prompt. Provides full step transparency.\n\n## Routing by intent\n\n| Intent | Tool | Key parameters |\n|--------|------|----------------|\n| Documentation lookup | `search` | `include_domains: [\"react.dev\", \"docs.python.org\"]`, `category: \"docs\"` |\n| Error debugging | `search` | exact error string as query, `category: \"code\"` |\n| Library research | `crawl` | seed URL of docs site, `strategy: \"sitemap\"`, then `cache` for later queries |\n| Related content | `find_similar` | `url` of a known good page, or `concept` as free text |\n| Direct answer | `search` | `format: \"answer\"` for a synthesized direct response |\n| Comprehensive research | `research` | `depth: \"comprehensive\"`, optional `include_domains` to scope |\n| Data gathering | `agent` | natural-language `prompt`, optional `schema` for structured output |\n| Structured extraction | `extract` | `mode: \"schema\"` with a JSON Schema, or `mode: \"tables\"` |\n| Site inventory | `crawl` | `strategy: \"map\"` for URL-only discovery, no content fetched |\n\n## Rapidly changing content\n\nFor news, prices, status pages, release notes, or any content that changes frequently, bypass the cache with `force_refresh: true`:\n\n search({ query: \"...\", force_refresh: true })\n fetch({ url: \"...\", force_refresh: true })\n\nWhen freshness matters more than speed, use `force_refresh`. When speed matters more than freshness (documentation, tutorials, reference pages), let the cache work -- it is much faster.\n\n## Check the cache before going to the network\n\nBefore every `search` or `fetch`, consider a `cache` call with the query text or URL pattern. Pages read in this or a prior session return instantly with their full markdown -- no network, no rate limits. The `research` and `agent` tools check the cache internally, so you do not need a separate call for those.\n\n## Multi-query search strategy\n\nFor broad or exploratory queries, pass an array of 3-5 semantically varied keyword forms rather than a single natural-language question. Example: instead of \"how does React handle state management\", pass `[\"react state management\", \"useState useReducer patterns\", \"react hooks state\", \"react context vs redux\"]`. The search tool deduplicates across sub-queries automatically.\n\n## Pick the right strategy\n\n- For documentation sites, prefer `crawl` with `strategy: \"sitemap\"` -- it is faster and more complete than BFS because it reads sitemap.xml directly.\n- When you only need to discover what pages exist on a site, use `crawl` with `strategy: \"map\"`. It returns URLs only, no content, and is far cheaper than a full crawl. Follow up with targeted `fetch` calls.\n- For structured data (prices, specs, listings, table rows), use `extract` with `mode: \"schema\"` or `mode: \"tables\"`. Reach for `fetch` only when you want the whole page as markdown.\n- For complex questions requiring synthesis from multiple sources, use `research` instead of manually chaining `search` + `fetch` calls.\n- For natural-language data gathering tasks (\"find the pricing for the top 5 CRM tools\"), use `agent` with an optional `schema` to structure the output.\n\n## Scope searches, do not just broaden queries\n\n`search` accepts `include_domains` (e.g. `[\"react.dev\", \"developer.mozilla.org\"]`) and a `category` such as `\"docs\"`, `\"code\"`, `\"news\"`, or `\"papers\"`. A scoped query usually beats a broader query with post-filtering.\n\n## Performance\n\n- `max_results: 3` for focused lookups; `5` is the default; `10+` only for broad research.\n- `fetch` with `section: \"Heading Name\"` returns just the content under that heading. Cheaper and more relevant than the whole page.\n- Repeated fetches of the same URL are free -- served directly from the SQLite cache.\n- `research` with `depth: \"quick\"` is fast (~15s) and sufficient for most factual questions. Reserve `\"comprehensive\"` for topics requiring deep investigation.\n- `agent` respects `max_pages` (default 10) and `max_time_ms` (default 60s) to bound resource usage.\n\n## Capabilities worth knowing\n\n- Localhost URLs work: `http://localhost:3000`, `http://127.0.0.1:8080`, and similar. Useful for reading local dev servers and internal docs.\n- `use_auth: true` on `fetch` and `crawl` reuses the user's configured browser session for pages behind a login.\n- `cache` accepts FTS5 query syntax (`AND`, `OR`, `NOT`, `\"exact phrase\"`) for precise lookups.\n- `crawl` accepts regex `include_patterns` and `exclude_patterns` to stay inside a section of a large site.\n- `find_similar` uses cached embeddings when available -- no network call needed if the content has been seen before.\n- `research` and `agent` use MCP requestSampling for intelligent decomposition and synthesis when the client supports it. Without sampling support, they return raw sources in context format.";
18
18
  export declare const TOOL_DESCRIPTIONS: {
19
- readonly fetch: "Fetch a single URL and return clean markdown. Use when you have a specific URL to read. Automatically detects if JavaScript rendering is needed.\n\nKey parameters:\n- section: extract content under a specific heading (e.g., section: \"API Reference\") faster than reading the whole page\n- use_auth: true to use stored browser session for authenticated/private pages\n- render_js: \"auto\" (default, detects JS need), \"always\" (force browser), \"never\" (HTTP only, fastest)\n- headers: custom HTTP headers if needed\n\nReturns title, markdown content, links, images, and metadata. Result is cached locally subsequent fetches of the same URL return instantly. Works with localhost URLs (localhost:3000, etc.) for reading local dev servers.";
20
- readonly search: "Search the web and return full markdown content from top results. Use for finding information on any topic returns extracted page content, not just snippets.\n\nKey parameters:\n- include_domains/exclude_domains: scope results to specific sites (e.g., include_domains: [\"react.dev\"])\n- category: \"general\", \"news\", \"code\", \"docs\", \"papers\" filters by content type\n- from_date/to_date: ISO dates for time-bounded queries\n- max_results: default 5. Use 3 for focused queries, 10+ for research.\n\nResults include title, URL, relevance_score, and full markdown_content per result. Previously fetched pages are served from local cache.";
21
- readonly crawl: "Crawl a website starting from a URL and return content from multiple pages. Use for indexing documentation sites, wikis, or any multi-page resource.\n\nKey parameters:\n- strategy: \"bfs\" (breadth-first, default), \"dfs\" (depth-first), \"sitemap\" (use sitemap.xml fastest for doc sites), \"map\" (URL discovery only, no content fastest for scoping a site)\n- max_depth: how many links deep to follow (default 2)\n- max_pages: maximum pages to fetch (default 20)\n- include_patterns/exclude_patterns: regex filters on URLs\n\nReturns an array of pages with title, markdown, and depth. Content is deduplicated across pages (repeated nav/headers/footers stripped). All pages are cached for later cache queries.";
22
- readonly cache: "Search previously fetched content without hitting the network. Use before searching the web if relevant content was already fetched or crawled, this returns it instantly.\n\nKey parameters:\n- query: full-text search over cached markdown and titles (supports FTS5 syntax: AND, OR, NOT, \"phrase match\")\n- url_pattern: glob filter on URLs (e.g., \"*react.dev*\")\n- since: ISO date only results cached after this date\n- stats: true to get cache size, entry count, oldest/newest dates\n- clear: true to delete matching entries\n\nReturns matching cached pages with full markdown content. Cache persists across sessions in local SQLite.";
23
- readonly extract: "Extract structured data from a URL or raw HTML. Use when you need specific data points, tables, or metadata rather than full page markdown.\n\nKey parameters:\n- mode: \"selector\" (CSS selector text), \"tables\" (HTML tables JSON rows), \"metadata\" (title/author/date/description), \"schema\" (JSON Schema heuristic field extraction)\n- css_selector: required for mode=\"selector\" any valid CSS selector\n- schema: for mode=\"schema\", a JSON Schema object describing the fields to extract\n- multiple: true to return array of all matches (mode=\"selector\" only)\n\nFor mode=\"tables\", returns array of table objects with headers and row data. For mode=\"schema\", pass { price: \"string\", name: \"string\" } and get structured fields extracted from the page.";
19
+ readonly fetch: "Fetch a single URL and return clean markdown. Use when you have a specific URL to read. Automatically detects if JavaScript rendering is needed.\n\nKey parameters:\n- section: extract content under a specific heading (e.g., section: \"API Reference\") -- faster than reading the whole page\n- use_auth: true to use stored browser session for authenticated/private pages\n- render_js: \"auto\" (default, detects JS need), \"always\" (force browser), \"never\" (HTTP only, fastest)\n- headers: custom HTTP headers if needed\n- force_refresh: true to bypass cache and fetch fresh content from the network\n\nReturns title, markdown content, links, images, and metadata. Result is cached locally -- subsequent fetches of the same URL return instantly. Works with localhost URLs (localhost:3000, etc.) for reading local dev servers.\n\nUse force_refresh: true for pages that change frequently (news sites, changelogs, dashboards, API status pages). By default, previously fetched pages are served from local cache for speed.";
20
+ readonly search: "Search the web and return full markdown content from top results. Use for finding information on any topic -- returns extracted page content, not just snippets.\n\nKey parameters:\n- query: a search string, or an array of 3-5 semantically varied keyword forms for broader coverage. Arrays are deduplicated and merged automatically.\n- include_domains/exclude_domains: scope results to specific sites (e.g., include_domains: [\"react.dev\"])\n- category: \"general\", \"news\", \"code\", \"docs\", \"papers\" -- filters by content type\n- from_date/to_date: ISO dates for time-bounded queries\n- max_results: default 5. Use 3 for focused queries, 10+ for research.\n- format: \"full\" (default, structured JSON), \"context\" (single token-budgeted string for LLM injection), \"answer\" (synthesized direct answer via requestSampling), \"stream_answer\" (same as answer, with MCP progress notifications emitted between pipeline phases)\n- force_refresh: true to bypass all caches (search results and page content)\n\nThe \"answer\" format uses the MCP client's sampling capability to synthesize a direct response from search results. If sampling is not supported, falls back to \"context\" format. \"stream_answer\" emits notifications/progress messages at each pipeline phase (search, fetch, synthesize) when the client provides a progressToken via request._meta — token-level streaming of the LLM response is not supported by MCP sampling, so the answer itself still arrives as one block.\n\nResults include title, URL, relevance_score, and full markdown_content per result. Previously fetched pages are served from local cache.\n\nUse force_refresh: true when you need current information that may have changed since the last search. Default behavior uses cached results when available.";
21
+ readonly crawl: "Crawl a website starting from a URL and return content from multiple pages. Use for indexing documentation sites, wikis, or any multi-page resource.\n\nKey parameters:\n- strategy: \"bfs\" (breadth-first, default), \"dfs\" (depth-first), \"sitemap\" (use sitemap.xml -- fastest for doc sites), \"map\" (URL discovery only, no content -- fastest for scoping a site)\n- max_depth: how many links deep to follow (default 2)\n- max_pages: maximum pages to fetch (default 20)\n- include_patterns/exclude_patterns: regex filters on URLs\n\nReturns an array of pages with title, markdown, and depth. Content is deduplicated across pages (repeated nav/headers/footers stripped). All pages are cached for later cache queries.";
22
+ readonly cache: "Search previously fetched content without hitting the network. Use before searching the web -- if relevant content was already fetched or crawled, this returns it instantly.\n\nKey parameters:\n- query: full-text search over cached markdown and titles (supports FTS5 syntax: AND, OR, NOT, \"phrase match\")\n- url_pattern: glob filter on URLs (e.g., \"*example.com*\")\n- since: ISO date -- only results cached after this date\n- stats: true to get cache size, entry count, oldest/newest dates\n- clear: true to delete matching entries\n\nReturns matching cached pages with full markdown content. Cache persists across sessions in local SQLite.";
23
+ readonly extract: "Extract structured data from a URL or raw HTML. Use when you need specific data points, tables, or metadata rather than full page markdown.\n\nKey parameters:\n- mode: \"selector\" (CSS selector -> text), \"tables\" (HTML tables -> JSON rows), \"metadata\" (title/author/date/description), \"schema\" (JSON Schema -> heuristic field extraction)\n- css_selector: required for mode=\"selector\" -- any valid CSS selector\n- schema: for mode=\"schema\", a JSON Schema object describing the fields to extract\n- multiple: true to return array of all matches (mode=\"selector\" only)\n\nFor mode=\"tables\", returns array of table objects with headers and row data. For mode=\"schema\", pass { price: \"string\", name: \"string\" } and get structured fields extracted from the page.";
24
+ readonly find_similar: "Find content related to a URL or concept. Use when you have a known-good page or topic and want to discover similar resources from the cache or web.\n\nKey parameters:\n- url: a URL to find content similar to. The page's content and embeddings are used for similarity matching.\n- concept: free-text description of what you want similar content for. Use when you do not have a specific URL.\n- max_results: number of similar items to return (default 5)\n- include_cached: true (default) to search the local cache first, false to skip cache and search the web only\n- threshold: minimum similarity score (0-1, default 0.5) -- higher values return fewer, more relevant results\n\nProvide either url or concept (not both). Results are ranked by cosine similarity of embeddings. Cached content with embeddings is searched first for instant results. If fewer than max_results are found in cache, a web search supplements the results.\n\nReturns title, URL, similarity_score, and markdown_content per result.";
25
+ readonly research: "Run multi-step research on a complex question. Decomposes the question into sub-queries, searches in parallel, fetches top sources, and synthesizes a report with citations.\n\nKey parameters:\n- question: the research question to investigate\n- depth: \"quick\" (~15s, 2 sub-queries, 5-8 sources), \"standard\" (~40s, 4 sub-queries, 10-15 sources, default), \"comprehensive\" (~80s, 7 sub-queries, 20-25 sources)\n- max_sources: override the default source count for the chosen depth\n- include_domains/exclude_domains: scope research to specific sites\n- schema: optional JSON Schema -- if provided, the report is structured to extract fields matching the schema\n- stream: true to receive progress notifications as each research phase completes\n\nThe pipeline: (1) decompose question into sub-queries, (2) parallel search across sub-queries, (3) fetch and extract top unique sources, (4) synthesize report with citations from all sources, (5) optionally structure report fields if schema is provided.\n\nUses MCP requestSampling for intelligent decomposition and synthesis. Without sampling support, returns raw sources in context format with sampling_supported: false.\n\nReturns report (markdown), citations array, sources with full content, sub_queries used, depth level, and total_time_ms.";
26
+ readonly agent: "Execute a natural-language data gathering task. Plans search queries and URLs from a prompt, executes them in parallel, and synthesizes results. Full step transparency.\n\nKey parameters:\n- prompt: natural-language description of what data to gather (e.g., \"find pricing for the top 5 CRM tools\")\n- urls: optional array of specific URLs to include in the gathering\n- schema: optional JSON Schema -- if provided, extracts structured data matching the schema from each page and merges results\n- max_pages: maximum pages to fetch (default 10)\n- max_time_ms: maximum execution time in milliseconds (default 60000)\n- stream: true to receive progress notifications as each step completes\n\nThe pipeline: (1) plan -- interpret prompt to determine search queries and URLs to visit, (2) execute -- run searches and fetch URLs in parallel within budget, (3) extract -- if schema provided, apply schema extraction to each page and merge, (4) synthesize -- produce natural-language or structured result.\n\nThe steps array in the output provides full transparency into every action taken (plan, search, fetch, extract, synthesize) with timing. This differentiates from black-box alternatives.\n\nUses MCP requestSampling for planning and synthesis. Without sampling support, uses keyword extraction for planning and returns raw content.\n\nReturns result (string or structured object), sources array, pages_fetched count, steps array with action/detail/time_ms, total_time_ms, and sampling_supported flag.";
24
27
  };
25
28
  export type ToolName = keyof typeof TOOL_DESCRIPTIONS;
26
29
  //# sourceMappingURL=instructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,olFAmCkF,CAAC;AAEnH,eAAO,MAAM,iBAAiB;;;;;;CAmDpB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,iBAAiB,CAAC"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,i/LAuEmK,CAAC;AAEpM,eAAO,MAAM,iBAAiB;;;;;;;;;CA4GpB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,iBAAiB,CAAC"}
@@ -14,25 +14,57 @@
14
14
  * Parameter schemas (types, enums, required/optional) belong on the JSON
15
15
  * Schema, not here. Installation/configuration is for humans, not LLMs.
16
16
  */
17
- export const WIGOLO_INSTRUCTIONS = `Wigolo is a local-first web access layer: search the open web, fetch pages, crawl sites, and extract structured data. All results land in a local SQLite cache that persists across sessions.
17
+ export const WIGOLO_INSTRUCTIONS = `Wigolo is a local-first web access layer: search the open web, fetch pages, crawl sites, extract structured data, find related content, run multi-step research, and execute agent-driven data gathering. All results land in a local SQLite cache that persists across sessions.
18
18
 
19
19
  ## When to use which tool
20
20
 
21
- - \`search\` you need information on a topic but do not have a URL yet.
22
- - \`fetch\` you already have a specific URL to read.
23
- - \`crawl\` you need multiple pages from the same site (docs, wikis, references).
24
- - \`cache\` you want to know if the content is already on disk from an earlier read.
25
- - \`extract\` you need specific data points (tables, metadata, schema-shaped fields) rather than a whole page as markdown.
21
+ - \`search\` -- you need information on a topic but do not have a URL yet. Pass a query string or an array of 3-5 semantically varied keyword forms for broader coverage.
22
+ - \`fetch\` -- you already have a specific URL to read.
23
+ - \`crawl\` -- you need multiple pages from the same site (docs, wikis, references).
24
+ - \`cache\` -- you want to know if the content is already on disk from an earlier read.
25
+ - \`extract\` -- you need specific data points (tables, metadata, schema-shaped fields) rather than a whole page as markdown.
26
+ - \`find_similar\` -- you have a URL or concept and want related content from the cache or web. Useful for "more like this" discovery.
27
+ - \`research\` -- you have a complex question that needs multi-step investigation: question decomposition, parallel search, source synthesis into a report. Set \`depth\` to control thoroughness.
28
+ - \`agent\` -- you need to gather structured or unstructured data from multiple sources based on a natural-language prompt. Provides full step transparency.
29
+
30
+ ## Routing by intent
31
+
32
+ | Intent | Tool | Key parameters |
33
+ |--------|------|----------------|
34
+ | Documentation lookup | \`search\` | \`include_domains: ["react.dev", "docs.python.org"]\`, \`category: "docs"\` |
35
+ | Error debugging | \`search\` | exact error string as query, \`category: "code"\` |
36
+ | Library research | \`crawl\` | seed URL of docs site, \`strategy: "sitemap"\`, then \`cache\` for later queries |
37
+ | Related content | \`find_similar\` | \`url\` of a known good page, or \`concept\` as free text |
38
+ | Direct answer | \`search\` | \`format: "answer"\` for a synthesized direct response |
39
+ | Comprehensive research | \`research\` | \`depth: "comprehensive"\`, optional \`include_domains\` to scope |
40
+ | Data gathering | \`agent\` | natural-language \`prompt\`, optional \`schema\` for structured output |
41
+ | Structured extraction | \`extract\` | \`mode: "schema"\` with a JSON Schema, or \`mode: "tables"\` |
42
+ | Site inventory | \`crawl\` | \`strategy: "map"\` for URL-only discovery, no content fetched |
43
+
44
+ ## Rapidly changing content
45
+
46
+ For news, prices, status pages, release notes, or any content that changes frequently, bypass the cache with \`force_refresh: true\`:
47
+
48
+ search({ query: "...", force_refresh: true })
49
+ fetch({ url: "...", force_refresh: true })
50
+
51
+ When freshness matters more than speed, use \`force_refresh\`. When speed matters more than freshness (documentation, tutorials, reference pages), let the cache work -- it is much faster.
26
52
 
27
53
  ## Check the cache before going to the network
28
54
 
29
- Before every \`search\` or \`fetch\`, consider a \`cache\` call with the query text or URL pattern. Pages read in this or a prior session return instantly with their full markdown no network, no rate limits.
55
+ Before every \`search\` or \`fetch\`, consider a \`cache\` call with the query text or URL pattern. Pages read in this or a prior session return instantly with their full markdown -- no network, no rate limits. The \`research\` and \`agent\` tools check the cache internally, so you do not need a separate call for those.
56
+
57
+ ## Multi-query search strategy
58
+
59
+ For broad or exploratory queries, pass an array of 3-5 semantically varied keyword forms rather than a single natural-language question. Example: instead of "how does React handle state management", pass \`["react state management", "useState useReducer patterns", "react hooks state", "react context vs redux"]\`. The search tool deduplicates across sub-queries automatically.
30
60
 
31
61
  ## Pick the right strategy
32
62
 
33
- - For documentation sites, prefer \`crawl\` with \`strategy: "sitemap"\` it is faster and more complete than BFS because it reads sitemap.xml directly.
63
+ - For documentation sites, prefer \`crawl\` with \`strategy: "sitemap"\` -- it is faster and more complete than BFS because it reads sitemap.xml directly.
34
64
  - When you only need to discover what pages exist on a site, use \`crawl\` with \`strategy: "map"\`. It returns URLs only, no content, and is far cheaper than a full crawl. Follow up with targeted \`fetch\` calls.
35
65
  - For structured data (prices, specs, listings, table rows), use \`extract\` with \`mode: "schema"\` or \`mode: "tables"\`. Reach for \`fetch\` only when you want the whole page as markdown.
66
+ - For complex questions requiring synthesis from multiple sources, use \`research\` instead of manually chaining \`search\` + \`fetch\` calls.
67
+ - For natural-language data gathering tasks ("find the pricing for the top 5 CRM tools"), use \`agent\` with an optional \`schema\` to structure the output.
36
68
 
37
69
  ## Scope searches, do not just broaden queries
38
70
 
@@ -42,48 +74,62 @@ Before every \`search\` or \`fetch\`, consider a \`cache\` call with the query t
42
74
 
43
75
  - \`max_results: 3\` for focused lookups; \`5\` is the default; \`10+\` only for broad research.
44
76
  - \`fetch\` with \`section: "Heading Name"\` returns just the content under that heading. Cheaper and more relevant than the whole page.
45
- - Repeated fetches of the same URL are free served directly from the SQLite cache.
77
+ - Repeated fetches of the same URL are free -- served directly from the SQLite cache.
78
+ - \`research\` with \`depth: "quick"\` is fast (~15s) and sufficient for most factual questions. Reserve \`"comprehensive"\` for topics requiring deep investigation.
79
+ - \`agent\` respects \`max_pages\` (default 10) and \`max_time_ms\` (default 60s) to bound resource usage.
46
80
 
47
81
  ## Capabilities worth knowing
48
82
 
49
83
  - Localhost URLs work: \`http://localhost:3000\`, \`http://127.0.0.1:8080\`, and similar. Useful for reading local dev servers and internal docs.
50
84
  - \`use_auth: true\` on \`fetch\` and \`crawl\` reuses the user's configured browser session for pages behind a login.
51
85
  - \`cache\` accepts FTS5 query syntax (\`AND\`, \`OR\`, \`NOT\`, \`"exact phrase"\`) for precise lookups.
52
- - \`crawl\` accepts regex \`include_patterns\` and \`exclude_patterns\` to stay inside a section of a large site.`;
86
+ - \`crawl\` accepts regex \`include_patterns\` and \`exclude_patterns\` to stay inside a section of a large site.
87
+ - \`find_similar\` uses cached embeddings when available -- no network call needed if the content has been seen before.
88
+ - \`research\` and \`agent\` use MCP requestSampling for intelligent decomposition and synthesis when the client supports it. Without sampling support, they return raw sources in context format.`;
53
89
  export const TOOL_DESCRIPTIONS = {
54
90
  fetch: `Fetch a single URL and return clean markdown. Use when you have a specific URL to read. Automatically detects if JavaScript rendering is needed.
55
91
 
56
92
  Key parameters:
57
- - section: extract content under a specific heading (e.g., section: "API Reference") faster than reading the whole page
93
+ - section: extract content under a specific heading (e.g., section: "API Reference") -- faster than reading the whole page
58
94
  - use_auth: true to use stored browser session for authenticated/private pages
59
95
  - render_js: "auto" (default, detects JS need), "always" (force browser), "never" (HTTP only, fastest)
60
96
  - headers: custom HTTP headers if needed
97
+ - force_refresh: true to bypass cache and fetch fresh content from the network
98
+
99
+ Returns title, markdown content, links, images, and metadata. Result is cached locally -- subsequent fetches of the same URL return instantly. Works with localhost URLs (localhost:3000, etc.) for reading local dev servers.
61
100
 
62
- Returns title, markdown content, links, images, and metadata. Result is cached locally subsequent fetches of the same URL return instantly. Works with localhost URLs (localhost:3000, etc.) for reading local dev servers.`,
63
- search: `Search the web and return full markdown content from top results. Use for finding information on any topic returns extracted page content, not just snippets.
101
+ Use force_refresh: true for pages that change frequently (news sites, changelogs, dashboards, API status pages). By default, previously fetched pages are served from local cache for speed.`,
102
+ search: `Search the web and return full markdown content from top results. Use for finding information on any topic -- returns extracted page content, not just snippets.
64
103
 
65
104
  Key parameters:
105
+ - query: a search string, or an array of 3-5 semantically varied keyword forms for broader coverage. Arrays are deduplicated and merged automatically.
66
106
  - include_domains/exclude_domains: scope results to specific sites (e.g., include_domains: ["react.dev"])
67
- - category: "general", "news", "code", "docs", "papers" filters by content type
107
+ - category: "general", "news", "code", "docs", "papers" -- filters by content type
68
108
  - from_date/to_date: ISO dates for time-bounded queries
69
109
  - max_results: default 5. Use 3 for focused queries, 10+ for research.
110
+ - format: "full" (default, structured JSON), "context" (single token-budgeted string for LLM injection), "answer" (synthesized direct answer via requestSampling), "stream_answer" (same as answer, with MCP progress notifications emitted between pipeline phases)
111
+ - force_refresh: true to bypass all caches (search results and page content)
112
+
113
+ The "answer" format uses the MCP client's sampling capability to synthesize a direct response from search results. If sampling is not supported, falls back to "context" format. "stream_answer" emits notifications/progress messages at each pipeline phase (search, fetch, synthesize) when the client provides a progressToken via request._meta — token-level streaming of the LLM response is not supported by MCP sampling, so the answer itself still arrives as one block.
70
114
 
71
- Results include title, URL, relevance_score, and full markdown_content per result. Previously fetched pages are served from local cache.`,
115
+ Results include title, URL, relevance_score, and full markdown_content per result. Previously fetched pages are served from local cache.
116
+
117
+ Use force_refresh: true when you need current information that may have changed since the last search. Default behavior uses cached results when available.`,
72
118
  crawl: `Crawl a website starting from a URL and return content from multiple pages. Use for indexing documentation sites, wikis, or any multi-page resource.
73
119
 
74
120
  Key parameters:
75
- - strategy: "bfs" (breadth-first, default), "dfs" (depth-first), "sitemap" (use sitemap.xml fastest for doc sites), "map" (URL discovery only, no content fastest for scoping a site)
121
+ - strategy: "bfs" (breadth-first, default), "dfs" (depth-first), "sitemap" (use sitemap.xml -- fastest for doc sites), "map" (URL discovery only, no content -- fastest for scoping a site)
76
122
  - max_depth: how many links deep to follow (default 2)
77
123
  - max_pages: maximum pages to fetch (default 20)
78
124
  - include_patterns/exclude_patterns: regex filters on URLs
79
125
 
80
126
  Returns an array of pages with title, markdown, and depth. Content is deduplicated across pages (repeated nav/headers/footers stripped). All pages are cached for later cache queries.`,
81
- cache: `Search previously fetched content without hitting the network. Use before searching the web if relevant content was already fetched or crawled, this returns it instantly.
127
+ cache: `Search previously fetched content without hitting the network. Use before searching the web -- if relevant content was already fetched or crawled, this returns it instantly.
82
128
 
83
129
  Key parameters:
84
130
  - query: full-text search over cached markdown and titles (supports FTS5 syntax: AND, OR, NOT, "phrase match")
85
- - url_pattern: glob filter on URLs (e.g., "*react.dev*")
86
- - since: ISO date only results cached after this date
131
+ - url_pattern: glob filter on URLs (e.g., "*example.com*")
132
+ - since: ISO date -- only results cached after this date
87
133
  - stats: true to get cache size, entry count, oldest/newest dates
88
134
  - clear: true to delete matching entries
89
135
 
@@ -91,11 +137,55 @@ Returns matching cached pages with full markdown content. Cache persists across
91
137
  extract: `Extract structured data from a URL or raw HTML. Use when you need specific data points, tables, or metadata rather than full page markdown.
92
138
 
93
139
  Key parameters:
94
- - mode: "selector" (CSS selector text), "tables" (HTML tables JSON rows), "metadata" (title/author/date/description), "schema" (JSON Schema heuristic field extraction)
95
- - css_selector: required for mode="selector" any valid CSS selector
140
+ - mode: "selector" (CSS selector -> text), "tables" (HTML tables -> JSON rows), "metadata" (title/author/date/description), "schema" (JSON Schema -> heuristic field extraction)
141
+ - css_selector: required for mode="selector" -- any valid CSS selector
96
142
  - schema: for mode="schema", a JSON Schema object describing the fields to extract
97
143
  - multiple: true to return array of all matches (mode="selector" only)
98
144
 
99
145
  For mode="tables", returns array of table objects with headers and row data. For mode="schema", pass { price: "string", name: "string" } and get structured fields extracted from the page.`,
146
+ find_similar: `Find content related to a URL or concept. Use when you have a known-good page or topic and want to discover similar resources from the cache or web.
147
+
148
+ Key parameters:
149
+ - url: a URL to find content similar to. The page's content and embeddings are used for similarity matching.
150
+ - concept: free-text description of what you want similar content for. Use when you do not have a specific URL.
151
+ - max_results: number of similar items to return (default 5)
152
+ - include_cached: true (default) to search the local cache first, false to skip cache and search the web only
153
+ - threshold: minimum similarity score (0-1, default 0.5) -- higher values return fewer, more relevant results
154
+
155
+ Provide either url or concept (not both). Results are ranked by cosine similarity of embeddings. Cached content with embeddings is searched first for instant results. If fewer than max_results are found in cache, a web search supplements the results.
156
+
157
+ Returns title, URL, similarity_score, and markdown_content per result.`,
158
+ research: `Run multi-step research on a complex question. Decomposes the question into sub-queries, searches in parallel, fetches top sources, and synthesizes a report with citations.
159
+
160
+ Key parameters:
161
+ - question: the research question to investigate
162
+ - depth: "quick" (~15s, 2 sub-queries, 5-8 sources), "standard" (~40s, 4 sub-queries, 10-15 sources, default), "comprehensive" (~80s, 7 sub-queries, 20-25 sources)
163
+ - max_sources: override the default source count for the chosen depth
164
+ - include_domains/exclude_domains: scope research to specific sites
165
+ - schema: optional JSON Schema -- if provided, the report is structured to extract fields matching the schema
166
+ - stream: true to receive progress notifications as each research phase completes
167
+
168
+ The pipeline: (1) decompose question into sub-queries, (2) parallel search across sub-queries, (3) fetch and extract top unique sources, (4) synthesize report with citations from all sources, (5) optionally structure report fields if schema is provided.
169
+
170
+ Uses MCP requestSampling for intelligent decomposition and synthesis. Without sampling support, returns raw sources in context format with sampling_supported: false.
171
+
172
+ Returns report (markdown), citations array, sources with full content, sub_queries used, depth level, and total_time_ms.`,
173
+ agent: `Execute a natural-language data gathering task. Plans search queries and URLs from a prompt, executes them in parallel, and synthesizes results. Full step transparency.
174
+
175
+ Key parameters:
176
+ - prompt: natural-language description of what data to gather (e.g., "find pricing for the top 5 CRM tools")
177
+ - urls: optional array of specific URLs to include in the gathering
178
+ - schema: optional JSON Schema -- if provided, extracts structured data matching the schema from each page and merges results
179
+ - max_pages: maximum pages to fetch (default 10)
180
+ - max_time_ms: maximum execution time in milliseconds (default 60000)
181
+ - stream: true to receive progress notifications as each step completes
182
+
183
+ The pipeline: (1) plan -- interpret prompt to determine search queries and URLs to visit, (2) execute -- run searches and fetch URLs in parallel within budget, (3) extract -- if schema provided, apply schema extraction to each page and merge, (4) synthesize -- produce natural-language or structured result.
184
+
185
+ The steps array in the output provides full transparency into every action taken (plan, search, fetch, extract, synthesize) with timing. This differentiates from black-box alternatives.
186
+
187
+ Uses MCP requestSampling for planning and synthesis. Without sampling support, uses keyword extraction for planning and returns raw content.
188
+
189
+ Returns result (string or structured object), sources array, pages_fetched count, steps array with action/detail/time_ms, total_time_ms, and sampling_supported flag.`,
100
190
  };
101
191
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHAmC+E,CAAC;AAEnH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE;;;;;;;;8NAQqN;IAE5N,MAAM,EAAE;;;;;;;;yIAQ+H;IAEvI,KAAK,EAAE;;;;;;;;uLAQ8K;IAErL,KAAK,EAAE;;;;;;;;;0GASiG;IAExG,OAAO,EAAE;;;;;;;;4LAQiL;CAClL,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mMAuEgK,CAAC;AAEpM,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE;;;;;;;;;;;6LAWoL;IAE3L,MAAM,EAAE;;;;;;;;;;;;;;;4JAekJ;IAE1J,KAAK,EAAE;;;;;;;;uLAQ8K;IAErL,KAAK,EAAE;;;;;;;;;0GASiG;IAExG,OAAO,EAAE;;;;;;;;4LAQiL;IAE1L,YAAY,EAAE;;;;;;;;;;;uEAWuD;IAErE,QAAQ,EAAE;;;;;;;;;;;;;;yHAc6G;IAEvH,KAAK,EAAE;;;;;;;;;;;;;;;;sKAgB6J;CAC5J,CAAC"}
package/dist/logger.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- type Module = 'fetch' | 'search' | 'crawl' | 'cache' | 'extract' | 'searxng' | 'server' | 'cli' | 'jsonld' | 'repl';
1
+ type Module = 'fetch' | 'search' | 'crawl' | 'cache' | 'extract' | 'searxng' | 'server' | 'cli' | 'jsonld' | 'repl' | 'embedding' | 'research' | 'agent';
2
2
  export interface Logger {
3
3
  debug(msg: string, data?: Record<string, unknown>): void;
4
4
  info(msg: string, data?: Record<string, unknown>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAGA,KAAK,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AASpH,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC1D;AAmBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAiBnD"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAGA,KAAK,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC;AASzJ,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC1D;AAmBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAiBnD"}
@@ -0,0 +1,5 @@
1
+ import type { AgentOutput } from '../../types.js';
2
+ import type { ParsedArgs } from '../parser.js';
3
+ import type { ReplDeps } from './types.js';
4
+ export declare function executeAgent(args: ParsedArgs, deps: ReplDeps): Promise<AgentOutput>;
5
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM3C,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CA6CzF"}
@@ -0,0 +1,48 @@
1
+ import { handleAgent } from '../../tools/agent.js';
2
+ import { createLogger } from '../../logger.js';
3
+ const log = createLogger('repl');
4
+ export async function executeAgent(args, deps) {
5
+ try {
6
+ const prompt = args.positional.join(' ').trim();
7
+ if (!prompt) {
8
+ return {
9
+ result: '',
10
+ sources: [],
11
+ pages_fetched: 0,
12
+ steps: [],
13
+ total_time_ms: 0,
14
+ sampling_supported: false,
15
+ error: 'Usage: agent <prompt> [--urls=u1,u2] [--max-pages=N] [--max-time=MS]',
16
+ };
17
+ }
18
+ const input = { prompt };
19
+ if (args.flags.urls) {
20
+ input.urls = args.flags.urls.split(',').map(u => u.trim());
21
+ }
22
+ if (args.flags['max-pages']) {
23
+ input.max_pages = parseInt(args.flags['max-pages'], 10);
24
+ }
25
+ if (args.flags['max-time']) {
26
+ input.max_time_ms = parseInt(args.flags['max-time'], 10);
27
+ }
28
+ if (args.flags['max-time-ms']) {
29
+ input.max_time_ms = parseInt(args.flags['max-time-ms'], 10);
30
+ }
31
+ log.debug('executing agent command', { prompt, flags: args.flags });
32
+ return await handleAgent(input, deps.engines, deps.router, deps.backendStatus);
33
+ }
34
+ catch (err) {
35
+ const msg = err instanceof Error ? err.message : String(err);
36
+ log.error('agent command failed', { error: msg });
37
+ return {
38
+ result: '',
39
+ sources: [],
40
+ pages_fetched: 0,
41
+ steps: [],
42
+ total_time_ms: 0,
43
+ sampling_supported: false,
44
+ error: msg,
45
+ };
46
+ }
47
+ }
48
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/repl/commands/agent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAgB,EAAE,IA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AM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACpE,OAAO,MAAM,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,GAAG,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QAClD,OAAO;YACL,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,CAAC;YAChB,kBAAkB,EAAE,KAAK;YACzB,KAAK,EAAE,GAAG;SACX,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { FindSimilarOutput } from '../../types.js';
2
+ import type { ParsedArgs } from '../parser.js';
3
+ import type { ReplDeps } from './types.js';
4
+ export declare function executeFindSimilar(args: ParsedArgs, deps: ReplDeps): Promise<FindSimilarOutput>;
5
+ //# sourceMappingURL=find-similar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-similar.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/find-similar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM3C,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,iBAAiB,CAAC,CA2D5B"}