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
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # npm trusted publishing (OIDC): no npm token anywhere
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
registry-url: 'https://registry.npmjs.org'
# Trusted publishing needs npm >= 11.5.1 (Node 22's bundled npm is 10).
- run: npm install -g npm@11
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm test
Expand All @@ -27,6 +29,7 @@ jobs:
run: test -z "$(git status --porcelain -- lib)"
- name: Tag matches package version
run: test "v$(node -p "require('./package.json').version")" = "${GITHUB_REF_NAME}"
# @refkit/dsh-plugin lists this repo and `release.yml` as its trusted publisher on
# npmjs.com, so npm exchanges the job's OIDC token here and signs provenance.
# No registry-url / NODE_AUTH_TOKEN: an `_authToken` in .npmrc would bypass OIDC.
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.3.2

- **Published with provenance.** Releases now go out from GitHub Actions through npm trusted publishing instead of a long-lived npm token, so each version carries a signed provenance statement that links it to the commit and workflow run that built it. No code changes.

## 0.3.1

- **dsh 0.2.1.** Runs on dsh 0.2.1-rc.2 as well as 0.1.7-rc.2: `engines.dsh` and the dsh peers are `^0.1.7-rc.2 || ^0.2.1-rc.2`. dsh 0.2.1 refuses 0.2.0 and 0.3.0, which only declare `^0.1.7-rc.2`; if you upgraded dsh with one of them installed, remove the plugin and add it again.
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { wikimediaCommons } from "@refkit/provider-wikimedia-commons";
import { defineTool } from "@deepseek-ai/dsh-tools";
//#region src/config.ts
/** Kept in sync with package.json by tests/config.test.ts. */
const PLUGIN_VERSION = "0.3.1";
const PLUGIN_VERSION = "0.3.2";
const KEY_FIELDS = [
"unsplashAccessKey",
"pexelsApiKey",
Expand Down Expand Up @@ -85,7 +85,7 @@ function resolveConfig(config, env = process.env) {
timeoutMs: clampInt(config.timeoutMs, DEFAULTS.timeoutMs, 1e3, 6e4),
rerank: config.rerank ?? DEFAULTS.rerank,
sourceConfidence: config.sourceConfidence ?? DEFAULTS.sourceConfidence,
userAgent: nonEmpty(config.userAgent) ?? `refkit-dsh-plugin/0.3.1`
userAgent: nonEmpty(config.userAgent) ?? `refkit-dsh-plugin/0.3.2`
};
}
const k = (cfg, field) => cfg.keys[field] ?? "";
Expand Down
2 changes: 1 addition & 1 deletion lib/types/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import z from '@deepseek-ai/schemastery';
import { type ReferenceProvider, type RefkitClient, type RefkitOptions } from '@refkit/core';
import type { Modality } from './core/outcome.ts';
/** Kept in sync with package.json by tests/config.test.ts. */
export declare const PLUGIN_VERSION = "0.3.1";
export declare const PLUGIN_VERSION = "0.3.2";
export declare const KEY_FIELDS: readonly ["unsplashAccessKey", "pexelsApiKey", "pixabayKey", "flickrApiKey", "smithsonianApiKey", "braveToken", "freesoundToken", "jamendoClientId", "europeanaApiKey", "openverseToken"];
export type KeyField = (typeof KEY_FIELDS)[number];
/** Environment names per key, first match wins. The nine keyed sources mirror @refkit/mcp's CLI. */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@refkit/dsh-plugin",
"version": "0.3.1",
"version": "0.3.2",
"description": "DeepSeek Harness plugin for refkit: license-normalized creative reference search across 24 sources from 19 provider packages and 4 modalities, a strict-deny use-gate, and a web card with license and use-verdict badges (refkit_search / refkit_rights).",
"icon": "./icon.svg",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { wikimediaCommons } from '@refkit/provider-wikimedia-commons'
import type { Modality } from './core/outcome.ts'

/** Kept in sync with package.json by tests/config.test.ts. */
export const PLUGIN_VERSION = '0.3.1'
export const PLUGIN_VERSION = '0.3.2'

export const KEY_FIELDS = [
'unsplashAccessKey', 'pexelsApiKey', 'pixabayKey', 'flickrApiKey', 'smithsonianApiKey',
Expand Down
Loading