Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# Changelog

## Unreleased (still plugin 0.1.0)
## 0.2.0 - SDK 3.4.1 parity

Pins `diffbot==3.4.1` (exact). Not released: no tag, no marketplace submission.

### Added

- `kg_query`: raw DQL with count-only, `size` 0 to 100, offset, and the SDK's named options (`type`, `col`, `filter`, `filter_exclude`, `exportspec`, `exportseparator`, `jsonmode`, `non_canonical_facts`, `no_dedup_articles`, `cluster`, `format`). JSON and jsonl are scrubbed of `emails`, `phoneNumbers`, and `html` and capped at 200,000 characters (`truncated` flag). csv, xls and xlsx come back as files and are not scrubbed.
- `kg_ontology`: types, composites, enums, taxonomies, fields, taxonomy values, enum values, name search, and a raw ontology file. One in-memory copy per ontology URL, 24 hour TTL, stale copy served on a failed refresh, five minute back-off.
- `ask`: Diffbot's LLM with text (streamed), JSON, or JSON-schema output.
- `nlp`: single-document NLP with selectable fields, language, format, document type, and summary length.
- `account_usage`: plan, status and daily usage only. Never the token, child tokens, or email.
- Advanced credential fields `api_base`, `kg_base`, `llm_base`, `nlp_base`. https on `diffbot.com` hosts only.
- `search_web`: up to five queries.
- `search_organizations`, `search_people`, `search_news`: `count_only`. The organization `industry` is matched against the `OrganizationCategory` taxonomy, with suggestions on a miss.
- `extract`: the `job` page type and an optional Custom API name.
- `crawl_start`: `url_crawl_regex`, `url_process_regex`, `page_process_pattern`, per-subdomain limits, `notify_webhook`, `notify_email`, and multi-line `custom_headers`.

### Changed

- Crawl robots.txt, proxy and canonical settings are now three-way selects (`obey_robots_mode`, `use_proxies_mode`, `use_canonical_mode`): Diffbot default (parameter omitted), on, off (`0`). On SDK 3.4.1 an explicit `False` is sent as `0`, so the old boolean fields, which Dify saves as `false`, would have made existing nodes ignore robots.txt. The old field names are no longer read.
- Plugin version 0.2.0 (`manifest.yaml` and `pyproject.toml`). The memory limit stays at 64 MB.
- Marketplace validator results in SUBMISSION.md are for the 3.4.0 / 0.1.0 package and are stale until rerun on 0.2.0.

## Earlier, still plugin 0.1.0

- Removed the `client.request()` fallbacks in `diffbot/tools/sdk.py` for `verify_token`, `crawl_download`, and extract options, and the local response TypedDicts in `tools/sdk_types.py`. `diffbot==3.4.0` has all of them natively. No behavior change.
- Reran the marketplace validator on the rebuilt package; results are in SUBMISSION.md.
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ The installable plugin is in [`diffbot/`](diffbot/). Its [README](diffbot/README
| Start crawl | `GET https://api.diffbot.com/v3/crawl` (create only; returns a job name) |
| Crawl jobs | list / status / results / **delete (destructive)** on `/v3/crawl` and `/v3/crawl/data` |
| Resolve entities | `POST https://nl.diffbot.com/v1/` |
| Knowledge Graph query | `POST https://kg.diffbot.com/kg/v3/dql` (raw DQL; JSON/jsonl scrubbed, csv/xls/xlsx exports not) |
| Knowledge Graph ontology | `GET https://kg.diffbot.com/kg/ontology` (no token; 24 h in-memory cache) |
| Ask Diffbot | `POST https://llm.diffbot.com/rag/v1/chat/completions` (bearer token; undocumented endpoint) |
| Natural language analysis | `POST https://nl.diffbot.com/v1/` |
| Account usage | `GET https://api.diffbot.com/v4/account` |

Saving the credential checks `GET https://api.diffbot.com/v4/account?days=1`. Get a free token at [app.diffbot.com/get-started](https://app.diffbot.com/get-started).

Raw DQL, ontology lookup, Ask, places, and deals are not in this version. See SUBMISSION.md for why.
The plugin covers the `diffbot` 3.4.1 sync client. Enhance, Bulk Extract, Custom API management, crawl pause/restart, and the file-writing ontology refresh are not included. See SUBMISSION.md.

All HTTP goes through the [Diffbot Python SDK](https://github.com/diffbot/diffbot-python) (`diffbot.Diffbot`), behind a transport that refuses private, loopback, and cloud-metadata hosts.

Expand All @@ -33,23 +38,23 @@ Python 3.12+:

```bash
python -m venv .venv && . .venv/bin/activate
pip install -r requirements-dev.txt # dify_plugin, pytest, and diffbot==3.4.0
pip install -r requirements-dev.txt # dify_plugin, pytest, and diffbot==3.4.1
pytest -q
```

`diffbot/requirements.txt` pins `diffbot==3.4.0`, which is on PyPI. `requirements-dev.txt` does not contain a machine-local path.
`diffbot/requirements.txt` pins `diffbot==3.4.1`, which is on PyPI. `requirements-dev.txt` does not contain a machine-local path.

The tests serve every request from `httpx.MockTransport` and make no Diffbot calls. The wiring tests run against the pinned SDK (`diffbot==3.4.0`) and its native `verify_token`, `crawl_download`, and extract options.
The tests serve every request from `httpx.MockTransport` and make no Diffbot calls. The wiring tests run against the pinned SDK (`diffbot==3.4.1`) and its native `verify_token`, `crawl_download`, and extract options.

GitHub CI (`.github/workflows/test.yml`) installs `diffbot/requirements.txt`, including `diffbot==3.4.0`, and runs the full suite.
GitHub CI (`.github/workflows/test.yml`) installs `diffbot/requirements.txt`, including `diffbot==3.4.1`, and runs the full suite.

## Package

Install the Dify plugin CLI from [langgenius/dify-plugin-daemon](https://github.com/langgenius/dify-plugin-daemon) and run from the repository root:

```bash
dify plugin package ./diffbot -o dist/diffbot-0.1.0.difypkg
dify plugin checksum dist/diffbot-0.1.0.difypkg
dify plugin package ./diffbot -o dist/diffbot-0.2.0.difypkg
dify plugin checksum dist/diffbot-0.2.0.difypkg
```

`dist/` is ignored by git. The package is unsigned; Dify signs marketplace builds after review. Self-hosted Dify rejects unsigned local installs unless an administrator trusts a signature or turns off verification. Signing commands are in `diffbot/README.md`. Never commit a private key.
Expand Down
Loading
Loading