@staticn0va/wigolo 0.6.2 → 0.6.4
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/SKILL.md +30 -8
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +12 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +162 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/setup-mcp.d.ts +2 -0
- package/dist/cli/setup-mcp.d.ts.map +1 -0
- package/dist/cli/setup-mcp.js +116 -0
- package/dist/cli/setup-mcp.js.map +1 -0
- package/dist/cli/status.d.ts +2 -0
- package/dist/cli/status.d.ts.map +1 -0
- package/dist/cli/status.js +32 -0
- package/dist/cli/status.js.map +1 -0
- package/dist/cli/tui/agents-types.d.ts +28 -0
- package/dist/cli/tui/agents-types.d.ts.map +1 -0
- package/dist/cli/tui/agents-types.js +2 -0
- package/dist/cli/tui/agents-types.js.map +1 -0
- package/dist/cli/tui/agents.d.ts +11 -0
- package/dist/cli/tui/agents.d.ts.map +1 -0
- package/dist/cli/tui/agents.js +101 -0
- package/dist/cli/tui/agents.js.map +1 -0
- package/dist/cli/tui/banner.d.ts +3 -0
- package/dist/cli/tui/banner.d.ts.map +1 -0
- package/dist/cli/tui/banner.js +25 -0
- package/dist/cli/tui/banner.js.map +1 -0
- package/dist/cli/tui/config-writer-cli.d.ts +12 -0
- package/dist/cli/tui/config-writer-cli.d.ts.map +1 -0
- package/dist/cli/tui/config-writer-cli.js +33 -0
- package/dist/cli/tui/config-writer-cli.js.map +1 -0
- package/dist/cli/tui/config-writer-json.d.ts +16 -0
- package/dist/cli/tui/config-writer-json.d.ts.map +1 -0
- package/dist/cli/tui/config-writer-json.js +89 -0
- package/dist/cli/tui/config-writer-json.js.map +1 -0
- package/dist/cli/tui/config-writer-toml.d.ts +16 -0
- package/dist/cli/tui/config-writer-toml.d.ts.map +1 -0
- package/dist/cli/tui/config-writer-toml.js +88 -0
- package/dist/cli/tui/config-writer-toml.js.map +1 -0
- package/dist/cli/tui/config-writer.d.ts +25 -0
- package/dist/cli/tui/config-writer.d.ts.map +1 -0
- package/dist/cli/tui/config-writer.js +98 -0
- package/dist/cli/tui/config-writer.js.map +1 -0
- package/dist/cli/tui/detect-helpers.d.ts +6 -0
- package/dist/cli/tui/detect-helpers.d.ts.map +1 -0
- package/dist/cli/tui/detect-helpers.js +44 -0
- package/dist/cli/tui/detect-helpers.js.map +1 -0
- package/dist/cli/tui/flags-types.d.ts +19 -0
- package/dist/cli/tui/flags-types.d.ts.map +1 -0
- package/dist/cli/tui/flags-types.js +19 -0
- package/dist/cli/tui/flags-types.js.map +1 -0
- package/dist/cli/tui/flags.d.ts +5 -0
- package/dist/cli/tui/flags.d.ts.map +1 -0
- package/dist/cli/tui/flags.js +124 -0
- package/dist/cli/tui/flags.js.map +1 -0
- package/dist/cli/tui/format.d.ts +14 -0
- package/dist/cli/tui/format.d.ts.map +1 -0
- package/dist/cli/tui/format.js +28 -0
- package/dist/cli/tui/format.js.map +1 -0
- package/dist/cli/tui/reporter-auto.d.ts +7 -0
- package/dist/cli/tui/reporter-auto.d.ts.map +1 -0
- package/dist/cli/tui/reporter-auto.js +15 -0
- package/dist/cli/tui/reporter-auto.js.map +1 -0
- package/dist/cli/tui/reporter.d.ts +26 -0
- package/dist/cli/tui/reporter.d.ts.map +1 -0
- package/dist/cli/tui/reporter.js +31 -0
- package/dist/cli/tui/reporter.js.map +1 -0
- package/dist/cli/tui/run-command.d.ts +14 -0
- package/dist/cli/tui/run-command.d.ts.map +1 -0
- package/dist/cli/tui/run-command.js +73 -0
- package/dist/cli/tui/run-command.js.map +1 -0
- package/dist/cli/tui/select-agents.d.ts +6 -0
- package/dist/cli/tui/select-agents.d.ts.map +1 -0
- package/dist/cli/tui/select-agents.js +28 -0
- package/dist/cli/tui/select-agents.js.map +1 -0
- package/dist/cli/tui/status-agents.d.ts +11 -0
- package/dist/cli/tui/status-agents.d.ts.map +1 -0
- package/dist/cli/tui/status-agents.js +53 -0
- package/dist/cli/tui/status-agents.js.map +1 -0
- package/dist/cli/tui/status-cache.d.ts +6 -0
- package/dist/cli/tui/status-cache.d.ts.map +1 -0
- package/dist/cli/tui/status-cache.js +39 -0
- package/dist/cli/tui/status-cache.js.map +1 -0
- package/dist/cli/tui/status-format.d.ts +15 -0
- package/dist/cli/tui/status-format.d.ts.map +1 -0
- package/dist/cli/tui/status-format.js +45 -0
- package/dist/cli/tui/status-format.js.map +1 -0
- package/dist/cli/tui/status-python.d.ts +7 -0
- package/dist/cli/tui/status-python.d.ts.map +1 -0
- package/dist/cli/tui/status-python.js +24 -0
- package/dist/cli/tui/status-python.js.map +1 -0
- package/dist/cli/tui/system-check.d.ts +24 -0
- package/dist/cli/tui/system-check.d.ts.map +1 -0
- package/dist/cli/tui/system-check.js +101 -0
- package/dist/cli/tui/system-check.js.map +1 -0
- package/dist/cli/tui/tui-reporter.d.ts +19 -0
- package/dist/cli/tui/tui-reporter.d.ts.map +1 -0
- package/dist/cli/tui/tui-reporter.js +94 -0
- package/dist/cli/tui/tui-reporter.js.map +1 -0
- package/dist/cli/tui/verify-suggestions.d.ts +5 -0
- package/dist/cli/tui/verify-suggestions.d.ts.map +1 -0
- package/dist/cli/tui/verify-suggestions.js +25 -0
- package/dist/cli/tui/verify-suggestions.js.map +1 -0
- package/dist/cli/tui/verify.d.ts +19 -0
- package/dist/cli/tui/verify.d.ts.map +1 -0
- package/dist/cli/tui/verify.js +138 -0
- package/dist/cli/tui/verify.js.map +1 -0
- package/dist/cli/tui/version.d.ts +2 -0
- package/dist/cli/tui/version.d.ts.map +1 -0
- package/dist/cli/tui/version.js +12 -0
- package/dist/cli/tui/version.js.map +1 -0
- package/dist/cli/warmup.d.ts +2 -1
- package/dist/cli/warmup.d.ts.map +1 -1
- package/dist/cli/warmup.js +147 -208
- package/dist/cli/warmup.js.map +1 -1
- package/dist/daemon/http-server.js +1 -1
- package/dist/daemon/http-server.js.map +1 -1
- package/dist/embedding/embed.d.ts +0 -1
- package/dist/embedding/embed.d.ts.map +1 -1
- package/dist/embedding/embed.js +0 -3
- package/dist/embedding/embed.js.map +1 -1
- package/dist/extraction/extract.d.ts.map +1 -1
- package/dist/extraction/extract.js +6 -0
- package/dist/extraction/extract.js.map +1 -1
- package/dist/extraction/markdown.d.ts +2 -0
- package/dist/extraction/markdown.d.ts.map +1 -1
- package/dist/extraction/markdown.js +70 -0
- package/dist/extraction/markdown.js.map +1 -1
- package/dist/extraction/pipeline.d.ts.map +1 -1
- package/dist/extraction/pipeline.js +32 -7
- package/dist/extraction/pipeline.js.map +1 -1
- package/dist/extraction/readability.d.ts +1 -1
- package/dist/extraction/readability.d.ts.map +1 -1
- package/dist/extraction/readability.js +1 -1
- package/dist/extraction/readability.js.map +1 -1
- package/dist/extraction/site-extractors/github.js +1 -1
- package/dist/extraction/site-extractors/github.js.map +1 -1
- package/dist/extraction/site-extractors/mdn.js +1 -1
- package/dist/extraction/site-extractors/mdn.js.map +1 -1
- package/dist/extraction/site-extractors/stackoverflow.js +1 -1
- package/dist/extraction/site-extractors/stackoverflow.js.map +1 -1
- package/dist/extraction/structured.d.ts +4 -0
- package/dist/extraction/structured.d.ts.map +1 -0
- package/dist/extraction/structured.js +206 -0
- package/dist/extraction/structured.js.map +1 -0
- package/dist/fetch/lightpanda.js +1 -1
- package/dist/fetch/lightpanda.js.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +6 -6
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +56 -50
- package/dist/instructions.js.map +1 -1
- package/dist/research/brief.d.ts +3 -0
- package/dist/research/brief.d.ts.map +1 -0
- package/dist/research/brief.js +79 -0
- package/dist/research/brief.js.map +1 -0
- package/dist/research/pipeline.d.ts.map +1 -1
- package/dist/research/pipeline.js +44 -1
- package/dist/research/pipeline.js.map +1 -1
- package/dist/research/synthesize.js +1 -1
- package/dist/research/synthesize.js.map +1 -1
- package/dist/search/answer-synthesis.d.ts +6 -0
- package/dist/search/answer-synthesis.d.ts.map +1 -1
- package/dist/search/answer-synthesis.js +54 -0
- package/dist/search/answer-synthesis.js.map +1 -1
- package/dist/search/dedup.d.ts +1 -0
- package/dist/search/dedup.d.ts.map +1 -1
- package/dist/search/dedup.js +4 -0
- package/dist/search/dedup.js.map +1 -1
- package/dist/search/find-similar.d.ts.map +1 -1
- package/dist/search/find-similar.js +41 -1
- package/dist/search/find-similar.js.map +1 -1
- package/dist/search/highlights.d.ts +10 -0
- package/dist/search/highlights.d.ts.map +1 -0
- package/dist/search/highlights.js +103 -0
- package/dist/search/highlights.js.map +1 -0
- package/dist/search/rerank.d.ts +1 -0
- package/dist/search/rerank.d.ts.map +1 -1
- package/dist/search/rerank.js +27 -2
- package/dist/search/rerank.js.map +1 -1
- package/dist/search/searxng.d.ts.map +1 -1
- package/dist/search/searxng.js +11 -7
- package/dist/search/searxng.js.map +1 -1
- package/dist/search/truncate.d.ts +2 -0
- package/dist/search/truncate.d.ts.map +1 -0
- package/dist/search/truncate.js +17 -0
- package/dist/search/truncate.js.map +1 -0
- package/dist/searxng/docker.d.ts.map +1 -1
- package/dist/searxng/docker.js +6 -2
- package/dist/searxng/docker.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -6
- package/dist/server.js.map +1 -1
- package/dist/tools/agent.d.ts +2 -2
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/agent.js +1 -1
- package/dist/tools/agent.js.map +1 -1
- package/dist/tools/extract.d.ts.map +1 -1
- package/dist/tools/extract.js +19 -1
- package/dist/tools/extract.js.map +1 -1
- package/dist/tools/fetch.d.ts.map +1 -1
- package/dist/tools/fetch.js +8 -1
- package/dist/tools/fetch.js.map +1 -1
- package/dist/tools/research.d.ts +1 -1
- package/dist/tools/research.d.ts.map +1 -1
- package/dist/tools/research.js +1 -1
- package/dist/tools/research.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +121 -30
- package/dist/tools/search.js.map +1 -1
- package/dist/types.d.ts +60 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured.js","sourceRoot":"","sources":["../../src/extraction/structured.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,0EAA0E;AAC1E,0EAA0E;AAC1E,wBAAwB;AACxB,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAE1C,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC3C,MAAM,eAAe,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAElD,OAAO;QACL,MAAM;QACN,WAAW;QACX,MAAM;QACN,WAAW;QACX,eAAe;KAChB,CAAC;AACJ,CAAC;AAED,wEAAwE;AACxE,0EAA0E;AAC1E,SAAS,kBAAkB,CAAC,GAAa;IACvC,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,MAAM,MAAM,GAAG,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC1C,KAAK,MAAM,EAAE,IAAI,MAAM,EAA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IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;QAClG,IAAI,GAAG,CAAC,MAAM,IAAI,kBAAkB;YAAE,OAAO,GAAG,CAAC;IACnD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CACjB,IAAoB,EACpB,IAAiB,EACjB,IAAkB;IAElB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;IACpE,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE,OAAO;IAC1B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACnD,IAAI,SAAS,CAAC,MAAM,IAAI,aAAa;QAAE,OAAO,SAAS,CAAC;IACxD,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AACrD,CAAC"}
|
package/dist/fetch/lightpanda.js
CHANGED
|
@@ -143,7 +143,7 @@ export class LightpandaAdapter {
|
|
|
143
143
|
try {
|
|
144
144
|
if (!this.browser)
|
|
145
145
|
return false;
|
|
146
|
-
if (typeof this.browser.isConnected === 'function') {
|
|
146
|
+
if ('isConnected' in this.browser && typeof this.browser.isConnected === 'function') {
|
|
147
147
|
if (!this.browser.isConnected())
|
|
148
148
|
return false;
|
|
149
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightpanda.js","sourceRoot":"","sources":["../../src/fetch/lightpanda.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqC,M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O,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;gBACpF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;oBAAE,OAAO,KAAK,CAAC;YAChD,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"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,9 @@ import { runDoctor } from './cli/doctor.js';
|
|
|
7
7
|
import { runShell } from './cli/shell.js';
|
|
8
8
|
import { runAuth } from './cli/auth.js';
|
|
9
9
|
import { runPluginCommand } from './cli/plugin.js';
|
|
10
|
+
import { runInit } from './cli/init.js';
|
|
11
|
+
import { runSetupMcp } from './cli/setup-mcp.js';
|
|
12
|
+
import { runStatus } from './cli/status.js';
|
|
10
13
|
import { getConfig } from './config.js';
|
|
11
14
|
import { startServer } from './server.js';
|
|
12
15
|
const { command, args } = parseCommand(process.argv.slice(2));
|
|
@@ -38,6 +41,21 @@ switch (command) {
|
|
|
38
41
|
case 'plugin':
|
|
39
42
|
runPluginCommand(args);
|
|
40
43
|
break;
|
|
44
|
+
case 'init': {
|
|
45
|
+
const initCode = await runInit(args);
|
|
46
|
+
process.exit(initCode);
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
case 'setup': {
|
|
50
|
+
const code = await runSetupMcp(args);
|
|
51
|
+
process.exit(code);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
case 'status': {
|
|
55
|
+
const code = await runStatus(args);
|
|
56
|
+
process.exit(code);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
41
59
|
case 'mcp': {
|
|
42
60
|
const config = getConfig();
|
|
43
61
|
try {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAA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AC;IAED,KAAK,KAAK,CAAC,CAAC,CAAC;QACX,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,IAAI,CAAC;YACH,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;YAC/D,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5E,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,+BAA+B,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,UAAU,GAAG;oBACxE,YAAY,MAAM,CAAC,MAAM,0DAA0D,CACpF,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,2EAA2E;QAC7E,CAAC;QAED,MAAM,WAAW,EAAE,CAAC;QACpB,MAAM;IACR,CAAC;AACH,CAAC"}
|
package/dist/instructions.d.ts
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
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, 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\", \"nextjs.org\"]` -- scope to the project's official site, do not rely on `category: \"docs\"` alone |\n| Error debugging | `search` | exact error string as query, `category: \"code\"` (no domain scoping -- errors appear everywhere) |\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\"`
|
|
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## Host-LLM synthesis pattern (read this first)\n\nWigolo has no internal LLM. It returns *structured evidence* so YOU (the host LLM) write the final answer. Fold structure into your reply:\n\n- `search` `format: \"highlights\"` \u2192 FlashRank-scored passages + `citations`. Quote [N].\n- `research` \u2192 `brief` with `topics`, `highlights`, `key_findings` when sampling unavailable. Use as report scaffold.\n- `find_similar` \u2192 `cold_start` string when local signals are weak. Pass to user verbatim.\n- `extract` `mode: \"structured\"` \u2192 tables + definitions + jsonld + chart_hints + key_value_pairs in one call.\n- `fetch` metadata \u2192 `og_type`, `canonical_url`, `og_image` when present.\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\", \"nextjs.org\"]` -- scope to the project's official site, do not rely on `category: \"docs\"` alone |\n| Error debugging | `search` | exact error string as query, `category: \"code\"` (no domain scoping -- errors appear everywhere) |\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 quote | `search` | `format: \"highlights\"` returns FlashRank-scored passages with citations; cite [N] in your reply |\n| Direct answer | `search` | `format: \"answer\"` if client supports sampling, else falls back to `highlights` (not plain context) |\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: \"structured\"` (tables + dl + JSON-LD + chart hints + kv pairs), or `mode: \"schema\"` with a JSON Schema |\n| Site inventory | `crawl` | `strategy: \"map\"` for URL-only discovery, no content fetched |\n\n## Rapidly changing content\n\nFor news, prices, status pages, or release notes, bypass the cache with `force_refresh: true`:\n\n search({ query: \"...\", force_refresh: true })\n fetch({ url: \"...\", force_refresh: true })\n\nFor docs, tutorials, and reference pages, let the cache work -- much faster.\n\n## Check the cache before going to the network\n\nBefore every `search` or `fetch`, consider a `cache` call. Pages read this session or earlier return instantly with full markdown -- no network. `research` and `agent` check the cache internally.\n\n## Multi-query search strategy\n\nFor broad queries, pass an array of 3-5 semantically varied keyword forms rather than one natural-language question. Example: instead of \"how does React handle state management\", pass `[\"react state management\", \"useState useReducer\", \"react hooks state\", \"react context vs redux\"]`. Sub-queries are deduplicated automatically.\n\n## Pick the right strategy\n\n- For docs sites, prefer `crawl` with `strategy: \"sitemap\"` -- faster and more complete than BFS.\n- For URL discovery only, use `crawl` with `strategy: \"map\"` -- URLs only, no content. Follow with targeted `fetch` calls.\n- For structured data (prices, specs, table rows), use `extract` with `mode: \"schema\"` or `mode: \"tables\"`. Use `fetch` only when you want the whole page as markdown.\n- For multi-source synthesis, use `research` instead of chaining `search` + `fetch` manually.\n- For natural-language data gathering, use `agent` with optional `schema`.\n- `crawl` accepts regex `include_patterns` and `exclude_patterns` to stay inside a section of a large site.\n\n## Scope searches by domain\n\nFor library/framework/SDK queries, **always pass `include_domains`** with official sites. Unscoped queries return generic noise. `category: \"docs\"` alone returns generic portals -- pair with `include_domains` or omit. Skip domain scoping for error strings, broad exploration, and news.\n\n## Performance\n\n- `max_results: 3` for focused lookups; `5` default; `10+` only for broad research.\n- `max_content_chars: 3000` on `search` or `fetch` smart-truncates each result's markdown at a paragraph/heading boundary with a `[... content truncated]` marker. Keeps context compact for AI agents. Prefer this over raw `max_chars` slicing.\n- `fetch` with `section: \"Heading Name\"` returns content under that heading -- cheaper than the whole page.\n- Repeated fetches of the same URL are free (SQLite cache).\n- `research` with `depth: \"quick\"` (~15s) suits most factual questions; reserve `\"comprehensive\"` for deep investigation.\n- `agent` respects `max_pages` (default 10) and `max_time_ms` (default 60s).\n\n## Extras\n\n- Localhost URLs (`localhost:3000`, `127.0.0.1:8080`) work for local dev servers.\n- `use_auth: true` on `fetch`/`crawl` reuses browser session for logged-in pages.\n- `cache` supports FTS5 syntax (`AND`, `OR`, `NOT`, `\"phrase\"`).\n- `research`/`agent` use MCP sampling when supported; fall back to structured data for host-LLM synthesis.";
|
|
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- force_refresh: true to bypass cache and fetch fresh content from the network\n\nReturns title, markdown
|
|
20
|
-
readonly search: "Search the web and return full markdown content from top results.
|
|
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- max_content_chars: smart-truncate markdown at a paragraph/heading boundary with a `[... content truncated]` marker (e.g., 3000 for compact context). Preferred over max_chars for AI agents.\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, links, images, metadata (og_image, og_type, canonical_url, keywords). Decorative images filtered, relative URLs resolved. Cached locally; repeat fetches are instant. Localhost URLs work.\n\nUse force_refresh: true for frequently changing content. Default serves from cache.";
|
|
20
|
+
readonly search: "Search the web and return full markdown content from top results. Returns extracted page content, not just snippets.\n\nKey parameters:\n- query: string or string[] array (3-5 keyword variants for broader coverage; deduplicated automatically)\n- include_domains/exclude_domains: scope to specific sites. ALWAYS scope library/framework queries.\n- category: \"general\" | \"news\" | \"code\" | \"docs\" | \"papers\" — coarse filter, pair with include_domains.\n- from_date/to_date: ISO YYYY-MM-DD for time-bounded queries\n- max_results: default 5; use 3 for focused, 10+ for research\n- format: \"full\" (default), \"context\", \"highlights\" (FlashRank-scored passages + [N] citations), \"answer\" (sampling synthesis; falls back to highlights), \"stream_answer\"\n- max_highlights: cap highlights count (default 10)\n- max_content_chars: smart-truncate markdown at paragraph boundary (e.g., 3000)\n- force_refresh: true to bypass all caches\n\n\"answer\" falls back to \"highlights\" when sampling unsupported (most clients). Results include title, URL, relevance_score, and full markdown_content. Cache serves previously fetched pages instantly.";
|
|
21
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
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
|
|
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
|
|
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,
|
|
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 only), \"metadata\" (title/author/date/description/og_* + JSON-LD), \"schema\" (JSON Schema -> heuristic field extraction), \"structured\" (ONE-SHOT: tables + <dl> definitions + JSON-LD + chart hints from SVG/figure + microdata/data-attr/grid key-value pairs)\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\nPrefer mode=\"structured\" over chaining multiple extract calls — it returns every structured pattern on the page in one response:\n { tables, definitions, jsonld, chart_hints, key_value_pairs }\n\nchart_hints surfaces SVG titles, aria-labels, and figcaptions — host LLMs use these to describe data visualizations even when the underlying data is rendered by JavaScript.\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 fused from three signals via 3-way RRF: FTS5 keyword match, sentence-transformer embeddings, and (if local hits are sparse) a live web search. Each result carries `match_signals` with `embedding_rank`, `fts5_rank`, and `fused_score` so you can explain ranking to the user.\n\nThe response may include a `cold_start` string when local signals are weak (empty cache, embeddings unavailable, < 20 cached pages). Pass this verbatim to the user — it explains why results came from web search and how to warm the cache.\n\nReturns results array, method used (\"hybrid\" | \"embedding\" | \"fts5\" | \"search\"), cache_hits, search_hits, embedding_available, and total_time_ms.";
|
|
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 when available. Without sampling support (the common case), the output includes a `brief` field with:\n - `topics`: sub-query labels or distilled source-title topics\n - `highlights`: FlashRank-scored passages with source_index, source_url, relevance_score\n - `key_findings`: first substantive paragraph per source, ordered by relevance\n - `per_source_char_cap` / `total_sources_char_cap`: budget hints so you know what was trimmed\n\nThe host LLM (you) should build its final report from the brief rather than re-reading every source — the brief is the structured scaffold this tool produces when it cannot synthesize internally.\n\nReturns report (markdown), citations array, sources with full content, sub_queries used, depth level, total_time_ms, sampling_supported flag, and optional brief.";
|
|
26
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.";
|
|
27
27
|
};
|
|
28
28
|
export type ToolName = keyof typeof TOOL_DESCRIPTIONS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,iwMAkF+E,CAAC;AAEhH,eAAO,MAAM,iBAAiB;;;;;;;;;CAwHpB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,iBAAiB,CAAC"}
|
package/dist/instructions.js
CHANGED
|
@@ -16,6 +16,16 @@
|
|
|
16
16
|
*/
|
|
17
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
|
+
## Host-LLM synthesis pattern (read this first)
|
|
20
|
+
|
|
21
|
+
Wigolo has no internal LLM. It returns *structured evidence* so YOU (the host LLM) write the final answer. Fold structure into your reply:
|
|
22
|
+
|
|
23
|
+
- \`search\` \`format: "highlights"\` → FlashRank-scored passages + \`citations\`. Quote [N].
|
|
24
|
+
- \`research\` → \`brief\` with \`topics\`, \`highlights\`, \`key_findings\` when sampling unavailable. Use as report scaffold.
|
|
25
|
+
- \`find_similar\` → \`cold_start\` string when local signals are weak. Pass to user verbatim.
|
|
26
|
+
- \`extract\` \`mode: "structured"\` → tables + definitions + jsonld + chart_hints + key_value_pairs in one call.
|
|
27
|
+
- \`fetch\` metadata → \`og_type\`, \`canonical_url\`, \`og_image\` when present.
|
|
28
|
+
|
|
19
29
|
## When to use which tool
|
|
20
30
|
|
|
21
31
|
- \`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.
|
|
@@ -35,10 +45,11 @@ export const WIGOLO_INSTRUCTIONS = `Wigolo is a local-first web access layer: se
|
|
|
35
45
|
| Error debugging | \`search\` | exact error string as query, \`category: "code"\` (no domain scoping -- errors appear everywhere) |
|
|
36
46
|
| Library research | \`crawl\` | seed URL of docs site, \`strategy: "sitemap"\`, then \`cache\` for later queries |
|
|
37
47
|
| Related content | \`find_similar\` | \`url\` of a known good page, or \`concept\` as free text |
|
|
38
|
-
| Direct
|
|
48
|
+
| Direct quote | \`search\` | \`format: "highlights"\` returns FlashRank-scored passages with citations; cite [N] in your reply |
|
|
49
|
+
| Direct answer | \`search\` | \`format: "answer"\` if client supports sampling, else falls back to \`highlights\` (not plain context) |
|
|
39
50
|
| Comprehensive research | \`research\` | \`depth: "comprehensive"\`, optional \`include_domains\` to scope |
|
|
40
51
|
| Data gathering | \`agent\` | natural-language \`prompt\`, optional \`schema\` for structured output |
|
|
41
|
-
| Structured extraction | \`extract\` | \`mode: "
|
|
52
|
+
| Structured extraction | \`extract\` | \`mode: "structured"\` (tables + dl + JSON-LD + chart hints + kv pairs), or \`mode: "schema"\` with a JSON Schema |
|
|
42
53
|
| Site inventory | \`crawl\` | \`strategy: "map"\` for URL-only discovery, no content fetched |
|
|
43
54
|
|
|
44
55
|
## Rapidly changing content
|
|
@@ -64,74 +75,56 @@ For broad queries, pass an array of 3-5 semantically varied keyword forms rather
|
|
|
64
75
|
- For URL discovery only, use \`crawl\` with \`strategy: "map"\` -- URLs only, no content. Follow with targeted \`fetch\` calls.
|
|
65
76
|
- For structured data (prices, specs, table rows), use \`extract\` with \`mode: "schema"\` or \`mode: "tables"\`. Use \`fetch\` only when you want the whole page as markdown.
|
|
66
77
|
- For multi-source synthesis, use \`research\` instead of chaining \`search\` + \`fetch\` manually.
|
|
67
|
-
- For natural-language data gathering
|
|
68
|
-
|
|
69
|
-
## Scope searches by domain — biggest single quality lever
|
|
70
|
-
|
|
71
|
-
For framework, library, SDK, or tool-specific queries, **always pass \`include_domains\` with the project's official site(s)**. Unscoped queries return generic results from sites that happen to mention the keywords (MDN glossary entries, Docker images, unrelated tutorials). Domain scoping is the single biggest quality improvement for these queries.
|
|
72
|
-
|
|
73
|
-
Examples:
|
|
74
|
-
|
|
75
|
-
search({ query: "Next.js authentication App Router", include_domains: ["nextjs.org", "authjs.dev", "clerk.com"] })
|
|
76
|
-
search({ query: "react server components", include_domains: ["react.dev", "nextjs.org"] })
|
|
77
|
-
search({ query: "prisma migrations", include_domains: ["prisma.io"] })
|
|
78
|
-
search({ query: "stripe webhooks", include_domains: ["stripe.com", "docs.stripe.com"] })
|
|
79
|
-
|
|
80
|
-
When NOT to scope:
|
|
81
|
-
|
|
82
|
-
- Error strings (errors surface across many sites)
|
|
83
|
-
- Broad exploration ("state management 2026")
|
|
84
|
-
- News and current events
|
|
78
|
+
- For natural-language data gathering, use \`agent\` with optional \`schema\`.
|
|
79
|
+
- \`crawl\` accepts regex \`include_patterns\` and \`exclude_patterns\` to stay inside a section of a large site.
|
|
85
80
|
|
|
86
|
-
|
|
81
|
+
## Scope searches by domain
|
|
87
82
|
|
|
88
|
-
|
|
83
|
+
For library/framework/SDK queries, **always pass \`include_domains\`** with official sites. Unscoped queries return generic noise. \`category: "docs"\` alone returns generic portals -- pair with \`include_domains\` or omit. Skip domain scoping for error strings, broad exploration, and news.
|
|
89
84
|
|
|
90
85
|
## Performance
|
|
91
86
|
|
|
92
87
|
- \`max_results: 3\` for focused lookups; \`5\` default; \`10+\` only for broad research.
|
|
88
|
+
- \`max_content_chars: 3000\` on \`search\` or \`fetch\` smart-truncates each result's markdown at a paragraph/heading boundary with a \`[... content truncated]\` marker. Keeps context compact for AI agents. Prefer this over raw \`max_chars\` slicing.
|
|
93
89
|
- \`fetch\` with \`section: "Heading Name"\` returns content under that heading -- cheaper than the whole page.
|
|
94
90
|
- Repeated fetches of the same URL are free (SQLite cache).
|
|
95
91
|
- \`research\` with \`depth: "quick"\` (~15s) suits most factual questions; reserve \`"comprehensive"\` for deep investigation.
|
|
96
92
|
- \`agent\` respects \`max_pages\` (default 10) and \`max_time_ms\` (default 60s).
|
|
97
93
|
|
|
98
|
-
##
|
|
94
|
+
## Extras
|
|
99
95
|
|
|
100
|
-
- Localhost URLs
|
|
101
|
-
- \`use_auth: true\` on \`fetch
|
|
102
|
-
- \`cache\`
|
|
103
|
-
- \`
|
|
104
|
-
- \`find_similar\` uses cached embeddings when available -- no network call needed if the content has been seen before.
|
|
105
|
-
- \`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.`;
|
|
96
|
+
- Localhost URLs (\`localhost:3000\`, \`127.0.0.1:8080\`) work for local dev servers.
|
|
97
|
+
- \`use_auth: true\` on \`fetch\`/\`crawl\` reuses browser session for logged-in pages.
|
|
98
|
+
- \`cache\` supports FTS5 syntax (\`AND\`, \`OR\`, \`NOT\`, \`"phrase"\`).
|
|
99
|
+
- \`research\`/\`agent\` use MCP sampling when supported; fall back to structured data for host-LLM synthesis.`;
|
|
106
100
|
export const TOOL_DESCRIPTIONS = {
|
|
107
101
|
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.
|
|
108
102
|
|
|
109
103
|
Key parameters:
|
|
110
104
|
- section: extract content under a specific heading (e.g., section: "API Reference") -- faster than reading the whole page
|
|
105
|
+
- max_content_chars: smart-truncate markdown at a paragraph/heading boundary with a \`[... content truncated]\` marker (e.g., 3000 for compact context). Preferred over max_chars for AI agents.
|
|
111
106
|
- use_auth: true to use stored browser session for authenticated/private pages
|
|
112
107
|
- render_js: "auto" (default, detects JS need), "always" (force browser), "never" (HTTP only, fastest)
|
|
113
108
|
- headers: custom HTTP headers if needed
|
|
114
109
|
- force_refresh: true to bypass cache and fetch fresh content from the network
|
|
115
110
|
|
|
116
|
-
Returns title, markdown
|
|
111
|
+
Returns title, markdown, links, images, metadata (og_image, og_type, canonical_url, keywords). Decorative images filtered, relative URLs resolved. Cached locally; repeat fetches are instant. Localhost URLs work.
|
|
117
112
|
|
|
118
|
-
Use force_refresh: true for
|
|
119
|
-
search: `Search the web and return full markdown content from top results.
|
|
113
|
+
Use force_refresh: true for frequently changing content. Default serves from cache.`,
|
|
114
|
+
search: `Search the web and return full markdown content from top results. Returns extracted page content, not just snippets.
|
|
120
115
|
|
|
121
116
|
Key parameters:
|
|
122
|
-
- query:
|
|
123
|
-
- include_domains/exclude_domains: scope
|
|
124
|
-
- category: "general"
|
|
125
|
-
- from_date/to_date: ISO
|
|
126
|
-
- max_results: default 5
|
|
127
|
-
- format: "full" (default
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Results include title, URL, relevance_score, and full markdown_content
|
|
133
|
-
|
|
134
|
-
Use force_refresh: true when you need current information that may have changed since the last search. Default behavior uses cached results when available.`,
|
|
117
|
+
- query: string or string[] array (3-5 keyword variants for broader coverage; deduplicated automatically)
|
|
118
|
+
- include_domains/exclude_domains: scope to specific sites. ALWAYS scope library/framework queries.
|
|
119
|
+
- category: "general" | "news" | "code" | "docs" | "papers" — coarse filter, pair with include_domains.
|
|
120
|
+
- from_date/to_date: ISO YYYY-MM-DD for time-bounded queries
|
|
121
|
+
- max_results: default 5; use 3 for focused, 10+ for research
|
|
122
|
+
- format: "full" (default), "context", "highlights" (FlashRank-scored passages + [N] citations), "answer" (sampling synthesis; falls back to highlights), "stream_answer"
|
|
123
|
+
- max_highlights: cap highlights count (default 10)
|
|
124
|
+
- max_content_chars: smart-truncate markdown at paragraph boundary (e.g., 3000)
|
|
125
|
+
- force_refresh: true to bypass all caches
|
|
126
|
+
|
|
127
|
+
"answer" falls back to "highlights" when sampling unsupported (most clients). Results include title, URL, relevance_score, and full markdown_content. Cache serves previously fetched pages instantly.`,
|
|
135
128
|
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.
|
|
136
129
|
|
|
137
130
|
Key parameters:
|
|
@@ -154,11 +147,16 @@ Returns matching cached pages with full markdown content. Cache persists across
|
|
|
154
147
|
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.
|
|
155
148
|
|
|
156
149
|
Key parameters:
|
|
157
|
-
- mode: "selector" (CSS selector -> text), "tables" (HTML tables
|
|
150
|
+
- mode: "selector" (CSS selector -> text), "tables" (HTML tables only), "metadata" (title/author/date/description/og_* + JSON-LD), "schema" (JSON Schema -> heuristic field extraction), "structured" (ONE-SHOT: tables + <dl> definitions + JSON-LD + chart hints from SVG/figure + microdata/data-attr/grid key-value pairs)
|
|
158
151
|
- css_selector: required for mode="selector" -- any valid CSS selector
|
|
159
152
|
- schema: for mode="schema", a JSON Schema object describing the fields to extract
|
|
160
153
|
- multiple: true to return array of all matches (mode="selector" only)
|
|
161
154
|
|
|
155
|
+
Prefer mode="structured" over chaining multiple extract calls — it returns every structured pattern on the page in one response:
|
|
156
|
+
{ tables, definitions, jsonld, chart_hints, key_value_pairs }
|
|
157
|
+
|
|
158
|
+
chart_hints surfaces SVG titles, aria-labels, and figcaptions — host LLMs use these to describe data visualizations even when the underlying data is rendered by JavaScript.
|
|
159
|
+
|
|
162
160
|
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.`,
|
|
163
161
|
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.
|
|
164
162
|
|
|
@@ -169,9 +167,11 @@ Key parameters:
|
|
|
169
167
|
- include_cached: true (default) to search the local cache first, false to skip cache and search the web only
|
|
170
168
|
- threshold: minimum similarity score (0-1, default 0.5) -- higher values return fewer, more relevant results
|
|
171
169
|
|
|
172
|
-
Provide either url or concept (not both). Results are
|
|
170
|
+
Provide either url or concept (not both). Results are fused from three signals via 3-way RRF: FTS5 keyword match, sentence-transformer embeddings, and (if local hits are sparse) a live web search. Each result carries \`match_signals\` with \`embedding_rank\`, \`fts5_rank\`, and \`fused_score\` so you can explain ranking to the user.
|
|
173
171
|
|
|
174
|
-
|
|
172
|
+
The response may include a \`cold_start\` string when local signals are weak (empty cache, embeddings unavailable, < 20 cached pages). Pass this verbatim to the user — it explains why results came from web search and how to warm the cache.
|
|
173
|
+
|
|
174
|
+
Returns results array, method used ("hybrid" | "embedding" | "fts5" | "search"), cache_hits, search_hits, embedding_available, and total_time_ms.`,
|
|
175
175
|
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.
|
|
176
176
|
|
|
177
177
|
Key parameters:
|
|
@@ -184,9 +184,15 @@ Key parameters:
|
|
|
184
184
|
|
|
185
185
|
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.
|
|
186
186
|
|
|
187
|
-
Uses MCP requestSampling for intelligent decomposition and synthesis. Without sampling support,
|
|
187
|
+
Uses MCP requestSampling for intelligent decomposition and synthesis when available. Without sampling support (the common case), the output includes a \`brief\` field with:
|
|
188
|
+
- \`topics\`: sub-query labels or distilled source-title topics
|
|
189
|
+
- \`highlights\`: FlashRank-scored passages with source_index, source_url, relevance_score
|
|
190
|
+
- \`key_findings\`: first substantive paragraph per source, ordered by relevance
|
|
191
|
+
- \`per_source_char_cap\` / \`total_sources_char_cap\`: budget hints so you know what was trimmed
|
|
192
|
+
|
|
193
|
+
The host LLM (you) should build its final report from the brief rather than re-reading every source — the brief is the structured scaffold this tool produces when it cannot synthesize internally.
|
|
188
194
|
|
|
189
|
-
Returns report (markdown), citations array, sources with full content, sub_queries used, depth level, and
|
|
195
|
+
Returns report (markdown), citations array, sources with full content, sub_queries used, depth level, total_time_ms, sampling_supported flag, and optional brief.`,
|
|
190
196
|
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.
|
|
191
197
|
|
|
192
198
|
Key parameters:
|
package/dist/instructions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+GAkF4E,CAAC;AAEhH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE;;;;;;;;;;;;oFAY2E;IAElF,MAAM,EAAE;;;;;;;;;;;;;uMAa6L;IAErM,KAAK,EAAE;;;;;;;;uLAQ8K;IAErL,KAAK,EAAE;;;;;;;;;0GASiG;IAExG,OAAO,EAAE;;;;;;;;;;;;;4LAaiL;IAE1L,YAAY,EAAE;;;;;;;;;;;;;kJAakI;IAEhJ,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;kKAoBsJ;IAEhK,KAAK,EAAE;;;;;;;;;;;;;;;;sKAgB6J;CAC5J,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResearchBrief, ResearchSource } from '../types.js';
|
|
2
|
+
export declare function buildResearchBrief(question: string, sources: ResearchSource[], subQueries: string[], perSourceCharCap: number, totalSourcesCharCap: number): Promise<ResearchBrief>;
|
|
3
|
+
//# sourceMappingURL=brief.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brief.d.ts","sourceRoot":"","sources":["../../src/research/brief.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAoB,MAAM,aAAa,CAAC;AAUnF,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,EAAE,EACzB,UAAU,EAAE,MAAM,EAAE,EACpB,gBAAgB,EAAE,MAAM,EACxB,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,aAAa,CAAC,CAyBxB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { extractHighlights } from '../search/highlights.js';
|
|
2
|
+
const MAX_HIGHLIGHTS = 12;
|
|
3
|
+
const MAX_KEY_FINDING_LEN = 280;
|
|
4
|
+
const MAX_TOPICS = 8;
|
|
5
|
+
// Build a host-LLM-friendly structured brief when internal sampling is
|
|
6
|
+
// unavailable. The host model (Claude Code / Cursor / etc.) consumes this
|
|
7
|
+
// shape to produce the final report without needing to re-read raw sources.
|
|
8
|
+
export async function buildResearchBrief(question, sources, subQueries, perSourceCharCap, totalSourcesCharCap) {
|
|
9
|
+
const fetched = sources.filter((s) => s.fetched && s.markdown_content.length > 0);
|
|
10
|
+
// Highlights reuse the FlashRank-or-paragraph scorer so briefs align with
|
|
11
|
+
// whatever format='highlights' produces for single-query searches.
|
|
12
|
+
const searchItems = fetched.map((s) => ({
|
|
13
|
+
title: s.title,
|
|
14
|
+
url: s.url,
|
|
15
|
+
snippet: s.markdown_content.slice(0, 200),
|
|
16
|
+
markdown_content: s.markdown_content,
|
|
17
|
+
relevance_score: s.relevance_score,
|
|
18
|
+
}));
|
|
19
|
+
const { highlights } = await extractHighlights(question, searchItems, MAX_HIGHLIGHTS);
|
|
20
|
+
const topics = buildTopics(subQueries, fetched);
|
|
21
|
+
const keyFindings = buildKeyFindings(fetched);
|
|
22
|
+
return {
|
|
23
|
+
topics,
|
|
24
|
+
highlights,
|
|
25
|
+
key_findings: keyFindings,
|
|
26
|
+
per_source_char_cap: perSourceCharCap,
|
|
27
|
+
total_sources_char_cap: totalSourcesCharCap,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// Prefer sub-queries (planner's view of the topic space) when available;
|
|
31
|
+
// otherwise derive compact topic labels from source titles.
|
|
32
|
+
function buildTopics(subQueries, sources) {
|
|
33
|
+
if (subQueries.length > 0) {
|
|
34
|
+
return dedupe(subQueries).slice(0, MAX_TOPICS);
|
|
35
|
+
}
|
|
36
|
+
const labels = sources
|
|
37
|
+
.map((s) => s.title.split(/[–|:·-]/)[0].trim())
|
|
38
|
+
.filter((t) => t.length >= 5 && t.length <= 100);
|
|
39
|
+
return dedupe(labels).slice(0, MAX_TOPICS);
|
|
40
|
+
}
|
|
41
|
+
// First substantive paragraph per source, trimmed to a finding-sized blurb.
|
|
42
|
+
// Ordered by source relevance so the most-weighted finding is first.
|
|
43
|
+
function buildKeyFindings(sources) {
|
|
44
|
+
const out = [];
|
|
45
|
+
for (const s of [...sources].sort((a, b) => b.relevance_score - a.relevance_score)) {
|
|
46
|
+
const first = firstSubstantiveParagraph(s.markdown_content);
|
|
47
|
+
if (!first)
|
|
48
|
+
continue;
|
|
49
|
+
const trimmed = first.length > MAX_KEY_FINDING_LEN
|
|
50
|
+
? first.slice(0, MAX_KEY_FINDING_LEN - 1).trimEnd() + '…'
|
|
51
|
+
: first;
|
|
52
|
+
out.push(trimmed);
|
|
53
|
+
}
|
|
54
|
+
return dedupe(out);
|
|
55
|
+
}
|
|
56
|
+
function firstSubstantiveParagraph(markdown) {
|
|
57
|
+
const paragraphs = markdown.split(/\n\n+/).map((p) => p.trim());
|
|
58
|
+
for (const p of paragraphs) {
|
|
59
|
+
if (p.length < 80)
|
|
60
|
+
continue;
|
|
61
|
+
if (p.startsWith('#') || p.startsWith('|') || p.startsWith('```'))
|
|
62
|
+
continue;
|
|
63
|
+
return p.replace(/\s+/g, ' ');
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function dedupe(list) {
|
|
68
|
+
const seen = new Set();
|
|
69
|
+
const out = [];
|
|
70
|
+
for (const item of list) {
|
|
71
|
+
const key = item.toLowerCase();
|
|
72
|
+
if (seen.has(key))
|
|
73
|
+
continue;
|
|
74
|
+
seen.add(key);
|
|
75
|
+
out.push(item);
|
|
76
|
+
}
|
|
77
|
+
return out;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=brief.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brief.js","sourceRoot":"","sources":["../../src/research/brief.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,UAAU,GAAG,CAAC,CAAC;AAErB,uEAAuE;AACvE,0EAA0E;AAC1E,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,QAAgB,EAChB,OAAyB,EACzB,UAAoB,EACpB,gBAAwB,EACxB,mBAA2B;IAE3B,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAElF,0EAA0E;IAC1E,mEAAmE;IACnE,MAAM,WAAW,GAAuB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,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AI,CAAC;AACd,CAAC;AAED,SAAS,MAAM,CAAC,IAAc;IAC5B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/research/pipeline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/research/pipeline.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EAEd,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAatD,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,YAAY,EAAE,EACvB,MAAM,EAAE,WAAW,EACnB,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,cAAc,CAAC,CAkHzB"}
|