hermes-plugin-tinyfish 0.2.1__tar.gz → 0.2.4__tar.gz

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 (54) hide show
  1. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/CHANGELOG.md +65 -0
  2. hermes_plugin_tinyfish-0.2.4/PKG-INFO +319 -0
  3. hermes_plugin_tinyfish-0.2.4/README.md +287 -0
  4. hermes_plugin_tinyfish-0.2.4/hermes_plugin_tinyfish/__init__.py +90 -0
  5. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/hermes_plugin_tinyfish/browser_provider.py +3 -3
  6. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/hermes_plugin_tinyfish/config.py +18 -18
  7. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/hermes_plugin_tinyfish/credit_policy.py +0 -13
  8. hermes_plugin_tinyfish-0.2.4/hermes_plugin_tinyfish/health.py +271 -0
  9. hermes_plugin_tinyfish-0.2.4/hermes_plugin_tinyfish/provider.py +414 -0
  10. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/hermes_plugin_tinyfish/rest_client.py +11 -132
  11. hermes_plugin_tinyfish-0.2.4/hermes_plugin_tinyfish/setup_cli.py +699 -0
  12. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/plugin.yaml +2 -2
  13. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/pyproject.toml +10 -9
  14. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/tests/test_browser_provider.py +19 -0
  15. hermes_plugin_tinyfish-0.2.4/tests/test_credit_policy.py +154 -0
  16. hermes_plugin_tinyfish-0.2.4/tests/test_health.py +84 -0
  17. hermes_plugin_tinyfish-0.2.4/tests/test_provider.py +421 -0
  18. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/tests/test_register.py +23 -7
  19. hermes_plugin_tinyfish-0.2.4/tests/test_rest_client.py +316 -0
  20. hermes_plugin_tinyfish-0.2.4/tests/test_setup_cli.py +748 -0
  21. hermes_plugin_tinyfish-0.2.4/tests/test_version.py +46 -0
  22. hermes_plugin_tinyfish-0.2.1/PKG-INFO +0 -263
  23. hermes_plugin_tinyfish-0.2.1/README.md +0 -232
  24. hermes_plugin_tinyfish-0.2.1/hermes_plugin_tinyfish/__init__.py +0 -57
  25. hermes_plugin_tinyfish-0.2.1/hermes_plugin_tinyfish/provider.py +0 -277
  26. hermes_plugin_tinyfish-0.2.1/hermes_plugin_tinyfish/setup_cli.py +0 -561
  27. hermes_plugin_tinyfish-0.2.1/hermes_plugin_tinyfish/tools.py +0 -158
  28. hermes_plugin_tinyfish-0.2.1/tests/test_credit_policy.py +0 -46
  29. hermes_plugin_tinyfish-0.2.1/tests/test_provider.py +0 -174
  30. hermes_plugin_tinyfish-0.2.1/tests/test_setup_cli.py +0 -50
  31. hermes_plugin_tinyfish-0.2.1/tests/test_tools.py +0 -14
  32. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  33. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +0 -0
  34. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/generate_report.py +0 -0
  35. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/improve_description.py +0 -0
  36. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/package_skill.py +0 -0
  37. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/quick_validate.py +0 -0
  38. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/run_eval.py +0 -0
  39. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/run_loop.py +0 -0
  40. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.agents/skills/skill-creator/scripts/utils.py +0 -0
  41. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/.gitignore +0 -0
  42. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/CODE_OF_CONDUCT.md +0 -0
  43. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/CONTRIBUTING.md +0 -0
  44. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/LICENSE +0 -0
  45. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/SECURITY.md +0 -0
  46. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/__init__.py +0 -0
  47. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/hermes_plugin_tinyfish/normalize.py +0 -0
  48. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/scripts/prepare_release.py +0 -0
  49. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/scripts/validate_release.py +0 -0
  50. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/tests/conftest.py +0 -0
  51. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/tests/test_live.py +0 -0
  52. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/tests/test_normalize.py +0 -0
  53. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/tests/test_prepare_release.py +0 -0
  54. {hermes_plugin_tinyfish-0.2.1 → hermes_plugin_tinyfish-0.2.4}/tests/test_validate_release.py +0 -0
@@ -7,6 +7,71 @@ and this project uses semantic versioning.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## [0.2.4] - 2026-07-22
11
+
12
+ ### Fixed
13
+
14
+ - Made the merge-to-release path fully automatic by explicitly running checks
15
+ for bot-created release PRs, merging them after validation, and dispatching
16
+ the PyPI-trusted Release workflow for tagging, GitHub Release creation, and
17
+ package publication.
18
+
19
+ ## [0.2.3] - 2026-07-22
20
+
21
+ ### Added
22
+
23
+ - Added conservative MCP OAuth failure classification, explicit reauthorization
24
+ guidance, transport-specific live diagnostics, `/tinyfish-status`, and
25
+ `hermes tinyfish reauth`.
26
+
27
+ ### Changed
28
+
29
+ - Corrected the development build dependency floor to the latest available
30
+ non-yanked release so clean CI environments can install the `dev` extra.
31
+ - Made MCP-to-REST degradation observable without logging raw OAuth responses,
32
+ and clarified that a cached token file does not prove credential validity.
33
+ - Serialized plugin-triggered lazy MCP discovery within each process and
34
+ limited live diagnostics to one discovery opportunity, reducing duplicate
35
+ connection and OAuth refresh attempts without taking ownership of tokens.
36
+ - Stopped treating a zero exit status from Hermes's MCP login command as proof
37
+ that browser reauthorization completed; MCP-only live diagnostics remain the
38
+ authoritative verification step.
39
+ - Replaced nested Hermes subprocesses during interactive MCP login with a
40
+ direct process handoff, preventing the plugin's parent process from competing
41
+ for the OAuth callback port. Reauthorization now warns about shared Hermes
42
+ homes and external gateway supervisors without attempting to manage them.
43
+ - Classified explicit OAuth failures nested inside task-group errors while
44
+ preserving generic HTTP 400 as unknown, and added safe guidance for visually
45
+ wrapped authorization URLs, single-flow callbacks, and unreliable login exit
46
+ status.
47
+
48
+ ## [0.2.2] - 2026-07-13
49
+
50
+ ### Added
51
+
52
+ - Added migration diagnostics for ignored `0.2.x` Agent, Profile setup, and
53
+ model-tool credit-policy keys.
54
+ - Added authoritative Search/Fetch live diagnostics, a Browser-only paid live
55
+ check, expanded compatibility CI, and structured issue forms.
56
+
57
+ ### Changed
58
+
59
+ - Refocused the plugin on TinyFish Search and Fetch plus optional TinyFish
60
+ Browser infrastructure controlled by Hermes.
61
+ - Simplified credit policy to Browser only, corrected usage reporting to use
62
+ TinyFish Fetch operation history, and aligned runtime version reporting with
63
+ installed package metadata.
64
+ - Promoted the package development classifier from Alpha to Beta for the
65
+ feature-complete core-only scope.
66
+ - Extended supported and tested Python versions through Python 3.13.
67
+
68
+ ### Removed
69
+
70
+ - Removed TinyFish Agent CLI commands, model-callable Agent tools, Browser
71
+ Context Profile commands, and their Agent/Profile REST and policy surfaces.
72
+ Existing remote TinyFish runs, profiles, credentials, and saved state are not
73
+ modified.
74
+
10
75
  ## [0.2.1] - 2026-07-08
11
76
 
12
77
  ### Changed
@@ -0,0 +1,319 @@
1
+ Metadata-Version: 2.4
2
+ Name: hermes-plugin-tinyfish
3
+ Version: 0.2.4
4
+ Summary: TinyFish Search, Fetch, and optional Browser provider plugin for Hermes Agent
5
+ Project-URL: Homepage, https://github.com/gabeosx/hermes-plugin-tinyfish
6
+ Project-URL: Documentation, https://github.com/gabeosx/hermes-plugin-tinyfish#readme
7
+ Project-URL: Issues, https://github.com/gabeosx/hermes-plugin-tinyfish/issues
8
+ Project-URL: Changelog, https://github.com/gabeosx/hermes-plugin-tinyfish/blob/main/CHANGELOG.md
9
+ Author: gabeosx
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: browser,hermes-agent,mcp,tinyfish,web-extraction,web-search
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: httpx>=0.28.1
24
+ Provides-Extra: dev
25
+ Requires-Dist: build>=1.5.0; extra == 'dev'
26
+ Requires-Dist: mypy>=2.2.0; extra == 'dev'
27
+ Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
28
+ Requires-Dist: pytest>=9.1.1; extra == 'dev'
29
+ Requires-Dist: ruff>=0.6; extra == 'dev'
30
+ Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # Hermes TinyFish Plugin
34
+
35
+ [![CI](https://github.com/gabeosx/hermes-plugin-tinyfish/actions/workflows/ci.yml/badge.svg)](https://github.com/gabeosx/hermes-plugin-tinyfish/actions/workflows/ci.yml)
36
+ [![PyPI](https://img.shields.io/pypi/v/hermes-plugin-tinyfish.svg)](https://pypi.org/project/hermes-plugin-tinyfish/)
37
+ [![Python](https://img.shields.io/pypi/pyversions/hermes-plugin-tinyfish.svg)](https://pypi.org/project/hermes-plugin-tinyfish/)
38
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
39
+ [![Security Policy](https://img.shields.io/badge/Security-policy-green.svg)](SECURITY.md)
40
+
41
+ TinyFish Search and Fetch providers, plus optional TinyFish Browser
42
+ infrastructure, for
43
+ [Hermes Agent](https://hermes-agent.nousresearch.com/docs/).
44
+
45
+ Hermes remains the agent: it plans, chooses tools, and controls browser
46
+ interaction. This plugin supplies web data and, when explicitly enabled, a
47
+ remote browser session underneath Hermes's own browser loop.
48
+
49
+ This is an independent community plugin. It is not affiliated with, endorsed
50
+ by, or maintained by TinyFish or Hermes / Nous Research.
51
+
52
+ TinyFish documentation currently describes Search and Fetch as free and
53
+ Browser as credit-consuming. This plugin treats Search and Fetch as the safe
54
+ default entry point. Pricing and free-use assumptions are based only on current
55
+ TinyFish documentation and may change; Browser defaults to `deny`.
56
+
57
+ ## Install
58
+
59
+ Hermes Git plugin install:
60
+
61
+ ```bash
62
+ hermes plugins install gabeosx/hermes-plugin-tinyfish --enable
63
+ hermes tinyfish setup
64
+ ```
65
+
66
+ Python package install:
67
+
68
+ ```bash
69
+ pip install hermes-plugin-tinyfish
70
+ hermes tinyfish setup
71
+ ```
72
+
73
+ ## Update
74
+
75
+ Update an existing Hermes Git plugin installation:
76
+
77
+ ```bash
78
+ hermes plugins update web-tinyfish
79
+ hermes tinyfish status
80
+ hermes tinyfish doctor
81
+ ```
82
+
83
+ If the plugin was installed as a Python package instead, update it with:
84
+
85
+ ```bash
86
+ python -m pip install --upgrade hermes-plugin-tinyfish
87
+ hermes tinyfish status
88
+ hermes tinyfish doctor
89
+ ```
90
+
91
+ ## Safe Default Setup
92
+
93
+ `hermes tinyfish setup` configures TinyFish for Hermes `web_search` and
94
+ `web_extract` only:
95
+
96
+ ```yaml
97
+ mcp_servers:
98
+ tinyfish:
99
+ url: https://agent.tinyfish.ai/mcp
100
+ auth: oauth
101
+ tools:
102
+ include: [search, fetch_content]
103
+ resources: false
104
+ prompts: false
105
+
106
+ web:
107
+ search_backend: tinyfish
108
+ extract_backend: tinyfish
109
+
110
+ tinyfish:
111
+ credit_policy:
112
+ browser: deny
113
+ ```
114
+
115
+ The plugin prefers TinyFish's hosted OAuth MCP server and falls back to REST
116
+ with `TINYFISH_API_KEY` when MCP OAuth is unavailable. It may save
117
+ `TINYFISH_API_KEY` to `~/.hermes/.env` if you choose API-key fallback.
118
+
119
+ Verify Search and Fetch:
120
+
121
+ ```bash
122
+ hermes tinyfish doctor
123
+ hermes tinyfish doctor --live
124
+ hermes tinyfish doctor --live --transport mcp
125
+ hermes tinyfish doctor --live --transport rest
126
+ ```
127
+
128
+ `doctor --live` runs independent Search and Fetch checks and exits nonzero if
129
+ either fails. The default `auto` transport remains MCP-first and may use the
130
+ REST fallback. Use `--transport mcp` to test OAuth without allowing REST to
131
+ hide an MCP failure, or `--transport rest` to test only the API-key path.
132
+
133
+ If MCP reports that authorization must be renewed:
134
+
135
+ ```bash
136
+ hermes tinyfish reauth
137
+ ```
138
+
139
+ The command replaces the current plugin CLI process with Hermes's supported
140
+ `hermes mcp login tinyfish` command; it does not start a nested Hermes process.
141
+ If a gateway or another Hermes process shares the same Hermes home, pause that
142
+ process and any supervisor or watchdog for the maintenance window. The plugin
143
+ does not stop host services automatically.
144
+
145
+ Complete the browser flow, restore and reload or restart affected Hermes
146
+ processes, then verify the recovered OAuth path with
147
+ `hermes tinyfish doctor --live --transport mcp`. The plugin never deletes,
148
+ rewrites, or validates Hermes's OAuth token files itself.
149
+
150
+ For browser authorization from a headless or remote terminal:
151
+
152
+ - Complete one authorization flow at a time and never combine an authorization
153
+ URL with a callback URL from another attempt.
154
+ - Terminal wrapping is visual. Copy the entire URL and do not manually edit
155
+ OAuth characters such as `state` or the PKCE challenge.
156
+ - If copied terminal text contains line breaks, remove only whitespace. In a
157
+ local Blink shell on iOS/iPadOS, for example:
158
+
159
+ ```bash
160
+ pbpaste | tr -d '\r\n\t ' | pbcopy
161
+ ```
162
+
163
+ - If Hermes prints another authorization URL before reporting success, stop
164
+ that attempt rather than authorizing multiple URLs.
165
+ - Treat the MCP-only doctor as authoritative. Some Hermes versions can print
166
+ an authentication failure while still returning shell status 0.
167
+
168
+ ## Search and Fetch Options
169
+
170
+ Optional REST fallback defaults can be configured in `config.yaml`:
171
+
172
+ ```yaml
173
+ tinyfish:
174
+ search:
175
+ location: US
176
+ language: en
177
+ recency_minutes: 1440
178
+ domain_type: web
179
+ page: 0
180
+ fetch:
181
+ format: markdown
182
+ links: false
183
+ image_links: false
184
+ ttl: 3600
185
+ ```
186
+
187
+ MCP remains the preferred path when configured. These options apply only to
188
+ REST fallback calls.
189
+
190
+ ## Optional Browser Provider
191
+
192
+ TinyFish Browser can supply remote browser infrastructure for Hermes after
193
+ explicit opt-in:
194
+
195
+ ```yaml
196
+ browser:
197
+ cloud_provider: tinyfish
198
+ tinyfish:
199
+ credit_policy:
200
+ browser: request
201
+ ```
202
+
203
+ Browser policy values are:
204
+
205
+ - `deny`: fail closed; this is the default.
206
+ - `request`: use Hermes's approval flow for each `browser_*` tool invocation.
207
+ - `allow`: run Browser tools without per-invocation approval.
208
+
209
+ Manage the policy with:
210
+
211
+ ```bash
212
+ hermes tinyfish credits status
213
+ hermes tinyfish credits set browser request
214
+ hermes tinyfish credits reset
215
+ ```
216
+
217
+ `credits reset` restores `browser: deny` and removes retired Agent/Profile
218
+ policy keys left by plugin `0.2.x`.
219
+
220
+ ## Why TinyFish Agent Is Not Included
221
+
222
+ TinyFish Agent performs delegated goal-based web automation. Hermes already
223
+ owns planning and browser interaction, so exposing a second agent loop through
224
+ this provider is duplicative and makes control, approval, and billing less
225
+ clear. The plugin therefore does not register TinyFish Agent tools or manage
226
+ Browser Context Profiles.
227
+
228
+ Users who specifically need TinyFish's delegated Agent, Profile, Vault, batch,
229
+ or streaming capabilities can configure TinyFish's full MCP service
230
+ independently in Hermes. Those tools are outside this plugin's setup, policy,
231
+ diagnostics, and compatibility guarantees. The plugin-managed `tinyfish` MCP
232
+ entry intentionally remains restricted to `search` and `fetch_content`.
233
+
234
+ ## Diagnostics and Migration
235
+
236
+ ```bash
237
+ hermes tinyfish status
238
+ hermes tinyfish usage
239
+ hermes tinyfish doctor --live
240
+ hermes tinyfish doctor --live --transport mcp
241
+ hermes tinyfish doctor --live-paid
242
+ ```
243
+
244
+ - `status` is non-secret and reports ignored `0.2.x` policy keys under
245
+ `retired_credit_policy_keys`.
246
+ - `mcp_token_cached` reports only whether Hermes's expected cache file is
247
+ present. It does not mean the access or refresh token is valid.
248
+ - `/tinyfish-status` shows non-networked status inside CLI or gateway sessions;
249
+ `/tinyfish-status live` explicitly runs Search and Fetch checks.
250
+ - `usage` reads TinyFish Fetch operation history; it is not Agent or Browser
251
+ billing data.
252
+ - `doctor --live-paid` only creates and closes a TinyFish Browser session. It
253
+ refuses under `deny`, requests approval under `request`, and never prints
254
+ connection URLs or credentials.
255
+ - The former `agent` and `profiles` commands and model-callable Agent tools are
256
+ intentionally removed. Existing remote TinyFish runs, profiles, credentials,
257
+ and saved state are not changed.
258
+
259
+ ## Upgrade Safety
260
+
261
+ This plugin uses public Hermes extension points:
262
+
263
+ - `ctx.register_web_search_provider(...)`
264
+ - `ctx.register_browser_provider(...)`
265
+ - `ctx.register_hook("pre_tool_call", ...)` for Browser credit policy
266
+ - `ctx.register_cli_command(...)`
267
+ - `ctx.register_command(...)` for `/tinyfish-status`
268
+ - `ctx.dispatch_tool(...)` for registered TinyFish MCP calls
269
+ - Hermes MCP configuration under `mcp_servers`
270
+ - Hermes environment helpers for optional API-key fallback
271
+
272
+ It does not patch Hermes Agent, update scripts, Dockerfiles, or files inside a
273
+ Hermes installation or source checkout. A narrow legacy compatibility shim
274
+ still asks Hermes to discover configured MCP servers when TinyFish tools have
275
+ not been registered in the current process. It is retained because removing it
276
+ reintroduces a previously observed MCP-to-REST regression; it will be removed
277
+ only after every supported Hermes surface owns discovery through a public API.
278
+
279
+ ## Development
280
+
281
+ ```bash
282
+ python -m venv .venv
283
+ source .venv/bin/activate
284
+ python -m pip install -U pip
285
+ python -m pip install -e ".[dev]"
286
+ ruff format .
287
+ ruff check .
288
+ mypy hermes_plugin_tinyfish
289
+ pytest --cov=hermes_plugin_tinyfish --cov-fail-under=70
290
+ python -m build
291
+ ```
292
+
293
+ Live tests are opt-in:
294
+
295
+ ```bash
296
+ TINYFISH_LIVE_TESTS=1 TINYFISH_API_KEY=... pytest tests/test_live.py
297
+ ```
298
+
299
+ ## Maintainer Docs
300
+
301
+ - [Release operations](docs/operations/release.md)
302
+ - [Compatibility testing](docs/operations/compatibility-testing.md)
303
+ - [OAuth hardening compatibility report](docs/operations/oauth-hardening-compatibility-report.md)
304
+ - [User install smoke test](docs/operations/user-install-smoke-test.md)
305
+ - [Hermes extension points](docs/reference/hermes-extension-points.md)
306
+ - [TinyFish integration notes](docs/reference/tinyfish-integration.md)
307
+ - [Roadmap and non-goals](docs/roadmap.md)
308
+
309
+ ## References
310
+
311
+ - [TinyFish MCP Integration](https://docs.tinyfish.ai/mcp-integration)
312
+ - [TinyFish Authentication](https://docs.tinyfish.ai/authentication)
313
+ - [TinyFish Search API](https://docs.tinyfish.ai/search-api)
314
+ - [TinyFish Fetch API](https://docs.tinyfish.ai/fetch-api)
315
+ - [TinyFish Browser API](https://docs.tinyfish.ai/browser-api)
316
+ - [Hermes Web Search Provider Plugins](https://hermes-agent.nousresearch.com/docs/developer-guide/web-search-provider-plugin)
317
+ - [Hermes Browser Provider Plugins](https://hermes-agent.nousresearch.com/docs/developer-guide/browser-provider-plugin)
318
+ - [Hermes Plugins](https://hermes-agent.nousresearch.com/docs/user-guide/features/plugins)
319
+ - [Hermes MCP](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp)
@@ -0,0 +1,287 @@
1
+ # Hermes TinyFish Plugin
2
+
3
+ [![CI](https://github.com/gabeosx/hermes-plugin-tinyfish/actions/workflows/ci.yml/badge.svg)](https://github.com/gabeosx/hermes-plugin-tinyfish/actions/workflows/ci.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/hermes-plugin-tinyfish.svg)](https://pypi.org/project/hermes-plugin-tinyfish/)
5
+ [![Python](https://img.shields.io/pypi/pyversions/hermes-plugin-tinyfish.svg)](https://pypi.org/project/hermes-plugin-tinyfish/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+ [![Security Policy](https://img.shields.io/badge/Security-policy-green.svg)](SECURITY.md)
8
+
9
+ TinyFish Search and Fetch providers, plus optional TinyFish Browser
10
+ infrastructure, for
11
+ [Hermes Agent](https://hermes-agent.nousresearch.com/docs/).
12
+
13
+ Hermes remains the agent: it plans, chooses tools, and controls browser
14
+ interaction. This plugin supplies web data and, when explicitly enabled, a
15
+ remote browser session underneath Hermes's own browser loop.
16
+
17
+ This is an independent community plugin. It is not affiliated with, endorsed
18
+ by, or maintained by TinyFish or Hermes / Nous Research.
19
+
20
+ TinyFish documentation currently describes Search and Fetch as free and
21
+ Browser as credit-consuming. This plugin treats Search and Fetch as the safe
22
+ default entry point. Pricing and free-use assumptions are based only on current
23
+ TinyFish documentation and may change; Browser defaults to `deny`.
24
+
25
+ ## Install
26
+
27
+ Hermes Git plugin install:
28
+
29
+ ```bash
30
+ hermes plugins install gabeosx/hermes-plugin-tinyfish --enable
31
+ hermes tinyfish setup
32
+ ```
33
+
34
+ Python package install:
35
+
36
+ ```bash
37
+ pip install hermes-plugin-tinyfish
38
+ hermes tinyfish setup
39
+ ```
40
+
41
+ ## Update
42
+
43
+ Update an existing Hermes Git plugin installation:
44
+
45
+ ```bash
46
+ hermes plugins update web-tinyfish
47
+ hermes tinyfish status
48
+ hermes tinyfish doctor
49
+ ```
50
+
51
+ If the plugin was installed as a Python package instead, update it with:
52
+
53
+ ```bash
54
+ python -m pip install --upgrade hermes-plugin-tinyfish
55
+ hermes tinyfish status
56
+ hermes tinyfish doctor
57
+ ```
58
+
59
+ ## Safe Default Setup
60
+
61
+ `hermes tinyfish setup` configures TinyFish for Hermes `web_search` and
62
+ `web_extract` only:
63
+
64
+ ```yaml
65
+ mcp_servers:
66
+ tinyfish:
67
+ url: https://agent.tinyfish.ai/mcp
68
+ auth: oauth
69
+ tools:
70
+ include: [search, fetch_content]
71
+ resources: false
72
+ prompts: false
73
+
74
+ web:
75
+ search_backend: tinyfish
76
+ extract_backend: tinyfish
77
+
78
+ tinyfish:
79
+ credit_policy:
80
+ browser: deny
81
+ ```
82
+
83
+ The plugin prefers TinyFish's hosted OAuth MCP server and falls back to REST
84
+ with `TINYFISH_API_KEY` when MCP OAuth is unavailable. It may save
85
+ `TINYFISH_API_KEY` to `~/.hermes/.env` if you choose API-key fallback.
86
+
87
+ Verify Search and Fetch:
88
+
89
+ ```bash
90
+ hermes tinyfish doctor
91
+ hermes tinyfish doctor --live
92
+ hermes tinyfish doctor --live --transport mcp
93
+ hermes tinyfish doctor --live --transport rest
94
+ ```
95
+
96
+ `doctor --live` runs independent Search and Fetch checks and exits nonzero if
97
+ either fails. The default `auto` transport remains MCP-first and may use the
98
+ REST fallback. Use `--transport mcp` to test OAuth without allowing REST to
99
+ hide an MCP failure, or `--transport rest` to test only the API-key path.
100
+
101
+ If MCP reports that authorization must be renewed:
102
+
103
+ ```bash
104
+ hermes tinyfish reauth
105
+ ```
106
+
107
+ The command replaces the current plugin CLI process with Hermes's supported
108
+ `hermes mcp login tinyfish` command; it does not start a nested Hermes process.
109
+ If a gateway or another Hermes process shares the same Hermes home, pause that
110
+ process and any supervisor or watchdog for the maintenance window. The plugin
111
+ does not stop host services automatically.
112
+
113
+ Complete the browser flow, restore and reload or restart affected Hermes
114
+ processes, then verify the recovered OAuth path with
115
+ `hermes tinyfish doctor --live --transport mcp`. The plugin never deletes,
116
+ rewrites, or validates Hermes's OAuth token files itself.
117
+
118
+ For browser authorization from a headless or remote terminal:
119
+
120
+ - Complete one authorization flow at a time and never combine an authorization
121
+ URL with a callback URL from another attempt.
122
+ - Terminal wrapping is visual. Copy the entire URL and do not manually edit
123
+ OAuth characters such as `state` or the PKCE challenge.
124
+ - If copied terminal text contains line breaks, remove only whitespace. In a
125
+ local Blink shell on iOS/iPadOS, for example:
126
+
127
+ ```bash
128
+ pbpaste | tr -d '\r\n\t ' | pbcopy
129
+ ```
130
+
131
+ - If Hermes prints another authorization URL before reporting success, stop
132
+ that attempt rather than authorizing multiple URLs.
133
+ - Treat the MCP-only doctor as authoritative. Some Hermes versions can print
134
+ an authentication failure while still returning shell status 0.
135
+
136
+ ## Search and Fetch Options
137
+
138
+ Optional REST fallback defaults can be configured in `config.yaml`:
139
+
140
+ ```yaml
141
+ tinyfish:
142
+ search:
143
+ location: US
144
+ language: en
145
+ recency_minutes: 1440
146
+ domain_type: web
147
+ page: 0
148
+ fetch:
149
+ format: markdown
150
+ links: false
151
+ image_links: false
152
+ ttl: 3600
153
+ ```
154
+
155
+ MCP remains the preferred path when configured. These options apply only to
156
+ REST fallback calls.
157
+
158
+ ## Optional Browser Provider
159
+
160
+ TinyFish Browser can supply remote browser infrastructure for Hermes after
161
+ explicit opt-in:
162
+
163
+ ```yaml
164
+ browser:
165
+ cloud_provider: tinyfish
166
+ tinyfish:
167
+ credit_policy:
168
+ browser: request
169
+ ```
170
+
171
+ Browser policy values are:
172
+
173
+ - `deny`: fail closed; this is the default.
174
+ - `request`: use Hermes's approval flow for each `browser_*` tool invocation.
175
+ - `allow`: run Browser tools without per-invocation approval.
176
+
177
+ Manage the policy with:
178
+
179
+ ```bash
180
+ hermes tinyfish credits status
181
+ hermes tinyfish credits set browser request
182
+ hermes tinyfish credits reset
183
+ ```
184
+
185
+ `credits reset` restores `browser: deny` and removes retired Agent/Profile
186
+ policy keys left by plugin `0.2.x`.
187
+
188
+ ## Why TinyFish Agent Is Not Included
189
+
190
+ TinyFish Agent performs delegated goal-based web automation. Hermes already
191
+ owns planning and browser interaction, so exposing a second agent loop through
192
+ this provider is duplicative and makes control, approval, and billing less
193
+ clear. The plugin therefore does not register TinyFish Agent tools or manage
194
+ Browser Context Profiles.
195
+
196
+ Users who specifically need TinyFish's delegated Agent, Profile, Vault, batch,
197
+ or streaming capabilities can configure TinyFish's full MCP service
198
+ independently in Hermes. Those tools are outside this plugin's setup, policy,
199
+ diagnostics, and compatibility guarantees. The plugin-managed `tinyfish` MCP
200
+ entry intentionally remains restricted to `search` and `fetch_content`.
201
+
202
+ ## Diagnostics and Migration
203
+
204
+ ```bash
205
+ hermes tinyfish status
206
+ hermes tinyfish usage
207
+ hermes tinyfish doctor --live
208
+ hermes tinyfish doctor --live --transport mcp
209
+ hermes tinyfish doctor --live-paid
210
+ ```
211
+
212
+ - `status` is non-secret and reports ignored `0.2.x` policy keys under
213
+ `retired_credit_policy_keys`.
214
+ - `mcp_token_cached` reports only whether Hermes's expected cache file is
215
+ present. It does not mean the access or refresh token is valid.
216
+ - `/tinyfish-status` shows non-networked status inside CLI or gateway sessions;
217
+ `/tinyfish-status live` explicitly runs Search and Fetch checks.
218
+ - `usage` reads TinyFish Fetch operation history; it is not Agent or Browser
219
+ billing data.
220
+ - `doctor --live-paid` only creates and closes a TinyFish Browser session. It
221
+ refuses under `deny`, requests approval under `request`, and never prints
222
+ connection URLs or credentials.
223
+ - The former `agent` and `profiles` commands and model-callable Agent tools are
224
+ intentionally removed. Existing remote TinyFish runs, profiles, credentials,
225
+ and saved state are not changed.
226
+
227
+ ## Upgrade Safety
228
+
229
+ This plugin uses public Hermes extension points:
230
+
231
+ - `ctx.register_web_search_provider(...)`
232
+ - `ctx.register_browser_provider(...)`
233
+ - `ctx.register_hook("pre_tool_call", ...)` for Browser credit policy
234
+ - `ctx.register_cli_command(...)`
235
+ - `ctx.register_command(...)` for `/tinyfish-status`
236
+ - `ctx.dispatch_tool(...)` for registered TinyFish MCP calls
237
+ - Hermes MCP configuration under `mcp_servers`
238
+ - Hermes environment helpers for optional API-key fallback
239
+
240
+ It does not patch Hermes Agent, update scripts, Dockerfiles, or files inside a
241
+ Hermes installation or source checkout. A narrow legacy compatibility shim
242
+ still asks Hermes to discover configured MCP servers when TinyFish tools have
243
+ not been registered in the current process. It is retained because removing it
244
+ reintroduces a previously observed MCP-to-REST regression; it will be removed
245
+ only after every supported Hermes surface owns discovery through a public API.
246
+
247
+ ## Development
248
+
249
+ ```bash
250
+ python -m venv .venv
251
+ source .venv/bin/activate
252
+ python -m pip install -U pip
253
+ python -m pip install -e ".[dev]"
254
+ ruff format .
255
+ ruff check .
256
+ mypy hermes_plugin_tinyfish
257
+ pytest --cov=hermes_plugin_tinyfish --cov-fail-under=70
258
+ python -m build
259
+ ```
260
+
261
+ Live tests are opt-in:
262
+
263
+ ```bash
264
+ TINYFISH_LIVE_TESTS=1 TINYFISH_API_KEY=... pytest tests/test_live.py
265
+ ```
266
+
267
+ ## Maintainer Docs
268
+
269
+ - [Release operations](docs/operations/release.md)
270
+ - [Compatibility testing](docs/operations/compatibility-testing.md)
271
+ - [OAuth hardening compatibility report](docs/operations/oauth-hardening-compatibility-report.md)
272
+ - [User install smoke test](docs/operations/user-install-smoke-test.md)
273
+ - [Hermes extension points](docs/reference/hermes-extension-points.md)
274
+ - [TinyFish integration notes](docs/reference/tinyfish-integration.md)
275
+ - [Roadmap and non-goals](docs/roadmap.md)
276
+
277
+ ## References
278
+
279
+ - [TinyFish MCP Integration](https://docs.tinyfish.ai/mcp-integration)
280
+ - [TinyFish Authentication](https://docs.tinyfish.ai/authentication)
281
+ - [TinyFish Search API](https://docs.tinyfish.ai/search-api)
282
+ - [TinyFish Fetch API](https://docs.tinyfish.ai/fetch-api)
283
+ - [TinyFish Browser API](https://docs.tinyfish.ai/browser-api)
284
+ - [Hermes Web Search Provider Plugins](https://hermes-agent.nousresearch.com/docs/developer-guide/web-search-provider-plugin)
285
+ - [Hermes Browser Provider Plugins](https://hermes-agent.nousresearch.com/docs/developer-guide/browser-provider-plugin)
286
+ - [Hermes Plugins](https://hermes-agent.nousresearch.com/docs/user-guide/features/plugins)
287
+ - [Hermes MCP](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp)