@emseepea/create-resources-and-prompts-server 0.0.6 → 0.0.7
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.
|
@@ -10,21 +10,35 @@ test("keeps sowing depth and plant spacing separate", async (t) => {
|
|
|
10
10
|
const chat = await createConversation(t, {
|
|
11
11
|
server: new URL("../dist/server.js", import.meta.url),
|
|
12
12
|
});
|
|
13
|
+
|
|
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.
|
|
13
16
|
await chat.prepare(async ({ readResource, getPrompt }) => {
|
|
14
17
|
await readResource({ uri: "guide://peas/getting-started" });
|
|
18
|
+
await readResource({ uri: "guide://peas/planting/container" });
|
|
15
19
|
await getPrompt({ name: "growing-guide", arguments: { topic: "sowing-depth" } });
|
|
16
20
|
});
|
|
17
21
|
|
|
18
22
|
const response = await chat.send(
|
|
19
|
-
"
|
|
20
|
-
"
|
|
23
|
+
"Which planting method is the selected method guide for? If I sow pea seeds " +
|
|
24
|
+
"deeper, should I also space the plants farther apart? Explain the distinction.",
|
|
21
25
|
);
|
|
22
26
|
|
|
23
27
|
assertNoToolCalls(response);
|
|
24
|
-
|
|
28
|
+
// The explanation may be paraphrased, so spend the test's only semantic
|
|
29
|
+
// judgment here instead of coupling the test to particular wording.
|
|
25
30
|
await assertResponseMeaning(response, {
|
|
26
31
|
expected:
|
|
27
|
-
"
|
|
28
|
-
"is how deep a seed goes,
|
|
32
|
+
"The selected method guide is for containers. Sowing peas deeper does not " +
|
|
33
|
+
"mean spacing plants farther apart. Sowing depth is how deep a seed goes, " +
|
|
34
|
+
"while plant spacing is the gap between plants.",
|
|
29
35
|
});
|
|
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");
|
|
30
44
|
});
|