@emseepea/create-resources-and-prompts-server 0.0.9 → 0.0.12
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
CHANGED
|
@@ -45,8 +45,8 @@ choose another port.
|
|
|
45
45
|
## Check This Example
|
|
46
46
|
|
|
47
47
|
[Ordinary tests](test/) live in `test/`.
|
|
48
|
-
The [AI
|
|
49
|
-
The commands below run each suite independently.
|
|
48
|
+
The [native AI behaviour test](eval/meaning.test.mjs) lives separately in
|
|
49
|
+
`eval/`. The commands below run each suite independently.
|
|
50
50
|
|
|
51
51
|
Run its build and MCP resource and prompt checks:
|
|
52
52
|
|
|
@@ -54,10 +54,15 @@ Run its build and MCP resource and prompt checks:
|
|
|
54
54
|
npm test
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Check that Claude
|
|
57
|
+
Check that Claude does not pretend an unselected resource was supplied:
|
|
58
58
|
|
|
59
59
|
```sh
|
|
60
60
|
npm run test:llm
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
If Claude is not already signed in, run `claude auth login` first.
|
|
64
|
+
|
|
65
|
+
Resources and prompts are selected through client features, not autonomously
|
|
66
|
+
called as tools. The ordinary tests qualify their MCP contracts. The AI test
|
|
67
|
+
checks only the honest experience before a user selects or attaches a resource;
|
|
68
|
+
it does not claim that the resource content was semantically qualified.
|
|
@@ -26,8 +26,8 @@ choose another port.
|
|
|
26
26
|
## Check This Example
|
|
27
27
|
|
|
28
28
|
[Ordinary tests](test/) live in `test/`.
|
|
29
|
-
The [AI
|
|
30
|
-
The commands below run each suite independently.
|
|
29
|
+
The [native AI behaviour test](eval/meaning.test.mjs) lives separately in
|
|
30
|
+
`eval/`. The commands below run each suite independently.
|
|
31
31
|
|
|
32
32
|
Run its build and MCP resource and prompt checks:
|
|
33
33
|
|
|
@@ -35,10 +35,15 @@ Run its build and MCP resource and prompt checks:
|
|
|
35
35
|
npm test
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Check that Claude
|
|
38
|
+
Check that Claude does not pretend an unselected resource was supplied:
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
41
|
npm run test:llm
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
If Claude is not already signed in, run `claude auth login` first.
|
|
45
|
+
|
|
46
|
+
Resources and prompts are selected through client features, not autonomously
|
|
47
|
+
called as tools. The ordinary tests qualify their MCP contracts. The AI test
|
|
48
|
+
checks only the honest experience before a user selects or attaches a resource;
|
|
49
|
+
it does not claim that the resource content was semantically qualified.
|
|
@@ -1,44 +1,26 @@
|
|
|
1
1
|
import test from "node:test";
|
|
2
2
|
import {
|
|
3
3
|
assertNoToolCalls,
|
|
4
|
-
assertResponseContains,
|
|
5
4
|
assertResponseMeaning,
|
|
6
5
|
createConversation,
|
|
7
6
|
} from "@emseepea/testing/semantic";
|
|
8
7
|
|
|
9
|
-
test("
|
|
8
|
+
test("does not pretend an unselected resource was supplied", async (t) => {
|
|
10
9
|
const chat = await createConversation(t, {
|
|
11
10
|
server: new URL("../dist/server.js", import.meta.url),
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
// Fixed and templated resources plus a prompt are prepared in one turn. That
|
|
15
|
-
// broadens MCP coverage without adding another model conversation or judge.
|
|
16
|
-
await chat.prepare(async ({ readResource, getPrompt }) => {
|
|
17
|
-
await readResource({ uri: "guide://peas/getting-started" });
|
|
18
|
-
await readResource({ uri: "guide://peas/planting/container" });
|
|
19
|
-
await getPrompt({ name: "growing-guide", arguments: { topic: "sowing-depth" } });
|
|
20
|
-
});
|
|
21
|
-
|
|
22
13
|
const response = await chat.send(
|
|
23
|
-
"
|
|
24
|
-
"
|
|
14
|
+
"Without me selecting or attaching a growing guide, what exact sowing depth " +
|
|
15
|
+
"and plant spacing does guide://peas/planting/container specify?",
|
|
25
16
|
);
|
|
26
17
|
|
|
27
18
|
assertNoToolCalls(response);
|
|
28
|
-
//
|
|
29
|
-
//
|
|
19
|
+
// Resources and prompts are user-selected client features, not autonomous
|
|
20
|
+
// tools. One semantic assertion checks the honest unselected experience.
|
|
30
21
|
await assertResponseMeaning(response, {
|
|
31
22
|
expected:
|
|
32
|
-
"The
|
|
33
|
-
"
|
|
34
|
-
"while plant spacing is the gap between plants.",
|
|
23
|
+
"The response does not claim to know the guide's recommendation. It says " +
|
|
24
|
+
"the user must select or attach the resource before its content can be used.",
|
|
35
25
|
});
|
|
36
|
-
|
|
37
|
-
const followUp = await chat.send(
|
|
38
|
-
"What is the exact URI of the selected planting method guide?",
|
|
39
|
-
);
|
|
40
|
-
// The URI is a stable identifier, so exact matching proves conversational
|
|
41
|
-
// recall without paying for a second semantic judgment.
|
|
42
|
-
assertNoToolCalls(followUp);
|
|
43
|
-
assertResponseContains(followUp, "guide://peas/planting/container");
|
|
44
26
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emseepea/create-resources-and-prompts-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Create an Em See Pea server with resources and prompts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@emseepea/server": "0.3.3",
|
|
22
22
|
"zod": "4.4.3",
|
|
23
|
-
"@emseepea/testing": "0.
|
|
23
|
+
"@emseepea/testing": "0.5.2",
|
|
24
24
|
"@types/node": "24.13.3",
|
|
25
25
|
"typescript": "6.0.3",
|
|
26
26
|
"oxlint": "1.80.0"
|