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
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

## 0.3.0

Built on refkit core 0.10 and the provider releases that go with it; they come in as dependencies, nothing to install by hand.

- **24 sources.** The new `polyhaven-hdri` source searches Poly Haven's HDRIs (no key needed), next to `polyhaven` for its textures.
- **Durations.** Audio and video results carry `durationSec`. The card shows it as an `m:ss` badge, and the result text the model reads names it after the source (`freesound — 1:05`). The sources that report a length are openverse-audio, freesound, jamendo, pexels-video and pixabay-video.
- **Album art and video posters on the card.** A video tile shows its poster under a ▶ mark, never the video file. An audio tile shows its album art and falls back to ♪ when there is none.
- **Honest sizes.** `width` and `height` are the original's size. When a source only knows the size of its preview (flickr, pixabay-video), the tile uses that, so it keeps its aspect ratio.
- New export `RETIRED_SOURCE_IDS`: source ids that once shipped and stay valid in `sources` (empty today).
- Settings, the tool description and the docs say "source ids" instead of "provider ids" (dsh uses "provider" for LLM providers).

### Breaking

- The `PROVIDER_IDS` export is now `SOURCE_IDS`.
- In the `refkit_search` output, each reference names its source in `source` instead of `provider`. Cards saved in conversations by 0.2.0 still render.
- With `explain`, `meta` is core 0.10's search metadata and uses its key names: `sources` (was `providers`), `sourceId` in each entry (was `providerId`), and `controls.appliedBySource` / `ignoredBySource` (were `appliedByProvider` / `ignoredByProvider`).
- Requires `@refkit/core` 0.10. A client built with an older core, for example one passed to `applyWith`, no longer fits.

## 0.2.0

- Ported to dsh 0.1.7 (requires `^0.1.7-rc.2`). Settings are live: an edit applies on the next call without a restart, and an unknown `sources` id is refused when saving.
- A settings page on dsh's Plugins page (Plugins (sidebar) → refkit → Components → refkit) for the API keys, which are write-only and shown as Set / Not set, and for search tuning.
- Display metadata on the Plugins page: title, English and Chinese description, icon.
- The card follows the call through preparing, searching and the result. Wikimedia Commons thumbnails are 500 px.
- The first version published to npm.

## 0.1.0

- First release, for dsh 0.1.5-rc.2. `refkit_search` searches up to 23 sources, normalizes their licenses, and can annotate each result with a use-verdict and a credit line, or keep only the usable ones. `refkit_rights` re-checks one license for another intent. A web card shows license chips and verdict badges. Keys come from the settings or from the same environment variables as `@refkit/mcp`.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ English | [中文](README.zh.md)

[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin for [refkit](https://github.com/refkitjs/refkit): license-normalized creative reference search as native agent tools, with a web card that shows the license and the use-verdict on every result.

- **`refkit_search`** — one call fans out to up to 23 sources (Openverse, Met, Art Institute of Chicago, Wikimedia Commons, Rijksmuseum, Smithsonian, Internet Archive, Project Gutenberg, PoetryDB, Poly Haven, ambientCG, Europeana, Unsplash, Pexels, Pixabay, Flickr, Freesound, Jamendo, Brave, nailbook), merges and reranks the results, and returns each with its license id, canonical link, and — when you pass an `intent` — a use-verdict and a ready credit line.
- **`refkit_search`** — one call fans out to up to 24 sources (Openverse images and audio, Met, Art Institute of Chicago, Wikimedia Commons, Rijksmuseum, Smithsonian, Internet Archive, Project Gutenberg, PoetryDB, Poly Haven textures and HDRIs, ambientCG, Europeana, Unsplash, Pexels, Pixabay, Flickr, Freesound, Jamendo, Brave, nailbook), merges and reranks the results, and returns each with its source id, license id, canonical link, the length of audio and video clips where the source reports it, and — when you pass an `intent` — a use-verdict and a ready credit line.
- **`refkit_rights`** — re-check one license for a different intent without searching again.
- **Web card** — thumbnail grid; license chip on every tile; green / blue / red / amber badges for allowed / credit required / not allowed / needs review; one-click credit copy.
- **Web card** — thumbnail grid; source and license chips on every tile; video posters with a play mark, album art on audio, and an `m:ss` length badge on both; green / blue / red / amber badges for allowed / credit required / not allowed / needs review; one-click credit copy.

Eleven sources work with no key at all (Openverse, Met, Art Institute of Chicago, Wikimedia Commons, Rijksmuseum, Internet Archive, Project Gutenberg, PoetryDB, Poly Haven, ambientCG, nailbook). Add free keys for the rest under **Plugins (sidebar) → refkit → Components → refkit**.
Thirteen of the 24 sources work with no key at all (Openverse images and audio, Met, Art Institute of Chicago, Wikimedia Commons, Rijksmuseum, Internet Archive, Project Gutenberg, PoetryDB, Poly Haven textures and HDRIs, ambientCG, nailbook). Add free keys for the rest under **Plugins (sidebar) → refkit → Components → refkit**.

## Install

Expand Down Expand Up @@ -39,14 +39,14 @@ Keys and tuning are set on **Plugins (sidebar) → refkit → Components → ref

| Field | Default | Meaning |
| --- | --- | --- |
| `sources` | `[]` | Provider ids to enable; empty = every source whose key is present |
| `limit` | `12` | Default results per call (1–30); also caps per-item detail fetches for met, rijksmuseum, polyhaven |
| `sources` | `[]` | Source ids to enable; empty = every source whose key is present |
| `limit` | `12` | Default results per call (1–30); also caps per-item detail fetches for met, rijksmuseum, polyhaven, polyhaven-hdri |
| `poolFactor` | `2` | Rank-fusion pool multiplier (1–4) |
| `deadlineMs` | `15000` | Whole-search deadline |
| `timeoutMs` | `10000` | Per-source timeout |
| `rerank` | `true` | Lexical reranker over title, description, tags and excerpt (CJK aware) |
| `sourceConfidence` | `true` | Down-weight sources whose batch never mentions the query |
| `userAgent` | `refkit-dsh-plugin/<version>` | Sent with provider requests |
| `userAgent` | `refkit-dsh-plugin/<version>` | Sent with source requests |

## Tools

Expand All @@ -58,14 +58,16 @@ Keys and tuning are set on **Plugins (sidebar) → refkit → Components → ref
| `modalities` | `image` `video` `audio` `text` | Default `["image"]` |
| `intent` | `internal-moodboard` `commercial-product` `ai-generation-input` `redistribution` | Annotate every result with a use-verdict and credit line |
| `gateFor` | same | Return only results whose license allows the intent |
| `sources` | string[] | Restrict to provider ids |
| `sources` | string[] | Restrict to source ids (`polyhaven-hdri` for HDRIs, `openverse-audio` for audio, …) |
| `limit` | 1–30 | Default from configuration |
| `cursor` | string | Continuation from a previous `nextCursor` |
| `controls` | object | orientation, color, language, sort, safety, license, media, creator, text, page |
| `minRelevance` | 0–1 | Drop results the reranker scored below this |
| `explain` | boolean | Include per-source diagnostics under `meta` |

Example prompts: “find me reference photos of brutalist libraries I can use in a commercial pitch deck”, “给我找几张可以商用的赛博朋克街景参考图”, “a public-domain poem about the sea for a poster”.
Each result names its `source` id and carries its license, canonical link, thumbnail (a video's poster, a track's album art) and, for audio and video when the source reports it, `durationSec`; `width`/`height` are the original's size, or the preview's when the source does not report it.

Example prompts: “find me reference photos of brutalist libraries I can use in a commercial pitch deck”, “给我找几张可以商用的赛博朋克街景参考图”, “a public-domain poem about the sea for a poster”, “an outdoor HDRI for lighting a product render”, “a short rain sound effect for a game trailer”.

### `refkit_rights`

Expand Down
14 changes: 8 additions & 6 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(dsh)插件,封装了 [refkit](https://github.com/refkitjs/refkit) 参考搜索库:将经过许可证归一化处理的创意素材搜索能力,变成原生 agent 工具,并配有网页卡片,在每条结果上展示许可证与使用判定。

- **`refkit_search`** — 一次调用即可扇出到多达 23 个来源(Openverse、Met、Art Institute of Chicago、Wikimedia Commons、Rijksmuseum、Smithsonian、Internet Archive、Project Gutenberg、PoetryDB、Poly Haven、ambientCG、Europeana、Unsplash、Pexels、Pixabay、Flickr、Freesound、Jamendo、Brave、nailbook),合并并重新排序结果,并为每条结果返回其许可证 id、canonical 链接,以及——当你传入 `intent` 时——使用判定和一条可直接使用的署名文本。
- **`refkit_search`** — 一次调用即可扇出到多达 24 个来源(Openverse 图片与音频、Met、Art Institute of Chicago、Wikimedia Commons、Rijksmuseum、Smithsonian、Internet Archive、Project Gutenberg、PoetryDB、Poly Haven 纹理与 HDRI、ambientCG、Europeana、Unsplash、Pexels、Pixabay、Flickr、Freesound、Jamendo、Brave、nailbook),合并并重新排序结果,并为每条结果返回其来源 id、许可证 id、canonical 链接、音频和视频的时长(来源提供时),以及——当你传入 `intent` 时——使用判定和一条可直接使用的署名文本。
- **`refkit_rights`** — 针对不同的使用意图重新校验同一条许可证,无需重新搜索。
- **网页卡片** — 缩略图网格;每个卡片都带许可证标签;绿 / 蓝 / 红 / 黄四色徽章分别对应 allowed(允许) / credit required(需署名) / not allowed(不允许) / needs review(需人工复核);一键复制署名文本。
- **网页卡片** — 缩略图网格;每个卡片都带来源和许可证标签;视频显示封面帧并叠加播放标记,音频显示专辑封面,两者都带 `m:ss` 时长徽章;绿 / 蓝 / 红 / 黄四色徽章分别对应 allowed(允许) / credit required(需署名) / not allowed(不允许) / needs review(需人工复核);一键复制署名文本。

十一个来源无需任何密钥即可使用(Openverse、Met、Art Institute of Chicago、Wikimedia Commons、Rijksmuseum、Internet Archive、Project Gutenberg、PoetryDB、Poly Haven、ambientCG、nailbook)。其余来源在「插件(侧边栏)→ refkit → 包含的组件 → refkit」里填入免费密钥即可启用。
24 个来源中有 13 个无需任何密钥即可使用(Openverse 图片与音频、Met、Art Institute of Chicago、Wikimedia Commons、Rijksmuseum、Internet Archive、Project Gutenberg、PoetryDB、Poly Haven 纹理与 HDRI、ambientCG、nailbook)。其余来源在「插件(侧边栏)→ refkit → 包含的组件 → refkit」里填入免费密钥即可启用。

## 安装

Expand Down Expand Up @@ -40,7 +40,7 @@ dsh plugin --profile web add github:refkitjs/dsh-plugin
| 字段 | 默认值 | 含义 |
| --- | --- | --- |
| `sources` | `[]` | 要启用的来源 id;为空 = 启用所有已配置 key 的来源 |
| `limit` | `12` | 每次调用默认返回的结果数(1–30);也限制 met、rijksmuseum、polyhaven 的逐条详情拉取数量 |
| `limit` | `12` | 每次调用默认返回的结果数(1–30);也限制 met、rijksmuseum、polyhaven、polyhaven-hdri 的逐条详情拉取数量 |
| `poolFactor` | `2` | 排序融合(rank-fusion)的候选池倍数(1–4) |
| `deadlineMs` | `15000` | 整次搜索的截止时间 |
| `timeoutMs` | `10000` | 单个来源的超时时间 |
Expand All @@ -58,14 +58,16 @@ dsh plugin --profile web add github:refkitjs/dsh-plugin
| `modalities` | `image` `video` `audio` `text` | 默认 `["image"]` |
| `intent` | `internal-moodboard` `commercial-product` `ai-generation-input` `redistribution` | 为每条结果附加使用判定和署名文本 |
| `gateFor` | 同上 | 仅返回许可证允许该用途的结果 |
| `sources` | string[] | 限定到特定的来源 id |
| `sources` | string[] | 限定到特定的来源 id(例如 HDRI 用 `polyhaven-hdri`,音频用 `openverse-audio`) |
| `limit` | 1–30 | 默认取自配置 |
| `cursor` | string | 沿用上一次结果里的 `nextCursor` 继续翻页 |
| `controls` | object | orientation、color、language、sort、safety、license、media、creator、text、page |
| `minRelevance` | 0–1 | 丢弃重排序分数低于该值的结果 |
| `explain` | boolean | 在 `meta` 下附带每个来源的诊断信息 |

示例提示词:“find me reference photos of brutalist libraries I can use in a commercial pitch deck”、“给我找几张可以商用的赛博朋克街景参考图”、“a public-domain poem about the sea for a poster”。
每条结果都标明其来源 id(`source`),并带有许可证、canonical 链接、缩略图(视频的封面帧、音轨的专辑封面),音频和视频在来源提供时还带有 `durationSec`(时长,秒);`width`/`height` 是原件尺寸,来源未提供时取预览文件的尺寸。

示例提示词:“find me reference photos of brutalist libraries I can use in a commercial pitch deck”、“给我找几张可以商用的赛博朋克街景参考图”、“a public-domain poem about the sea for a poster”、“找一张户外 HDRI 用来给产品渲染打光”、“一段用于游戏预告片的短雨声音效”。

### `refkit_rights`

Expand Down
2 changes: 1 addition & 1 deletion cordis.patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- id: refkit
name: '@refkit/dsh-plugin'
config:
# sources: [] # whitelist of provider ids; empty = every enabled source
# sources: [] # whitelist of source ids; empty = every enabled source
# limit: 12 # default results per call (1..30); also caps museum detail fetches
# poolFactor: 2 # fusion pool multiplier (1..4)
# deadlineMs: 15000 # whole-search deadline
Expand Down
Loading
Loading