@tiny-fish/cli 0.51.1-next.409 → 0.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiny-fish/cli",
3
- "version": "0.51.1-next.409",
3
+ "version": "0.51.1",
4
4
  "description": "TinyFish CLI — run web automations from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,7 +37,7 @@
37
37
  "test:e2e:real": "vitest --run --config vitest.e2e.config.ts e2e/real-harnesses.e2e.test.ts"
38
38
  },
39
39
  "dependencies": {
40
- "@tiny-fish/sdk": "^0.9.0",
40
+ "@tiny-fish/sdk": "^0.10.0",
41
41
  "commander": "^12.0.0",
42
42
  "cross-spawn": "^7.0.6",
43
43
  "tldts": "^6.1.86",
@@ -53,11 +53,11 @@
53
53
  "oxfmt": "^0.48.0",
54
54
  "oxlint": "^1.63.0",
55
55
  "typescript": "^5.0.0",
56
- "vitest": "^4.1.11"
56
+ "vitest": "^4.1.12"
57
57
  },
58
58
  "overrides": {
59
59
  "esbuild": "0.28.2",
60
- "vite": "7.3.6",
60
+ "vite": "7.3.7",
61
61
  "brace-expansion": "^5.0.9",
62
62
  "ip-address": ">=10.3.1",
63
63
  "postcss": ">=8.5.23",
@@ -1 +1 @@
1
- 6aca200440f85ca0e25c92b78e36f43f3179a18a
1
+ 7c2e319dcf5545c7b287c0a1849c079b554fa91f
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tinyfish-research
3
- description: "Web research powered by TinyFish search and fetch. Use for any question needing current web information, and for deep research — competitive analysis, literature reviews, lead generation, deep dives — including phrases like 'research this', 'find everything about', 'find me all', or 'deep dive on'."
3
+ description: "Web research powered by TinyFish search and fetch, plus TinyFish deep research runs when the user explicitly asks for deep research. Use for any question needing current web information, and for deep research — competitive analysis, literature reviews, lead generation, deep dives — including phrases like 'research this', 'find everything about', 'find me all', or 'deep dive on'."
4
4
  ---
5
5
 
6
6
  # TinyFish Research
@@ -9,7 +9,8 @@ You are the orchestrator. Understand the question, decide how much work it deser
9
9
  passes, then compile and deliver. If you have a subagent tool, see "Fanning out" for when to delegate
10
10
  instead.
11
11
 
12
- Two tools do all the work, and **both are free**, so depth costs latency and context — never money:
12
+ Two tools do most of the work, and **both are free**, so search-and-fetch depth costs latency and
13
+ context — never money. Deep research runs, below, are the exception: each is billed.
13
14
 
14
15
  - **`search`** — ranked web results with titles, snippets, URLs. Filters for recency, date range,
15
16
  domain include/exclude, news, and research papers.
@@ -19,6 +20,30 @@ Do not use `run_web_automation` for research. It costs $0.016 per step and is fo
19
20
  sites, not reading them. The only exception is a page that requires a login to read — that's
20
21
  `tinyfish-authenticated`.
21
22
 
23
+ ## Deep research runs
24
+
25
+ **Search and fetch stay the default.** Start a TinyFish deep research run only when the user
26
+ explicitly asks for one: "deep research", "deep dive", "comprehensive report", "cited report",
27
+ "literature review", "survey", or "landscape". A run searches, reads, and synthesizes many sources
28
+ into a cited report. It takes several minutes and is **billed per run**. Without such an ask, never
29
+ use it for single facts, definitions, current news, docs lookups, "what is" or "compare X vs Y"
30
+ questions, or reading known URLs. An explicit ask wins even when the topic is news or a comparison.
31
+
32
+ 1. `start_deep_research` with `query` (the question plus every scope and constraint the user gave,
33
+ dates computed as in "Dates first") and `mode`. `deep` is the default; use `max` only when the
34
+ user asks for maximum depth or an exhaustive report — it is slower and costs more. It returns a
35
+ `research_run_id`.
36
+ 2. `get_deep_research` with that `research_run_id` until the run finishes and the cited report is
37
+ in the result. **Start one run per request**: if you already have a `research_run_id` for this
38
+ question, keep polling it instead of starting another. **Never cancel because it is slow**;
39
+ `cancel_deep_research` is only for when the user asks to stop.
40
+ 3. Deliver the report in Step 3's answer shape, with its citations as inline links, opening with "I
41
+ used a TinyFish deep research run." Don't redo the research with search passes; one
42
+ `fetch_content` to check a load-bearing claim is fine.
43
+
44
+ If the deep research tools aren't available, or the run fails, say so and offer the search-and-fetch
45
+ passes below instead. Never swap one for the other silently.
46
+
22
47
  ## Auth
23
48
 
24
49
  Both tools run through the `tinyfish` CLI: `search` is `tinyfish search query "<q>"` and
@@ -60,7 +85,8 @@ With a subagent tool, each pass above becomes a delegated child instead — same
60
85
  **Ask before starting when the level is genuinely ambiguous** — when a question could reasonably be
61
86
  Moderate *or* Exhaustive. Present your reading of the question, the two plausible depths, what each
62
87
  would look like in practice, and let the user pick. Do not ask when the question is obviously trivial
63
- or obviously exhaustive, or when the user already stated the depth ("quick answer", "deep dive").
88
+ or obviously exhaustive, or when the user already stated the depth ("quick answer", or an explicit
89
+ deep research ask, which goes to "Deep research runs").
64
90
 
65
91
  If the user names a target — "find 50 of them" — keep working until you hit it or can explain why the
66
92
  web doesn't contain it.
@@ -152,7 +178,10 @@ the one-screen summary.
152
178
 
153
179
  ## Gotchas
154
180
 
155
- - **Over-execution.** "What year was X founded" gets one search, not four subagents.
181
+ - **Over-execution.** "What year was X founded" gets one search, not four subagents — and never a
182
+ deep research run.
183
+ - **Duplicate runs.** A slow `get_deep_research` is normal. Poll the run you have; never start
184
+ another or cancel it.
156
185
  - **Under-execution.** Four-plus constraints, temporal joins, or semantic filtering will not survive
157
186
  a single search. Fan out.
158
187
  - **Synonym queries.** "Overrated AI tools" and "overhyped AI tools" hit the same semantic region and
@@ -5,7 +5,8 @@ description: "Pick the right TinyFish tool for a web task. Use when a request in
5
5
 
6
6
  # Choosing a TinyFish Tool
7
7
 
8
- TinyFish covers reading the web and acting on it. Reading is free; acting is metered. Picking correctly
8
+ TinyFish covers reading the web and acting on it. Reading with search and fetch is free; acting is
9
+ metered, and so are deep research runs. Picking correctly
9
10
  is mostly about not paying for the second when the first would do.
10
11
 
11
12
  ## Decision table
@@ -15,6 +16,7 @@ is mostly about not paying for the second when the first would do.
15
16
  | Find pages, or get current information | `search` | **free** | `tinyfish-research` |
16
17
  | Read pages you have URLs for (up to 10 per call) | `fetch_content` | **free** | `tinyfish-research` |
17
18
  | Research a topic across many sources | `search` + `fetch_content`, fanned out across subagents | **free** | `tinyfish-research` |
19
+ | Write a cited report, only when the user explicitly asks: "deep research", "deep dive", "comprehensive report", "cited report", "literature review", "survey", or "landscape" | `start_deep_research`, then `get_deep_research` | billed per run | `tinyfish-research` |
18
20
  | Click, type, submit, navigate a flow, or extract data that only appears after interaction | `run_web_automation` | $0.016/step | `tinyfish-automation` |
19
21
  | Do the above on a site the user is logged into | `run_web_automation` + `use_profile` / `use_vault` | $0.016/step | `tinyfish-authenticated` |
20
22
  | Drive a browser from Playwright, Puppeteer, or Selenium code | `create_browser_session` | $0.002/min | `tinyfish-browser` |
@@ -62,7 +64,7 @@ shell. **The CLI grammar is two-level and does not match the tool names**, so ru
62
64
  --help` before your first use of a group and follow the syntax it prints. Where this table and the
63
65
  skill text disagree, the table is right for the CLI.
64
66
 
65
- | These skills say | CLI command (CLI 0.49) |
67
+ | These skills say | CLI command (CLI 0.49; `tinyfish research` 0.51) |
66
68
  |---|---|
67
69
  | `search` | `tinyfish search query "<query>"` |
68
70
  | `fetch_content` | `tinyfish fetch content get <url>...` (up to 10 URLs) |
@@ -81,6 +83,12 @@ skill text disagree, the table is right for the CLI.
81
83
  | `list_monitors`, `get_monitor`, `run_monitor`, `pause_monitor`, `resume_monitor`, `cancel_monitor` | `tinyfish monitor list`, `monitor <get\|run\|pause\|resume\|cancel> <monitor_id>` |
82
84
  | `create_browser_session`, `list_browser_sessions`, `close_browser_session` | `tinyfish browser session create`, `list`, `close <session_id>` |
83
85
  | `get_wallet`, `get_search_usage`, `list_fetch_usage` | `tinyfish wallet status`, `search usage`, `fetch usage` |
86
+ | `start_deep_research` | `tinyfish research run "<query>" --async --pretty` (add `--mode max` only when asked) — prints the `research_run_id`. Always `--async`: a foreground run streams for minutes, and interrupting it cancels the run |
87
+ | `get_deep_research` | `tinyfish research run get <research_run_id> --pretty` — returns at once with `<id> <status> <query>`, then the report and numbered citations once `COMPLETED`. Wait about 30 seconds between checks; don't use `research run watch`, which blocks for up to 45 minutes. `FAILED`, `CANCELLED` and `TIMED_OUT` are final. Lost the ID? `tinyfish research run list --pretty` before starting another |
88
+ | `cancel_deep_research` | `tinyfish research run cancel <research_run_id>` |
89
+
90
+ `tinyfish research` needs CLI 0.51 or later; on an older CLI, tell the user to run
91
+ `npm i -g @tiny-fish/cli@latest`.
84
92
 
85
93
  `search query` takes `--include-domains`, `--exclude-domains`, `--location`, `--language` and `--page`
86
94
  only. The recency, date-range and `domain_type` filters in `tinyfish-research` are MCP-only; put the