driftnet 0.8.0 → 0.10.0

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.
@@ -0,0 +1,25 @@
1
+ // A judge plugin: files every YouTube link under "videos" and everything from
2
+ // GitHub under "coding", for free. Copy to ~/.driftnet/plugins/, restart, then
3
+ // set DRIFTNET_JUDGE=rainbow. A plugin file may export any of
4
+ // { extractors, providers, judges }; this one only adds a judge.
5
+ //
6
+ // A model provider has the same shape: providers: { name: (env) => ({ label, complete }) },
7
+ // chosen with DRIFTNET_LLM_PROVIDER=name. `complete({ system, user, schema, ... })`
8
+ // must return data that passes `schema.parse` (a zod schema).
9
+
10
+ /** The judge's answer, or null to let the model decide. `categories` maps folder id → "Path — description". */
11
+ export default {
12
+ judges: {
13
+ rainbow: () => ({
14
+ name: "rainbow",
15
+ async judge(digest, _note, categories) {
16
+ const host = new URL(digest.url).hostname.replace(/^www\./, "");
17
+ const folder = host.endsWith("youtube.com") || host === "youtu.be" ? "videos" : host === "github.com" ? "coding" : undefined;
18
+ if (!folder || !(folder in categories)) return null;
19
+ return {
20
+ judgement: { isAiTool: 0.5, category: folder, kind: digest.kind, worth: "normal", engine: "rainbow", confidence: 1 },
21
+ };
22
+ },
23
+ }),
24
+ },
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "driftnet",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "mcpName": "io.github.KevinChu1110/driftnet",
5
5
  "description": "Drop links into any chat; get them sorted, explained and searchable, for you and your agents. Any model, or none.",
6
6
  "license": "MIT",
@@ -12,6 +12,7 @@
12
12
  "dist",
13
13
  "public",
14
14
  "examples",
15
+ "skills",
15
16
  ".env.example",
16
17
  "README.zh-TW.md"
17
18
  ],