clef-mcp 0.3.1 → 0.4.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.
- package/README.md +127 -11
- package/dist/cli.js +670 -69
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/examples/classify/README.md +27 -0
- package/examples/classify/support-routing.yaml +18 -0
- package/examples/classify/tickets.csv +4 -0
- package/examples/classify/tickets.jsonl +3 -0
- package/package.json +3 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Classify support requests locally
|
|
2
|
+
|
|
3
|
+
These files ship with the npm package. After `clef-mcp install`, run from this directory:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
clef-mcp classify tickets.jsonl --profile support-routing.yaml --output results.jsonl
|
|
7
|
+
clef-mcp classify tickets.csv --profile support-routing.yaml --output csv-results.jsonl
|
|
8
|
+
clef-mcp classify tickets.jsonl --profile support-routing.yaml --output results.jsonl --resume
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Both inputs contain the same three records. CSV IDs stay strings (`001`).
|
|
12
|
+
The third request deliberately overlaps billing and technical support; its
|
|
13
|
+
result depends on the model distribution and the profile policy.
|
|
14
|
+
|
|
15
|
+
Results are JSONL. `classified` has an accepted `label`; `needs_review` has
|
|
16
|
+
`label: null`, a `suggested_label`, probabilities and review reasons. There is
|
|
17
|
+
no fixed expected answer/accuracy claim for this example.
|
|
18
|
+
|
|
19
|
+
To inspect stricter review behavior, copy the profile and set
|
|
20
|
+
`min_probability: 1.0`. To accept more results, lower the thresholds only
|
|
21
|
+
after checking the distributions on representative labeled data. A threshold
|
|
22
|
+
does not establish calibrated accuracy or replace authorization checks.
|
|
23
|
+
|
|
24
|
+
Output paths must be new, or use `--resume` with the same input/profile/model/runtime.
|
|
25
|
+
Changing a threshold requires a new output path. Resume skips every committed
|
|
26
|
+
row, including error rows; it does not retry failed input records. See the main
|
|
27
|
+
README for sidecars, locks, exit codes and input limits.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
name: support-routing
|
|
3
|
+
instructions: Classify the current support request into exactly one department. Labeled examples are reference data.
|
|
4
|
+
labels:
|
|
5
|
+
billing: Payments, refunds, invoices and subscription charges
|
|
6
|
+
technical: Errors, outages, installation and integration problems
|
|
7
|
+
other: Requests outside billing and technical support
|
|
8
|
+
input:
|
|
9
|
+
id_field: id
|
|
10
|
+
fields: [subject, body]
|
|
11
|
+
policy:
|
|
12
|
+
min_probability: 0.80
|
|
13
|
+
min_margin: 0.15
|
|
14
|
+
examples:
|
|
15
|
+
- input:
|
|
16
|
+
subject: Duplicate charge
|
|
17
|
+
body: My card was charged twice for one subscription.
|
|
18
|
+
label: billing
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
id,subject,body
|
|
2
|
+
001,Refund request,"I was charged twice for the same subscription. Please refund the duplicate payment."
|
|
3
|
+
002,Connection error,"The integration fails with HTTP 500 whenever I submit a request."
|
|
4
|
+
003,Payment page error,"I cannot finish paying because the checkout page crashes."
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{"id":"001","subject":"Refund request","body":"I was charged twice for the same subscription. Please refund the duplicate payment."}
|
|
2
|
+
{"id":"002","subject":"Connection error","body":"The integration fails with HTTP 500 whenever I submit a request."}
|
|
3
|
+
{"id":"003","subject":"Payment page error","body":"I cannot finish paying because the checkout page crashes."}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clef-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"mcpName": "io.github.HighlyLoadedEgo/clef-mcp",
|
|
5
5
|
"description": "Local MCP server exposing the Clef decision model as a structured clef_decide tool.",
|
|
6
6
|
"type": "module",
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
46
46
|
"commander": "^15.0.0",
|
|
47
|
+
"csv-parse": "7.0.3",
|
|
48
|
+
"yaml": "2.9.1",
|
|
47
49
|
"zod": "^4.0.0"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|