rewind-mcp-server 0.10.0 → 0.11.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/dist/__tests__/helpers/build-client.d.ts +2 -0
- package/dist/__tests__/helpers/build-client.js +24 -0
- package/dist/__tests__/helpers/build-client.js.map +1 -0
- package/dist/__tests__/helpers.test.js +11 -0
- package/dist/__tests__/helpers.test.js.map +1 -1
- package/dist/__tests__/image-block.live.js +1 -1
- package/dist/__tests__/image-block.live.js.map +1 -1
- package/dist/__tests__/manifest-snapshot.test.js +1 -0
- package/dist/__tests__/manifest-snapshot.test.js.map +1 -1
- package/dist/__tests__/output-schema-attending.test.d.ts +1 -0
- package/dist/__tests__/output-schema-attending.test.js +353 -0
- package/dist/__tests__/output-schema-attending.test.js.map +1 -0
- package/dist/__tests__/output-schema-collecting.test.d.ts +1 -0
- package/dist/__tests__/output-schema-collecting.test.js +155 -0
- package/dist/__tests__/output-schema-collecting.test.js.map +1 -0
- package/dist/__tests__/output-schema-cross-domain.test.d.ts +1 -0
- package/dist/__tests__/output-schema-cross-domain.test.js +142 -0
- package/dist/__tests__/output-schema-cross-domain.test.js.map +1 -0
- package/dist/__tests__/output-schema-listening.test.d.ts +1 -0
- package/dist/__tests__/output-schema-listening.test.js +235 -0
- package/dist/__tests__/output-schema-listening.test.js.map +1 -0
- package/dist/__tests__/output-schema-reading.test.d.ts +1 -0
- package/dist/__tests__/output-schema-reading.test.js +181 -0
- package/dist/__tests__/output-schema-reading.test.js.map +1 -0
- package/dist/__tests__/output-schema-running.test.d.ts +1 -0
- package/dist/__tests__/output-schema-running.test.js +185 -0
- package/dist/__tests__/output-schema-running.test.js.map +1 -0
- package/dist/__tests__/output-schema-watching.test.d.ts +1 -0
- package/dist/__tests__/output-schema-watching.test.js +190 -0
- package/dist/__tests__/output-schema-watching.test.js.map +1 -0
- package/dist/__tests__/output-schema.live.d.ts +1 -0
- package/dist/__tests__/output-schema.live.js +180 -0
- package/dist/__tests__/output-schema.live.js.map +1 -0
- package/dist/__tests__/output-schema.test.d.ts +1 -0
- package/dist/__tests__/output-schema.test.js +38 -0
- package/dist/__tests__/output-schema.test.js.map +1 -0
- package/dist/__tests__/server.test.js +1 -1
- package/dist/server.js +10 -12
- package/dist/server.js.map +1 -1
- package/dist/tools/attending.js +9 -0
- package/dist/tools/attending.js.map +1 -1
- package/dist/tools/collecting.js +5 -0
- package/dist/tools/collecting.js.map +1 -1
- package/dist/tools/cross-domain.js +12 -1
- package/dist/tools/cross-domain.js.map +1 -1
- package/dist/tools/helpers.js +14 -9
- package/dist/tools/helpers.js.map +1 -1
- package/dist/tools/listening.js +12 -1
- package/dist/tools/listening.js.map +1 -1
- package/dist/tools/reading.js +8 -1
- package/dist/tools/reading.js.map +1 -1
- package/dist/tools/running.js +8 -0
- package/dist/tools/running.js.map +1 -1
- package/dist/tools/schemas/attending.d.ts +8225 -0
- package/dist/tools/schemas/attending.js +404 -0
- package/dist/tools/schemas/attending.js.map +1 -0
- package/dist/tools/schemas/collecting.d.ts +1011 -0
- package/dist/tools/schemas/collecting.js +108 -0
- package/dist/tools/schemas/collecting.js.map +1 -0
- package/dist/tools/schemas/cross-domain.d.ts +1001 -0
- package/dist/tools/schemas/cross-domain.js +107 -0
- package/dist/tools/schemas/cross-domain.js.map +1 -0
- package/dist/tools/schemas/listening.d.ts +4298 -0
- package/dist/tools/schemas/listening.js +255 -0
- package/dist/tools/schemas/listening.js.map +1 -0
- package/dist/tools/schemas/reading.d.ts +1421 -0
- package/dist/tools/schemas/reading.js +151 -0
- package/dist/tools/schemas/reading.js.map +1 -0
- package/dist/tools/schemas/running.d.ts +680 -0
- package/dist/tools/schemas/running.js +154 -0
- package/dist/tools/schemas/running.js.map +1 -0
- package/dist/tools/schemas/shared.d.ts +98 -0
- package/dist/tools/schemas/shared.js +74 -0
- package/dist/tools/schemas/shared.js.map +1 -0
- package/dist/tools/schemas/system.d.ts +57 -0
- package/dist/tools/schemas/system.js +22 -0
- package/dist/tools/schemas/system.js.map +1 -0
- package/dist/tools/schemas/watching.d.ts +1821 -0
- package/dist/tools/schemas/watching.js +167 -0
- package/dist/tools/schemas/watching.js.map +1 -0
- package/dist/tools/watching.js +8 -0
- package/dist/tools/watching.js.map +1 -1
- package/dist/ui-bundles.d.ts +10 -11
- package/dist/ui-bundles.js +20 -22
- package/dist/ui-bundles.js.map +1 -1
- package/package.json +1 -1
- package/dist/tools/debug.d.ts +0 -6
- package/dist/tools/debug.js +0 -26
- package/dist/tools/debug.js.map +0 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output-schema conformance — reading domain (issue #105).
|
|
3
|
+
*
|
|
4
|
+
* For every reading tool: run it end-to-end through the SDK against a
|
|
5
|
+
* fixture and assert it resolves. The SDK's validateToolOutput throws if
|
|
6
|
+
* `structuredContent` does not match the declared `outputSchema`, so a
|
|
7
|
+
* resolved call IS the conformance proof. Also asserts each tool
|
|
8
|
+
* advertises a clean JSON Schema (top-level object, no $ref, no
|
|
9
|
+
* `additionalProperties: false`).
|
|
10
|
+
*
|
|
11
|
+
* Structure mirrors output-schema-listening.test.ts.
|
|
12
|
+
*/
|
|
13
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
14
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
15
|
+
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
|
|
16
|
+
import { createServer } from '../server.js';
|
|
17
|
+
import { RewindClient } from '../client.js';
|
|
18
|
+
// --- Fixtures (minimal valid API responses) -------------------------------
|
|
19
|
+
const articleFixture = {
|
|
20
|
+
id: 1,
|
|
21
|
+
title: 'Test Article',
|
|
22
|
+
author: 'Test Author',
|
|
23
|
+
url: 'https://example.com/article',
|
|
24
|
+
instapaper_url: 'https://instapaper.com/read/1',
|
|
25
|
+
instapaper_app_url: null,
|
|
26
|
+
domain: 'example.com',
|
|
27
|
+
description: 'A test article description.',
|
|
28
|
+
estimated_read_min: 5,
|
|
29
|
+
status: 'unread',
|
|
30
|
+
progress: 0,
|
|
31
|
+
image: null,
|
|
32
|
+
saved_at: '2026-05-15T12:00:00Z',
|
|
33
|
+
};
|
|
34
|
+
const highlightFixture = {
|
|
35
|
+
text: 'A highlighted passage.',
|
|
36
|
+
note: 'My note.',
|
|
37
|
+
created_at: '2026-05-15T12:00:00Z',
|
|
38
|
+
article: {
|
|
39
|
+
id: 1,
|
|
40
|
+
title: 'Test Article',
|
|
41
|
+
author: 'Test Author',
|
|
42
|
+
domain: 'example.com',
|
|
43
|
+
url: 'https://example.com/article',
|
|
44
|
+
instapaper_url: 'https://instapaper.com/read/1',
|
|
45
|
+
instapaper_app_url: null,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const articleDetailFixture = {
|
|
49
|
+
id: 1,
|
|
50
|
+
title: 'Test Article',
|
|
51
|
+
author: 'Test Author',
|
|
52
|
+
url: 'https://example.com/article',
|
|
53
|
+
instapaper_url: 'https://instapaper.com/read/1',
|
|
54
|
+
instapaper_app_url: null,
|
|
55
|
+
domain: 'example.com',
|
|
56
|
+
description: 'A test article description.',
|
|
57
|
+
content: 'The full article body text.',
|
|
58
|
+
excerpt: 'An excerpt.',
|
|
59
|
+
word_count: 1200,
|
|
60
|
+
estimated_read_min: 5,
|
|
61
|
+
status: 'unread',
|
|
62
|
+
progress: 0,
|
|
63
|
+
saved_at: '2026-05-15T12:00:00Z',
|
|
64
|
+
image: null,
|
|
65
|
+
highlights: [
|
|
66
|
+
{
|
|
67
|
+
id: 10,
|
|
68
|
+
text: 'A highlighted passage.',
|
|
69
|
+
note: 'My note.',
|
|
70
|
+
created_at: '2026-05-15T12:00:00Z',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
const relatedFixture = {
|
|
75
|
+
id: 2,
|
|
76
|
+
title: 'Related Article',
|
|
77
|
+
author: 'Other Author',
|
|
78
|
+
url: 'https://example.com/related',
|
|
79
|
+
instapaper_url: 'https://instapaper.com/read/2',
|
|
80
|
+
instapaper_app_url: null,
|
|
81
|
+
domain: 'example.com',
|
|
82
|
+
description: 'A related article.',
|
|
83
|
+
score: 0.87,
|
|
84
|
+
};
|
|
85
|
+
const ROUTES = {
|
|
86
|
+
'/reading/recent': { data: [articleFixture] },
|
|
87
|
+
'/reading/highlights': {
|
|
88
|
+
data: [highlightFixture],
|
|
89
|
+
pagination: { page: 1, limit: 10, total: 1, total_pages: 1 },
|
|
90
|
+
},
|
|
91
|
+
'/reading/highlights/random': highlightFixture,
|
|
92
|
+
'/reading/stats': {
|
|
93
|
+
total_articles: 100,
|
|
94
|
+
finished_count: 40,
|
|
95
|
+
currently_reading_count: 3,
|
|
96
|
+
total_highlights: 250,
|
|
97
|
+
total_word_count: 500000,
|
|
98
|
+
avg_estimated_read_min: 6,
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
function resolveRoute(path) {
|
|
102
|
+
if (/^\/reading\/articles\/\d+\/related$/.test(path))
|
|
103
|
+
return { data: [relatedFixture] };
|
|
104
|
+
if (/^\/reading\/articles\/\d+$/.test(path))
|
|
105
|
+
return articleDetailFixture;
|
|
106
|
+
return ROUTES[path] ?? {};
|
|
107
|
+
}
|
|
108
|
+
async function buildClient() {
|
|
109
|
+
const rewindClient = new RewindClient('https://api.test', 'rw_test');
|
|
110
|
+
vi.spyOn(rewindClient, 'get').mockImplementation(async (path) => resolveRoute(path));
|
|
111
|
+
const server = createServer(rewindClient);
|
|
112
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
113
|
+
const client = new Client({ name: 'output-schema-test', version: '1.0.0' });
|
|
114
|
+
await server.connect(serverTransport);
|
|
115
|
+
await client.connect(clientTransport);
|
|
116
|
+
return client;
|
|
117
|
+
}
|
|
118
|
+
const CASES = [
|
|
119
|
+
{ name: 'get_article', args: { id: 1 } },
|
|
120
|
+
{ name: 'get_recent_reads', args: { include_images: false } },
|
|
121
|
+
{ name: 'get_reading_highlights', args: {} },
|
|
122
|
+
{ name: 'get_random_highlight', args: {} },
|
|
123
|
+
{ name: 'get_reading_stats', args: {} },
|
|
124
|
+
{ name: 'find_similar_articles', args: { article_id: 1 } },
|
|
125
|
+
];
|
|
126
|
+
describe('output-schema conformance — reading', () => {
|
|
127
|
+
for (const c of CASES) {
|
|
128
|
+
it(`${c.name}: structuredContent conforms to outputSchema`, async () => {
|
|
129
|
+
const client = await buildClient();
|
|
130
|
+
// A schema mismatch makes the SDK's validateToolOutput throw and this
|
|
131
|
+
// call reject -- resolving without error IS the conformance check.
|
|
132
|
+
const res = await client.callTool({ name: c.name, arguments: c.args });
|
|
133
|
+
expect(res.isError).toBeFalsy();
|
|
134
|
+
expect(res.structuredContent).toBeDefined();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
it('empty-state branches still conform', async () => {
|
|
138
|
+
const rewindClient = new RewindClient('https://api.test', 'rw_test');
|
|
139
|
+
vi.spyOn(rewindClient, 'get').mockImplementation(async (path) => {
|
|
140
|
+
if (path === '/reading/recent')
|
|
141
|
+
return { data: [] };
|
|
142
|
+
if (path === '/reading/highlights')
|
|
143
|
+
return {
|
|
144
|
+
data: [],
|
|
145
|
+
pagination: { page: 1, limit: 10, total: 0, total_pages: 0 },
|
|
146
|
+
};
|
|
147
|
+
if (/^\/reading\/articles\/\d+\/related$/.test(path))
|
|
148
|
+
return { data: [] };
|
|
149
|
+
return {};
|
|
150
|
+
});
|
|
151
|
+
const server = createServer(rewindClient);
|
|
152
|
+
const [ct, st] = InMemoryTransport.createLinkedPair();
|
|
153
|
+
const client = new Client({ name: 'empty-test', version: '1.0.0' });
|
|
154
|
+
await server.connect(st);
|
|
155
|
+
await client.connect(ct);
|
|
156
|
+
for (const [name, args] of [
|
|
157
|
+
['get_recent_reads', { include_images: false }],
|
|
158
|
+
['get_reading_highlights', {}],
|
|
159
|
+
['find_similar_articles', { article_id: 1 }],
|
|
160
|
+
]) {
|
|
161
|
+
const res = await client.callTool({ name, arguments: args });
|
|
162
|
+
expect(res.isError, name).toBeFalsy();
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
it('every reading tool advertises a clean outputSchema', async () => {
|
|
166
|
+
const client = await buildClient();
|
|
167
|
+
const { tools } = await client.listTools();
|
|
168
|
+
const names = new Set(CASES.map((c) => c.name));
|
|
169
|
+
const reading = tools.filter((t) => names.has(t.name));
|
|
170
|
+
expect(reading).toHaveLength(CASES.length);
|
|
171
|
+
for (const t of reading) {
|
|
172
|
+
expect(t.outputSchema, t.name).toMatchObject({ type: 'object' });
|
|
173
|
+
const json = JSON.stringify(t.outputSchema);
|
|
174
|
+
// No $ref/$defs: older Claude Desktop builds failed to compile them.
|
|
175
|
+
expect(json, `${t.name} $ref`).not.toContain('$ref');
|
|
176
|
+
// .passthrough() keeps the advertised schema forward-compatible.
|
|
177
|
+
expect(json, `${t.name} additionalProperties`).not.toContain('"additionalProperties":false');
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
//# sourceMappingURL=output-schema-reading.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-schema-reading.test.js","sourceRoot":"","sources":["../../src/__tests__/output-schema-reading.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,6EAA6E;AAE7E,MAAM,cAAc,GAAG;IACrB,EAAE,EAAE,CAAC;IACL,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,aAAa;IACrB,GAAG,EAAE,6BAA6B;IAClC,cAAc,EAAE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AAC,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACrD,iEAAiE;YACjE,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,GAAG,CAAC,SAAS,CAC1D,8BAA8B,CAC/B,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output-schema conformance — running domain (issue #105).
|
|
3
|
+
*
|
|
4
|
+
* For every running tool: run it end-to-end through the SDK against a
|
|
5
|
+
* fixture and assert it resolves. The SDK's validateToolOutput throws if
|
|
6
|
+
* `structuredContent` does not match the declared `outputSchema`, so a
|
|
7
|
+
* resolved call IS the conformance proof. Also asserts each tool
|
|
8
|
+
* advertises a clean JSON Schema (top-level object, no $ref, no
|
|
9
|
+
* `additionalProperties: false`).
|
|
10
|
+
*
|
|
11
|
+
* Structure copied from output-schema-listening.test.ts.
|
|
12
|
+
*/
|
|
13
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
14
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
15
|
+
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
|
|
16
|
+
import { createServer } from '../server.js';
|
|
17
|
+
import { RewindClient } from '../client.js';
|
|
18
|
+
// --- Fixtures (minimal valid API responses) -------------------------------
|
|
19
|
+
const activityFixture = {
|
|
20
|
+
id: 1,
|
|
21
|
+
strava_id: 1001,
|
|
22
|
+
name: 'Morning Run',
|
|
23
|
+
date: '2026-05-15T08:00:00Z',
|
|
24
|
+
distance_mi: 5.2,
|
|
25
|
+
duration: '42:10',
|
|
26
|
+
pace: '8:06',
|
|
27
|
+
elevation_ft: 120,
|
|
28
|
+
city: 'Brooklyn',
|
|
29
|
+
state: 'NY',
|
|
30
|
+
is_race: false,
|
|
31
|
+
strava_url: 'https://strava.com/activities/1001',
|
|
32
|
+
};
|
|
33
|
+
const prFixture = {
|
|
34
|
+
distance_label: '5K',
|
|
35
|
+
time: '21:30',
|
|
36
|
+
pace: '6:55',
|
|
37
|
+
date: '2026-04-01T08:00:00Z',
|
|
38
|
+
activity_name: 'Spring 5K',
|
|
39
|
+
activity_id: 2,
|
|
40
|
+
};
|
|
41
|
+
const splitFixture = {
|
|
42
|
+
split: 1,
|
|
43
|
+
distance_mi: 1.0,
|
|
44
|
+
moving_time_s: 480,
|
|
45
|
+
elapsed_time_s: 485,
|
|
46
|
+
elevation_ft: 25,
|
|
47
|
+
pace: '8:00',
|
|
48
|
+
heartrate: 152,
|
|
49
|
+
};
|
|
50
|
+
const activityDetailFixture = {
|
|
51
|
+
id: 1,
|
|
52
|
+
name: 'Morning Run',
|
|
53
|
+
date: '2026-05-15T08:00:00Z',
|
|
54
|
+
distance_mi: 5.2,
|
|
55
|
+
duration: '42:10',
|
|
56
|
+
pace: '8:06',
|
|
57
|
+
elevation_ft: 120,
|
|
58
|
+
heartrate_avg: 150,
|
|
59
|
+
heartrate_max: 172,
|
|
60
|
+
cadence: 168,
|
|
61
|
+
calories: 540,
|
|
62
|
+
suffer_score: 45,
|
|
63
|
+
city: 'Brooklyn',
|
|
64
|
+
state: 'NY',
|
|
65
|
+
is_race: false,
|
|
66
|
+
workout_type: 'Run',
|
|
67
|
+
strava_url: 'https://strava.com/activities/1001',
|
|
68
|
+
};
|
|
69
|
+
const yearFixture = {
|
|
70
|
+
year: 2025,
|
|
71
|
+
total_runs: 180,
|
|
72
|
+
total_distance_mi: 920.5,
|
|
73
|
+
total_elevation_ft: 18000,
|
|
74
|
+
total_duration_s: 432000,
|
|
75
|
+
avg_pace: '8:12',
|
|
76
|
+
longest_run_mi: 26.2,
|
|
77
|
+
race_count: 4,
|
|
78
|
+
};
|
|
79
|
+
const ROUTES = {
|
|
80
|
+
'/running/stats': {
|
|
81
|
+
data: {
|
|
82
|
+
total_runs: 500,
|
|
83
|
+
total_distance_mi: 2500.5,
|
|
84
|
+
total_elevation_ft: 50000,
|
|
85
|
+
total_duration: '300:00:00',
|
|
86
|
+
avg_pace: '8:10',
|
|
87
|
+
years_active: 5,
|
|
88
|
+
first_run: '2021-01-01T08:00:00Z',
|
|
89
|
+
eddington_number: 30,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
'/running/recent': { data: [activityFixture] },
|
|
93
|
+
'/running/prs': { data: [prFixture] },
|
|
94
|
+
'/running/streaks': {
|
|
95
|
+
data: {
|
|
96
|
+
current: { days: 5, start: '2026-05-10', end: '2026-05-15' },
|
|
97
|
+
longest: { days: 30, start: '2025-01-01', end: '2025-01-31' },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
'/running/stats/years': { data: [yearFixture] },
|
|
101
|
+
};
|
|
102
|
+
function resolveRoute(path) {
|
|
103
|
+
if (/^\/running\/activities\/\d+\/splits$/.test(path)) {
|
|
104
|
+
return { data: [splitFixture] };
|
|
105
|
+
}
|
|
106
|
+
if (/^\/running\/activities\/\d+$/.test(path)) {
|
|
107
|
+
return activityDetailFixture;
|
|
108
|
+
}
|
|
109
|
+
return ROUTES[path] ?? {};
|
|
110
|
+
}
|
|
111
|
+
async function buildClient() {
|
|
112
|
+
const rewindClient = new RewindClient('https://api.test', 'rw_test');
|
|
113
|
+
vi.spyOn(rewindClient, 'get').mockImplementation(async (path) => resolveRoute(path));
|
|
114
|
+
const server = createServer(rewindClient);
|
|
115
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
116
|
+
const client = new Client({ name: 'output-schema-test', version: '1.0.0' });
|
|
117
|
+
await server.connect(serverTransport);
|
|
118
|
+
await client.connect(clientTransport);
|
|
119
|
+
return client;
|
|
120
|
+
}
|
|
121
|
+
const CASES = [
|
|
122
|
+
{ name: 'get_running_stats', args: {} },
|
|
123
|
+
{ name: 'get_recent_runs', args: {} },
|
|
124
|
+
{ name: 'get_personal_records', args: {} },
|
|
125
|
+
{ name: 'get_running_streaks', args: {} },
|
|
126
|
+
{ name: 'get_activity_details', args: { id: 1 } },
|
|
127
|
+
{ name: 'get_activity_splits', args: { id: 1 } },
|
|
128
|
+
{ name: 'get_running_years', args: {} },
|
|
129
|
+
];
|
|
130
|
+
describe('output-schema conformance — running', () => {
|
|
131
|
+
for (const c of CASES) {
|
|
132
|
+
it(`${c.name}: structuredContent conforms to outputSchema`, async () => {
|
|
133
|
+
const client = await buildClient();
|
|
134
|
+
// A schema mismatch makes the SDK's validateToolOutput throw and this
|
|
135
|
+
// call reject -- resolving without error IS the conformance check.
|
|
136
|
+
const res = await client.callTool({ name: c.name, arguments: c.args });
|
|
137
|
+
expect(res.isError).toBeFalsy();
|
|
138
|
+
expect(res.structuredContent).toBeDefined();
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
it('empty-state branches still conform', async () => {
|
|
142
|
+
const rewindClient = new RewindClient('https://api.test', 'rw_test');
|
|
143
|
+
vi.spyOn(rewindClient, 'get').mockImplementation(async (path) => {
|
|
144
|
+
if (path === '/running/recent')
|
|
145
|
+
return { data: [] };
|
|
146
|
+
if (path === '/running/prs')
|
|
147
|
+
return { data: [] };
|
|
148
|
+
if (path === '/running/stats/years')
|
|
149
|
+
return { data: [] };
|
|
150
|
+
if (/^\/running\/activities\/\d+\/splits$/.test(path))
|
|
151
|
+
return { data: [] };
|
|
152
|
+
return {};
|
|
153
|
+
});
|
|
154
|
+
const server = createServer(rewindClient);
|
|
155
|
+
const [ct, st] = InMemoryTransport.createLinkedPair();
|
|
156
|
+
const client = new Client({ name: 'empty-test', version: '1.0.0' });
|
|
157
|
+
await server.connect(st);
|
|
158
|
+
await client.connect(ct);
|
|
159
|
+
for (const [name, args] of [
|
|
160
|
+
['get_recent_runs', {}],
|
|
161
|
+
['get_personal_records', {}],
|
|
162
|
+
['get_activity_splits', { id: 1 }],
|
|
163
|
+
['get_running_years', {}],
|
|
164
|
+
]) {
|
|
165
|
+
const res = await client.callTool({ name, arguments: args });
|
|
166
|
+
expect(res.isError, name).toBeFalsy();
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
it('every running tool advertises a clean outputSchema', async () => {
|
|
170
|
+
const client = await buildClient();
|
|
171
|
+
const { tools } = await client.listTools();
|
|
172
|
+
const names = new Set(CASES.map((c) => c.name));
|
|
173
|
+
const running = tools.filter((t) => names.has(t.name));
|
|
174
|
+
expect(running).toHaveLength(CASES.length);
|
|
175
|
+
for (const t of running) {
|
|
176
|
+
expect(t.outputSchema, t.name).toMatchObject({ type: 'object' });
|
|
177
|
+
const json = JSON.stringify(t.outputSchema);
|
|
178
|
+
// No $ref/$defs: older Claude Desktop builds failed to compile them.
|
|
179
|
+
expect(json, `${t.name} $ref`).not.toContain('$ref');
|
|
180
|
+
// .passthrough() keeps the advertised schema forward-compatible.
|
|
181
|
+
expect(json, `${t.name} additionalProperties`).not.toContain('"additionalProperties":false');
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
//# sourceMappingURL=output-schema-running.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-schema-running.test.js","sourceRoot":"","sources":["../../src/__tests__/output-schema-running.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,6EAA6E;AAE7E,MAAM,eAAe,GAAG;IACtB,EAAE,EAAE,CAAC;IACL,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,aAAa;IACnB,IAAI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Aa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;YACjE,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;YAC5C,qEAAqE;YACrE,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACrD,iEAAiE;YACjE,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,GAAG,CAAC,SAAS,CAC1D,8BAA8B,CAC/B,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output-schema conformance — watching domain (issue #105, Phase 2).
|
|
3
|
+
*
|
|
4
|
+
* For every watching tool: run it end-to-end through the SDK against a
|
|
5
|
+
* fixture and assert it resolves. The SDK's validateToolOutput throws if
|
|
6
|
+
* `structuredContent` does not match the declared `outputSchema`, so a
|
|
7
|
+
* resolved call IS the conformance proof. Also asserts each tool
|
|
8
|
+
* advertises a clean JSON Schema (top-level object, no $ref, no
|
|
9
|
+
* `additionalProperties: false`).
|
|
10
|
+
*
|
|
11
|
+
* Copied from the output-schema-listening.test.ts template.
|
|
12
|
+
*/
|
|
13
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
14
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
15
|
+
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
|
|
16
|
+
import { createServer } from '../server.js';
|
|
17
|
+
import { RewindClient } from '../client.js';
|
|
18
|
+
// --- Fixtures (minimal valid API responses) -------------------------------
|
|
19
|
+
const recentWatchFixture = {
|
|
20
|
+
movie: {
|
|
21
|
+
id: 1,
|
|
22
|
+
title: 'Test Movie',
|
|
23
|
+
year: 2024,
|
|
24
|
+
director: 'Test Director',
|
|
25
|
+
tmdb_id: 100,
|
|
26
|
+
summary: 'A test movie.',
|
|
27
|
+
tagline: 'A test tagline.',
|
|
28
|
+
image: null,
|
|
29
|
+
},
|
|
30
|
+
watched_at: '2026-05-15T12:00:00Z',
|
|
31
|
+
user_rating: 4,
|
|
32
|
+
rewatch: false,
|
|
33
|
+
source: 'plex',
|
|
34
|
+
review: null,
|
|
35
|
+
review_url: null,
|
|
36
|
+
};
|
|
37
|
+
const movieDetailFixture = {
|
|
38
|
+
id: 1,
|
|
39
|
+
title: 'Test Movie',
|
|
40
|
+
year: 2024,
|
|
41
|
+
director: 'Test Director',
|
|
42
|
+
directors: ['Test Director'],
|
|
43
|
+
genres: ['Drama'],
|
|
44
|
+
duration_min: 120,
|
|
45
|
+
rating: 'PG-13',
|
|
46
|
+
tmdb_id: 100,
|
|
47
|
+
tmdb_rating: 7.5,
|
|
48
|
+
tagline: 'A test tagline.',
|
|
49
|
+
summary: 'A test movie.',
|
|
50
|
+
imdb_id: 'tt1234567',
|
|
51
|
+
image: null,
|
|
52
|
+
watch_history: [
|
|
53
|
+
{
|
|
54
|
+
watched_at: '2026-05-15T12:00:00Z',
|
|
55
|
+
user_rating: 4,
|
|
56
|
+
rewatch: false,
|
|
57
|
+
review: null,
|
|
58
|
+
review_url: null,
|
|
59
|
+
source: 'plex',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
const browseMovieFixture = {
|
|
64
|
+
id: 1,
|
|
65
|
+
title: 'Test Movie',
|
|
66
|
+
year: 2024,
|
|
67
|
+
director: 'Test Director',
|
|
68
|
+
genres: ['Drama'],
|
|
69
|
+
duration_min: 120,
|
|
70
|
+
tmdb_id: 100,
|
|
71
|
+
tmdb_rating: 7.5,
|
|
72
|
+
image: null,
|
|
73
|
+
};
|
|
74
|
+
const paginationFixture = {
|
|
75
|
+
page: 1,
|
|
76
|
+
limit: 10,
|
|
77
|
+
total: 1,
|
|
78
|
+
total_pages: 1,
|
|
79
|
+
};
|
|
80
|
+
const ROUTES = {
|
|
81
|
+
'/watching/recent': { data: [recentWatchFixture] },
|
|
82
|
+
'/watching/stats': {
|
|
83
|
+
data: {
|
|
84
|
+
total_movies: 100,
|
|
85
|
+
total_watch_time_hours: 200,
|
|
86
|
+
movies_this_year: 12,
|
|
87
|
+
avg_per_month: 8.3,
|
|
88
|
+
top_genre: 'Drama',
|
|
89
|
+
top_decade: 2010,
|
|
90
|
+
top_director: 'Test Director',
|
|
91
|
+
total_shows: 5,
|
|
92
|
+
total_episodes_watched: 60,
|
|
93
|
+
episodes_this_year: 20,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
'/watching/movies': {
|
|
97
|
+
data: [browseMovieFixture],
|
|
98
|
+
pagination: paginationFixture,
|
|
99
|
+
},
|
|
100
|
+
'/watching/stats/genres': {
|
|
101
|
+
data: [{ name: 'Drama', count: 40, percentage: 40 }],
|
|
102
|
+
},
|
|
103
|
+
'/watching/stats/decades': { data: [{ decade: 2010, count: 30 }] },
|
|
104
|
+
'/watching/stats/directors': {
|
|
105
|
+
data: [{ name: 'Test Director', count: 8 }],
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
function resolveRoute(path) {
|
|
109
|
+
if (path.startsWith('/watching/movies/'))
|
|
110
|
+
return movieDetailFixture;
|
|
111
|
+
return ROUTES[path] ?? {};
|
|
112
|
+
}
|
|
113
|
+
async function buildClient() {
|
|
114
|
+
const rewindClient = new RewindClient('https://api.test', 'rw_test');
|
|
115
|
+
vi.spyOn(rewindClient, 'get').mockImplementation(async (path) => resolveRoute(path));
|
|
116
|
+
const server = createServer(rewindClient);
|
|
117
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
118
|
+
const client = new Client({ name: 'output-schema-test', version: '1.0.0' });
|
|
119
|
+
await server.connect(serverTransport);
|
|
120
|
+
await client.connect(clientTransport);
|
|
121
|
+
return client;
|
|
122
|
+
}
|
|
123
|
+
const CASES = [
|
|
124
|
+
{ name: 'get_recent_watches', args: { include_images: false } },
|
|
125
|
+
{ name: 'get_movie_details', args: { id: 1, include_images: false } },
|
|
126
|
+
{ name: 'get_watching_stats', args: {} },
|
|
127
|
+
{ name: 'browse_movies', args: { include_images: false } },
|
|
128
|
+
{ name: 'get_watching_genres', args: {} },
|
|
129
|
+
{ name: 'get_watching_decades', args: {} },
|
|
130
|
+
{ name: 'get_watching_directors', args: {} },
|
|
131
|
+
];
|
|
132
|
+
describe('output-schema conformance — watching', () => {
|
|
133
|
+
for (const c of CASES) {
|
|
134
|
+
it(`${c.name}: structuredContent conforms to outputSchema`, async () => {
|
|
135
|
+
const client = await buildClient();
|
|
136
|
+
// A schema mismatch makes the SDK's validateToolOutput throw and this
|
|
137
|
+
// call reject -- resolving without error IS the conformance check.
|
|
138
|
+
const res = await client.callTool({ name: c.name, arguments: c.args });
|
|
139
|
+
expect(res.isError).toBeFalsy();
|
|
140
|
+
expect(res.structuredContent).toBeDefined();
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
it('empty-state branches still conform', async () => {
|
|
144
|
+
const rewindClient = new RewindClient('https://api.test', 'rw_test');
|
|
145
|
+
vi.spyOn(rewindClient, 'get').mockImplementation(async (path) => {
|
|
146
|
+
if (path === '/watching/recent')
|
|
147
|
+
return { data: [] };
|
|
148
|
+
if (path === '/watching/movies')
|
|
149
|
+
return { data: [], pagination: paginationFixture };
|
|
150
|
+
if (path === '/watching/stats/genres')
|
|
151
|
+
return { data: [] };
|
|
152
|
+
if (path === '/watching/stats/decades')
|
|
153
|
+
return { data: [] };
|
|
154
|
+
if (path === '/watching/stats/directors')
|
|
155
|
+
return { data: [] };
|
|
156
|
+
return {};
|
|
157
|
+
});
|
|
158
|
+
const server = createServer(rewindClient);
|
|
159
|
+
const [ct, st] = InMemoryTransport.createLinkedPair();
|
|
160
|
+
const client = new Client({ name: 'empty-test', version: '1.0.0' });
|
|
161
|
+
await server.connect(st);
|
|
162
|
+
await client.connect(ct);
|
|
163
|
+
for (const [name, args] of [
|
|
164
|
+
['get_recent_watches', { include_images: false }],
|
|
165
|
+
['browse_movies', { include_images: false }],
|
|
166
|
+
['get_watching_genres', {}],
|
|
167
|
+
['get_watching_decades', {}],
|
|
168
|
+
['get_watching_directors', {}],
|
|
169
|
+
]) {
|
|
170
|
+
const res = await client.callTool({ name, arguments: args });
|
|
171
|
+
expect(res.isError, name).toBeFalsy();
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
it('every watching tool advertises a clean outputSchema', async () => {
|
|
175
|
+
const client = await buildClient();
|
|
176
|
+
const { tools } = await client.listTools();
|
|
177
|
+
const names = new Set(CASES.map((c) => c.name));
|
|
178
|
+
const watching = tools.filter((t) => names.has(t.name));
|
|
179
|
+
expect(watching).toHaveLength(CASES.length);
|
|
180
|
+
for (const t of watching) {
|
|
181
|
+
expect(t.outputSchema, t.name).toMatchObject({ type: 'object' });
|
|
182
|
+
const json = JSON.stringify(t.outputSchema);
|
|
183
|
+
// No $ref/$defs: older Claude Desktop builds failed to compile them.
|
|
184
|
+
expect(json, `${t.name} $ref`).not.toContain('$ref');
|
|
185
|
+
// .passthrough() keeps the advertised schema forward-compatible.
|
|
186
|
+
expect(json, `${t.name} additionalProperties`).not.toContain('"additionalProperties":false');
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
//# sourceMappingURL=output-schema-watching.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-schema-watching.test.js","sourceRoot":"","sources":["../../src/__tests__/output-schema-watching.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uC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