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
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The installable plugin is in [`diffbot/`](diffbot/). Its [README](diffbot/README

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).

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.
The plugin covers the `diffbot` sync client pinned in `diffbot/requirements.txt`. 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 @@ -38,15 +38,15 @@ Python 3.12+:

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

`diffbot/requirements.txt` pins `diffbot==3.4.1`, which is on PyPI. `requirements-dev.txt` does not contain a machine-local path.
The exact `diffbot` SDK pin lives in `diffbot/requirements.txt`, which is on PyPI. `requirements-dev.txt` includes that file and 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.1`) 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 in `diffbot/requirements.txt` and its native `verify_token`, `crawl_download`, and extract options.

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

## Release

Expand Down Expand Up @@ -74,10 +74,12 @@ The workflow does not sign the package and does not submit it to the Dify Market
For local testing, 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.2.0.difypkg
dify plugin checksum dist/diffbot-0.2.0.difypkg
dify plugin package ./diffbot -o dist/diffbot-<version>.difypkg
dify plugin checksum dist/diffbot-<version>.difypkg
```

`<version>` is the plugin version from the [latest release](https://github.com/diffbot/dify-diffbot/releases/latest), as in the `diffbot-<version>.difypkg` name above.

`dist/` is ignored by git. The package is unsigned, whether built locally or by the release workflow; Dify signs marketplace builds after review. Self-hosted Dify rejects unsigned installs (local file or GitHub) unless an administrator trusts a signature or turns off verification. Signing commands are in `diffbot/README.md`. Never commit a private key.

Marketplace validation is `validator/validate-difypkg.py` from [langgenius/dify-marketplace-toolkit](https://github.com/langgenius/dify-marketplace-toolkit). The last result is recorded in SUBMISSION.md.
10 changes: 6 additions & 4 deletions diffbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Search the public web and the Diffbot Knowledge Graph from a Dify agent or workflow.

Diffbot structures pages and keeps a knowledge graph of organizations, people, and articles. This plugin covers the Diffbot Python SDK 3.4.1 feature set: web search, Ask, page extraction, raw DQL and ontology lookup, organization, people and news search, crawling, NLP, entity resolution, and account usage. A free token from [app.diffbot.com/get-started](https://app.diffbot.com/get-started) is enough to authenticate.
Diffbot structures pages and keeps a knowledge graph of organizations, people, and articles. This plugin covers the Diffbot Python SDK feature set pinned in `requirements.txt`: web search, Ask, page extraction, raw DQL and ontology lookup, organization, people and news search, crawling, NLP, entity resolution, and account usage. A free token from [app.diffbot.com/get-started](https://app.diffbot.com/get-started) is enough to authenticate.

Published by Diffbot. Source: https://github.com/diffbot/dify-diffbot. Support: support@diffbot.com.

Expand Down Expand Up @@ -55,15 +55,17 @@ Each tagged version has a GitHub Release at https://github.com/diffbot/dify-diff
From the repository root, with the [Dify plugin CLI](https://github.com/langgenius/dify-plugin-daemon) installed:

```bash
dify plugin package ./diffbot -o dist/diffbot-0.2.0.difypkg
dify plugin package ./diffbot -o dist/diffbot-<version>.difypkg
```

`<version>` is the plugin version from the [latest release](https://github.com/diffbot/dify-diffbot/releases/latest), as in the `diffbot-<version>.difypkg` name in the GitHub install section above.

In Dify, open Plugins and install the `.difypkg` from a local file. Self-hosted Dify verifies signatures by default. Either install on a server that trusts a key you control, or sign the file:

```bash
dify signature generate -f your_key_pair
dify signature sign dist/diffbot-0.2.0.difypkg -p your_key_pair.private.pem
dify signature verify dist/diffbot-0.2.0.signed.difypkg -p your_key_pair.public.pem
dify signature sign dist/diffbot-<version>.difypkg -p your_key_pair.private.pem
dify signature verify dist/diffbot-<version>.signed.difypkg -p your_key_pair.public.pem
```

Keep the private key off this repository. Marketplace publication signs with Dify's key after review, so a third-party signature is only for Community Edition installs outside the marketplace. See [third-party signature verification](https://docs.dify.ai/en/develop-plugin/publishing/standards/third-party-signature-verification).
Expand Down