@dwlf/mcp-server 0.67.0 → 0.69.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 +3 -0
- package/dist/block/client.d.ts +24 -0
- package/dist/block/client.d.ts.map +1 -0
- package/dist/block/client.js +49 -0
- package/dist/block/client.js.map +1 -0
- package/dist/block/tools.d.ts +4 -0
- package/dist/block/tools.d.ts.map +1 -0
- package/dist/block/tools.js +184 -0
- package/dist/block/tools.js.map +1 -0
- package/dist/blockDescriptions.d.ts.map +1 -1
- package/dist/blockDescriptions.js +35 -13
- package/dist/blockDescriptions.js.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/profiles.d.ts +15 -0
- package/dist/profiles.d.ts.map +1 -1
- package/dist/profiles.js +34 -0
- package/dist/profiles.js.map +1 -1
- package/dist/register.d.ts +12 -0
- package/dist/register.d.ts.map +1 -1
- package/dist/register.js +22 -0
- package/dist/register.js.map +1 -1
- package/dist/tools/academy.js +2 -2
- package/dist/tools/academy.js.map +1 -1
- package/dist/tools/conditions.js +2 -2
- package/dist/tools/conditions.js.map +1 -1
- package/dist/tools/custom-events.js +5 -5
- package/dist/tools/custom-events.js.map +1 -1
- package/dist/tools/cycle-windows.js +8 -8
- package/dist/tools/cycle-windows.js.map +1 -1
- package/dist/tools/divergences.js +6 -6
- package/dist/tools/divergences.js.map +1 -1
- package/dist/tools/explain-event.js +3 -3
- package/dist/tools/explain-event.js.map +1 -1
- package/dist/tools/indicators.js +1 -1
- package/dist/tools/indicators.js.map +1 -1
- package/dist/tools/market-data.d.ts.map +1 -1
- package/dist/tools/market-data.js +29 -23
- package/dist/tools/market-data.js.map +1 -1
- package/dist/tools/onchain-catalogue.js +1 -1
- package/dist/tools/onchain-catalogue.js.map +1 -1
- package/dist/tools/ranges.js +2 -2
- package/dist/tools/ranges.js.map +1 -1
- package/dist/tools/semantic.js +4 -4
- package/dist/tools/semantic.js.map +1 -1
- package/dist/tools/stages.js +5 -5
- package/dist/tools/stages.js.map +1 -1
- package/dist/tools/strategies.js +1 -1
- package/dist/tools/strategies.js.map +1 -1
- package/dist/tools/subscriptions.js +3 -3
- package/dist/tools/subscriptions.js.map +1 -1
- package/dist/tools/theses.d.ts +4 -0
- package/dist/tools/theses.d.ts.map +1 -0
- package/dist/tools/theses.js +342 -0
- package/dist/tools/theses.js.map +1 -0
- package/package.json +2 -3
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { normalizeSymbol } from '../client.js';
|
|
4
|
+
/**
|
|
5
|
+
* Thesis alerts, "Waiting for" (DWLF-855): per symbol, the market events a user is waiting for and why, checked by
|
|
6
|
+
* DWLF once a night after the close. SPT `/v2/theses` owns every rule (validation, arming, the vocabulary, price
|
|
7
|
+
* redaction); these tools translate. Each answer is the backend's JSON unchanged plus an additive `agentHints`
|
|
8
|
+
* block (invariant 2): a one-line `summary`, the `definitions` of the statuses and kinds it contains, and `why`
|
|
9
|
+
* (what the data is). The definitions describe what was observed; none of it is advice.
|
|
10
|
+
*/
|
|
11
|
+
const STATUS_DEFINITIONS = {
|
|
12
|
+
waiting: 'No step met yet. The first step is being checked.',
|
|
13
|
+
in_progress: 'One or more steps met, in order. `currentStep` is the step being checked now.',
|
|
14
|
+
complete: 'Every step met.',
|
|
15
|
+
challenged: 'An invalidation condition was hit, or a step condition was missed. A thesis does not end on its own: the user answers with a review (keep, revise or close).',
|
|
16
|
+
archived: 'Kept in the journal, no longer checked.',
|
|
17
|
+
closed: 'Closed by the user through a review, with an outcome.',
|
|
18
|
+
};
|
|
19
|
+
const CONDITION_STATE_DEFINITIONS = {
|
|
20
|
+
pending: 'Not decided yet.',
|
|
21
|
+
met: 'Decided: the event happened as described (`at`, `knowableAt` say when DWLF could know it).',
|
|
22
|
+
missed: 'Decided: the event happened outside the condition (e.g. the pivot printed outside its level).',
|
|
23
|
+
marked: 'A manual condition the user marked met; the nightly check records it on its next run.',
|
|
24
|
+
};
|
|
25
|
+
const FIRE_KIND_DEFINITIONS = {
|
|
26
|
+
step_met: 'A step\'s conditions were met (any or all, as the step says).',
|
|
27
|
+
condition_missed: 'A step condition was decided outside its level; the thesis is challenged.',
|
|
28
|
+
invalidation_hit: 'An invalidation condition happened; the thesis is challenged.',
|
|
29
|
+
source_failed: 'The event that decided a condition is no longer in the engine\'s data (it was withdrawn).',
|
|
30
|
+
};
|
|
31
|
+
const WHY = 'A thesis is the user\'s own record of what they are waiting for on a symbol and why. DWLF reports which of its conditions the market has met, from events confirmed after each nightly close. It describes events; it does not say what to do about them.';
|
|
32
|
+
const TYPE_HINT = 'Condition types: pivot_confirmed (the next confirmed cycle low/high, optionally inside a level), close_vs_level (a daily/weekly close or intraday trade beyond a level), window_opens, trendline_break, engine_event (a short allow-list), manual. Full parameters and definitions: dwlf_list_thesis_condition_types.';
|
|
33
|
+
const countBy = (items, key) => {
|
|
34
|
+
const out = {};
|
|
35
|
+
for (const i of items) {
|
|
36
|
+
const k = String(i[key] ?? 'without one');
|
|
37
|
+
out[k] = (out[k] || 0) + 1;
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
};
|
|
41
|
+
const describeCounts = (counts) => Object.entries(counts).map(([k, n]) => `${n} ${k}`).join(', ');
|
|
42
|
+
// SPT owns the vocabulary; a value this version does not know is named, not dropped, so drift shows.
|
|
43
|
+
const UNKNOWN = 'Not described by this version of @dwlf/mcp-server (SPT added it): see dwlf_list_thesis_condition_types.';
|
|
44
|
+
/** The definition of each distinct value present (nullish values skipped), UNKNOWN for one the table lacks. */
|
|
45
|
+
const definitionsFor = (defs, values) => Object.fromEntries([...new Set(values.filter((v) => v !== null && v !== undefined).map(String))].map((k) => [k, defs[k] ?? UNKNOWN]));
|
|
46
|
+
const thesisLine = (t) => {
|
|
47
|
+
const steps = Array.isArray(t.steps) ? t.steps.length : 0;
|
|
48
|
+
const where = t.status === 'in_progress' && steps ? `, step ${t.currentStep} of ${steps}` : '';
|
|
49
|
+
return `${t.symbol} "${t.title}" (${t.thesisId}): ${t.status}${where}.${t.liveness?.note ? ` ${t.liveness.note}.` : ''}`;
|
|
50
|
+
};
|
|
51
|
+
/** The definitions of every status, condition state and fire kind that appears in a thesis view. */
|
|
52
|
+
const thesisDefinitions = (theses, fires = []) => {
|
|
53
|
+
const conditions = theses.flatMap((t) => [
|
|
54
|
+
...(t.steps || []).flatMap((s) => s.conditions || []),
|
|
55
|
+
...(t.invalidation || []),
|
|
56
|
+
]);
|
|
57
|
+
return {
|
|
58
|
+
status: definitionsFor(STATUS_DEFINITIONS, theses.map((t) => t.status)),
|
|
59
|
+
conditionState: definitionsFor(CONDITION_STATE_DEFINITIONS, conditions.map((c) => c.state?.status)),
|
|
60
|
+
...(fires.length ? { fireKind: definitionsFor(FIRE_KIND_DEFINITIONS, fires.map((f) => f.kind)) } : {}),
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const ok = (data, agentHints) => ({
|
|
64
|
+
content: [{ type: 'text', text: JSON.stringify({ ...data, agentHints }, null, 2) }],
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* A refusal keeps the backend's whole body: a 422 carries the per-condition `checks` that say why, which the shared
|
|
68
|
+
* error message (message only) would drop. `THESES_DISABLED` is a platform switch, not a usage error.
|
|
69
|
+
*/
|
|
70
|
+
const fail = (error) => {
|
|
71
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
72
|
+
const body = axios.isAxiosError(error) ? error.response?.data : undefined;
|
|
73
|
+
const disabled = body && typeof body === 'object' && body.error === 'THESES_DISABLED';
|
|
74
|
+
const detail = disabled
|
|
75
|
+
? ' Thesis alerts are not switched on for this platform yet (the theses.enabled setting).'
|
|
76
|
+
: body && typeof body === 'object' ? `\n${JSON.stringify(body, null, 2)}` : '';
|
|
77
|
+
return { content: [{ type: 'text', text: `Error: ${message}${detail}` }], isError: true };
|
|
78
|
+
};
|
|
79
|
+
// Condition schemas: SPT validates and sets the limits; these tell the agent the shape.
|
|
80
|
+
// Loose objects and a catch-all type: a field or type SPT adds later reaches it unchanged (stripping a field would
|
|
81
|
+
// change the condition, which re-arms it), so an older MCP version can still revise a newer thesis. Every nested object is loose too.
|
|
82
|
+
const symbolField = z.string().optional().describe('Defaults to the thesis symbol. Set it when the chart and the instrument differ (e.g. watch QQQ for a CNX1 trade).');
|
|
83
|
+
const timeframe = z.enum(['daily', 'weekly']);
|
|
84
|
+
const idField = z.string().optional().describe('Keep the id you read when revising: an unchanged condition keeps its arming and its result. Omit for a new condition.');
|
|
85
|
+
const label = z.string().optional().describe('Your short name for the condition (≤120 chars).');
|
|
86
|
+
const knownCondition = z.discriminatedUnion('type', [
|
|
87
|
+
z.looseObject({
|
|
88
|
+
type: z.literal('pivot_confirmed'), id: idField, label, symbol: symbolField, timeframe,
|
|
89
|
+
side: z.enum(['low', 'high']),
|
|
90
|
+
after: z.string().optional().describe('YYYY-MM-DD. Only a pivot DATED after this counts: for "the next daily cycle low", set it to the last low you already know of.'),
|
|
91
|
+
level: z.union([
|
|
92
|
+
z.looseObject({ op: z.enum(['above', 'below']), value: z.number().positive(), label: z.string().optional() }),
|
|
93
|
+
z.looseObject({ op: z.literal('inside'), low: z.number().positive(), high: z.number().positive(), label: z.string().optional() }),
|
|
94
|
+
]).optional().describe('The first such pivot inside the level = met; outside = missed (the thesis is challenged). Compared with the pivot bar\'s intraday low/high.'),
|
|
95
|
+
}),
|
|
96
|
+
z.looseObject({
|
|
97
|
+
type: z.literal('close_vs_level'), id: idField, label, symbol: symbolField,
|
|
98
|
+
basis: z.enum(['daily_close', 'weekly_close', 'intraday']), op: z.enum(['above', 'below']), value: z.number().positive(),
|
|
99
|
+
}),
|
|
100
|
+
z.looseObject({ type: z.literal('window_opens'), id: idField, label, symbol: symbolField, timeframe, side: z.enum(['low', 'high']) }),
|
|
101
|
+
z.looseObject({ type: z.literal('trendline_break'), id: idField, label, symbol: symbolField, timeframe, direction: z.enum(['bullish', 'bearish']) }),
|
|
102
|
+
z.looseObject({
|
|
103
|
+
type: z.literal('engine_event'), id: idField, label, symbol: symbolField, timeframe,
|
|
104
|
+
eventType: z.string().describe('One of the allow-list in dwlf_list_thesis_condition_types (e.g. cycle.low.higher_low).'),
|
|
105
|
+
}),
|
|
106
|
+
z.looseObject({ type: z.literal('manual'), id: idField, label: z.string().describe('What you will mark (required).'), symbol: symbolField }),
|
|
107
|
+
]);
|
|
108
|
+
const conditionSchema = z.union([
|
|
109
|
+
knownCondition,
|
|
110
|
+
z.looseObject({ type: z.string().describe('A condition type newer than this tool version (see dwlf_list_thesis_condition_types); SPT validates it.') }),
|
|
111
|
+
]);
|
|
112
|
+
const stepsSchema = z.array(z.looseObject({
|
|
113
|
+
match: z.enum(['any', 'all']).default('any').describe('The step is met when any (or all) of its conditions are.'),
|
|
114
|
+
conditions: z.array(conditionSchema).min(1),
|
|
115
|
+
})).min(1).describe('Ordered: step n+1 is checked only after step n is met. Limits: dwlf_list_thesis_condition_types.');
|
|
116
|
+
const invalidationSchema = z.array(conditionSchema).describe('Any one of these happening marks the thesis challenged (review it). Optional.');
|
|
117
|
+
const textFields = {
|
|
118
|
+
title: z.string().describe('One line: what you are waiting for.'),
|
|
119
|
+
context: z.string().optional().describe('Your assessment, why you are waiting. Replayed verbatim in every alert.'),
|
|
120
|
+
nextStep: z.string().optional().describe('What you intend to look at when it fires (your words).'),
|
|
121
|
+
};
|
|
122
|
+
/** Upper-cases/dash-normalises every symbol the agent supplied, at thesis and condition level (invariant 1). */
|
|
123
|
+
const withSymbols = (conditions) => conditions?.map((c) => (typeof c.symbol === 'string' ? { ...c, symbol: normalizeSymbol(c.symbol) } : c));
|
|
124
|
+
const stepsWithSymbols = (steps) => steps?.map((s) => ({ ...s, conditions: withSymbols(s.conditions) }));
|
|
125
|
+
const defined = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== undefined));
|
|
126
|
+
const savedSummary = (data, verb) => {
|
|
127
|
+
if (data.unchanged) {
|
|
128
|
+
return 'Unchanged: an identical thesis with this clientKey already exists; nothing was written.';
|
|
129
|
+
}
|
|
130
|
+
const t = data.thesis;
|
|
131
|
+
const delivery = data.delivery;
|
|
132
|
+
const where = delivery && !delivery.channel && delivery.reason ? ` Digest: ${delivery.reason}.` : '';
|
|
133
|
+
return t ? `${verb} ${thesisLine(t)}${where}` : verb;
|
|
134
|
+
};
|
|
135
|
+
export function registerThesisTools(server, client) {
|
|
136
|
+
server.tool('dwlf_list_thesis_condition_types', `The vocabulary of thesis alerts ("Waiting for"): each condition type with its parameters and a definition, the rules (ordered steps, invalidation, arming, nightly checking) and the limits. Read this before dwlf_create_thesis. ${TYPE_HINT}`, {}, async () => {
|
|
137
|
+
try {
|
|
138
|
+
const data = await client.get('/theses/condition-types');
|
|
139
|
+
return ok(data, { summary: 'The six condition types a thesis can wait for, and the rules that apply to all of them.', why: WHY });
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
return fail(error);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
server.tool('dwlf_create_thesis', `Save what the user is waiting for on a symbol, and why ("Waiting for", DWLF-855): ordered steps of conditions, optional invalidation conditions, and the user's own context. DWLF checks it once a night after the close and sends one Telegram digest per run when something happens; nothing known before a condition was saved counts.
|
|
146
|
+
Use dryRun: true first: it restates every condition in plain words (\`checks\`) and checks each can occur, writing nothing. Show the restatement to the user before saving.
|
|
147
|
+
Refusals: 422 CANNOT_OCCUR (a condition can never happen for its symbol), 422 ALREADY_MET (a step condition is already true now; set allowAlreadyMet to save anyway). The refusal's checks are returned.
|
|
148
|
+
clientKey makes the call an upsert (re-sending an identical thesis writes nothing; a changed one writes a new revision). ${TYPE_HINT}`, {
|
|
149
|
+
symbol: z.string().describe('The thesis symbol, e.g. AMZN, BTC-USD.'),
|
|
150
|
+
...textFields,
|
|
151
|
+
group: z.string().optional().describe('Optional grouping, e.g. a watchlist name.'),
|
|
152
|
+
steps: stepsSchema,
|
|
153
|
+
invalidation: invalidationSchema.optional(),
|
|
154
|
+
clientKey: z.string().optional().describe('Your stable key for this thesis (e.g. "amzn-dcl-nov"), making re-sends safe.'),
|
|
155
|
+
allowAlreadyMet: z.boolean().optional().describe('Save even if a step condition is already true now.'),
|
|
156
|
+
dryRun: z.boolean().optional().describe('Restate and check only; nothing is saved.'),
|
|
157
|
+
}, async ({ symbol, title, context, nextStep, group, steps, invalidation, clientKey, allowAlreadyMet, dryRun }) => {
|
|
158
|
+
try {
|
|
159
|
+
const body = defined({
|
|
160
|
+
symbol: normalizeSymbol(symbol), title, context, nextStep, group, clientKey, allowAlreadyMet, source: 'mcp',
|
|
161
|
+
steps: stepsWithSymbols(steps), invalidation: withSymbols(invalidation),
|
|
162
|
+
});
|
|
163
|
+
const data = await client.post(dryRun ? '/theses?dryRun=true' : '/theses', body);
|
|
164
|
+
const summary = dryRun
|
|
165
|
+
? 'Dry run: nothing was saved. `checks` restates each condition and says whether it can occur or is already true.'
|
|
166
|
+
: savedSummary(data, 'Saved:');
|
|
167
|
+
const theses = data.thesis ? [data.thesis] : [];
|
|
168
|
+
return ok(data, { summary, definitions: thesisDefinitions(theses), why: WHY });
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
return fail(error);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
server.tool('dwlf_list_theses', 'The user\'s theses: each with its steps and conditions (pending, met, missed or marked), status (waiting, in_progress, complete, challenged, archived, closed) and liveness (the bar it was last checked against; `stale` when the nightly check has been quiet over 30 hours). A challenged thesis is waiting for the user\'s review. With includeProgress, each active thesis also says how close it is: per pending condition of its current step and per pending invalidation, exact `words` plus fields (a price condition\'s last close and % move to the level; a forming pivot\'s % developed; a weekly window\'s opening date), and `closest`, the one "closest to trigger" choice to sort by (`rank` ascending; `short` for a list). Closes and distances are withheld for keys not entitled to raw prices; the % change since saved is not.', {
|
|
175
|
+
status: z.string().optional().describe('Filter: waiting, in_progress, complete, challenged, archived or closed.'),
|
|
176
|
+
symbol: z.string().optional().describe('Filter by thesis symbol.'),
|
|
177
|
+
group: z.string().optional().describe('Filter by group.'),
|
|
178
|
+
includeProgress: z.boolean().optional().describe('Also say how close each active thesis is to its next condition (and its nearest invalidation), with `closest` to sort by. A few extra reads; leave off for a plain list.'),
|
|
179
|
+
}, async ({ status, symbol, group, includeProgress }) => {
|
|
180
|
+
try {
|
|
181
|
+
const data = await client.get('/theses', {
|
|
182
|
+
status, symbol: symbol ? normalizeSymbol(symbol) : undefined, group, include: includeProgress ? 'progress' : undefined,
|
|
183
|
+
});
|
|
184
|
+
const theses = (data.theses || []);
|
|
185
|
+
// With progress: name the closest few, in SPT's own short words and order (closest.rank, compared element by element,
|
|
186
|
+
// ascending). A thesis whose closest has no short or no numeric rank is left out of the line, never an error.
|
|
187
|
+
const rankOf = (t) => {
|
|
188
|
+
const c = t.progress?.closest;
|
|
189
|
+
const rank = c?.rank;
|
|
190
|
+
return c?.short && Array.isArray(rank) && rank.length > 0 && rank.every((v) => Number.isFinite(v)) ? rank : null;
|
|
191
|
+
};
|
|
192
|
+
const byRank = (a, b) => {
|
|
193
|
+
for (let i = 0; i < Math.max(a.length, b.length); i += 1) {
|
|
194
|
+
const d = (a[i] ?? 0) - (b[i] ?? 0);
|
|
195
|
+
if (d !== 0) {
|
|
196
|
+
return d;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return 0;
|
|
200
|
+
};
|
|
201
|
+
const ranked = includeProgress
|
|
202
|
+
? theses.filter((t) => rankOf(t)).sort((a, b) => byRank(rankOf(a), rankOf(b)))
|
|
203
|
+
: [];
|
|
204
|
+
const closestLine = ranked.length
|
|
205
|
+
? ` Closest to trigger: ${ranked.slice(0, 3).map((t) => `${t.symbol} (${t.progress.closest.short})`).join(', ')}.`
|
|
206
|
+
: '';
|
|
207
|
+
const summary = theses.length
|
|
208
|
+
? `${theses.length} thes${theses.length === 1 ? 'is' : 'es'}: ${describeCounts(countBy(theses, 'status'))}.${closestLine}`
|
|
209
|
+
: 'No theses match.';
|
|
210
|
+
return ok(data, { summary, definitions: thesisDefinitions(theses), why: WHY });
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
return fail(error);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
server.tool('dwlf_get_thesis', 'One thesis in full: every condition with its state, the revisions (earlier ones are kept), its fires (what happened, when DWLF could know it) and liveness. Read `currentRevision` here before dwlf_revise_thesis or a review that revises.', { thesisId: z.string().describe('Thesis ID') }, async ({ thesisId }) => {
|
|
217
|
+
try {
|
|
218
|
+
const data = await client.get(`/theses/${encodeURIComponent(thesisId)}`);
|
|
219
|
+
const t = data.thesis;
|
|
220
|
+
if (!t) {
|
|
221
|
+
return ok(data, { summary: 'The response carried no thesis.', why: WHY });
|
|
222
|
+
}
|
|
223
|
+
return ok(data, { summary: thesisLine(t), definitions: thesisDefinitions([t], t.fires || []), why: WHY });
|
|
224
|
+
}
|
|
225
|
+
catch (error) {
|
|
226
|
+
return fail(error);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
server.tool('dwlf_revise_thesis', `Change a thesis: writes a new revision and keeps the earlier ones. Send expectedRevision (the currentRevision you read; 409 REVISION_CONFLICT if it moved) and only the fields to change. steps/invalidation, when sent, replace the whole list: keep each unchanged condition's id so it keeps its arming and result. A changed or new condition is armed from now (nothing before counts). Same refusals as create (422 CANNOT_OCCUR / ALREADY_MET). ${TYPE_HINT}`, {
|
|
230
|
+
thesisId: z.string().describe('Thesis ID'),
|
|
231
|
+
expectedRevision: z.number().int().describe('The currentRevision you read.'),
|
|
232
|
+
title: textFields.title.optional(),
|
|
233
|
+
context: textFields.context,
|
|
234
|
+
nextStep: textFields.nextStep,
|
|
235
|
+
steps: stepsSchema.optional(),
|
|
236
|
+
invalidation: invalidationSchema.optional(),
|
|
237
|
+
allowAlreadyMet: z.boolean().optional(),
|
|
238
|
+
}, async ({ thesisId, expectedRevision, title, context, nextStep, steps, invalidation, allowAlreadyMet }) => {
|
|
239
|
+
try {
|
|
240
|
+
const body = defined({
|
|
241
|
+
expectedRevision, title, context, nextStep, allowAlreadyMet, source: 'mcp',
|
|
242
|
+
steps: stepsWithSymbols(steps), invalidation: withSymbols(invalidation),
|
|
243
|
+
});
|
|
244
|
+
const data = await client.patch(`/theses/${encodeURIComponent(thesisId)}`, body);
|
|
245
|
+
const t = data.thesis;
|
|
246
|
+
return ok(data, { summary: savedSummary(data, 'Revised:'), definitions: thesisDefinitions(t ? [t] : []), why: WHY });
|
|
247
|
+
}
|
|
248
|
+
catch (error) {
|
|
249
|
+
return fail(error);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
server.tool('dwlf_review_thesis', `Record the user's answer to a thesis (usually a challenged one): keep (unchanged; clears the challenge), revise (a new revision: send expectedRevision and the fields to change, as dwlf_revise_thesis) or close (ends it, with an outcome). Record the user's own answer; do not choose it for them.`, {
|
|
253
|
+
thesisId: z.string().describe('Thesis ID'),
|
|
254
|
+
answer: z.enum(['keep', 'revise', 'close']),
|
|
255
|
+
outcome: z.looseObject({
|
|
256
|
+
kind: z.enum(['acted', 'not_acted', 'note']),
|
|
257
|
+
note: z.string().optional(),
|
|
258
|
+
links: z.array(z.string()).max(5).optional(),
|
|
259
|
+
}).optional().describe('For close: what the user did, in their words.'),
|
|
260
|
+
expectedRevision: z.number().int().optional().describe('For revise: the currentRevision you read.'),
|
|
261
|
+
title: textFields.title.optional(),
|
|
262
|
+
context: textFields.context,
|
|
263
|
+
nextStep: textFields.nextStep,
|
|
264
|
+
steps: stepsSchema.optional(),
|
|
265
|
+
invalidation: invalidationSchema.optional(),
|
|
266
|
+
allowAlreadyMet: z.boolean().optional().describe('For revise: save even if a step condition is already true now.'),
|
|
267
|
+
}, async ({ thesisId, answer, outcome, expectedRevision, title, context, nextStep, steps, invalidation, allowAlreadyMet }) => {
|
|
268
|
+
try {
|
|
269
|
+
const body = defined({
|
|
270
|
+
answer, outcome, expectedRevision, title, context, nextStep, allowAlreadyMet, source: 'mcp',
|
|
271
|
+
steps: stepsWithSymbols(steps), invalidation: withSymbols(invalidation),
|
|
272
|
+
});
|
|
273
|
+
const data = await client.post(`/theses/${encodeURIComponent(thesisId)}/review`, body);
|
|
274
|
+
const t = data.thesis;
|
|
275
|
+
return ok(data, { summary: t ? `Review recorded (${answer}): ${thesisLine(t)}` : `Review recorded (${answer}).`, definitions: thesisDefinitions(t ? [t] : []), why: WHY });
|
|
276
|
+
}
|
|
277
|
+
catch (error) {
|
|
278
|
+
return fail(error);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
server.tool('dwlf_mark_thesis_condition_met', 'Mark one of a thesis\'s MANUAL conditions met (once), with an optional note: something only the user can judge (e.g. "the news I was waiting for came out"). The nightly check records it on its next run. Only manual conditions can be marked (400 NOT_A_MANUAL_CONDITION); a second mark is 409 ALREADY_MARKED.', {
|
|
282
|
+
thesisId: z.string().describe('Thesis ID'),
|
|
283
|
+
conditionId: z.string().describe('The manual condition\'s id (from dwlf_get_thesis).'),
|
|
284
|
+
note: z.string().optional(),
|
|
285
|
+
}, async ({ thesisId, conditionId, note }) => {
|
|
286
|
+
try {
|
|
287
|
+
const data = await client.post(`/theses/${encodeURIComponent(thesisId)}/mark-met`, defined({ conditionId, note }));
|
|
288
|
+
const t = data.thesis;
|
|
289
|
+
return ok(data, { summary: `Marked ${conditionId}.${t ? ` ${thesisLine(t)}` : ''}`, definitions: thesisDefinitions(t ? [t] : []), why: WHY });
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
return fail(error);
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
server.tool('dwlf_archive_thesis', 'Archive a thesis: it is kept, with its revisions and fires, in the journal and is no longer checked. To end it with an outcome instead, use dwlf_review_thesis with answer close.', { thesisId: z.string().describe('Thesis ID') }, async ({ thesisId }) => {
|
|
296
|
+
try {
|
|
297
|
+
const data = await client.post(`/theses/${encodeURIComponent(thesisId)}/archive`, {});
|
|
298
|
+
return ok(data, { summary: `Archived ${thesisId}: kept, no longer checked.`, why: WHY });
|
|
299
|
+
}
|
|
300
|
+
catch (error) {
|
|
301
|
+
return fail(error);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
server.tool('dwlf_delete_thesis', 'Permanently delete a thesis with its revisions and fires. This cannot be undone; dwlf_archive_thesis keeps the record instead. Confirm with the user first.', { thesisId: z.string().describe('Thesis ID') }, async ({ thesisId }) => {
|
|
305
|
+
try {
|
|
306
|
+
const data = await client.delete(`/theses/${encodeURIComponent(thesisId)}`);
|
|
307
|
+
return ok(data, { summary: `Deleted ${thesisId}, with its revisions and fires.` });
|
|
308
|
+
}
|
|
309
|
+
catch (error) {
|
|
310
|
+
return fail(error);
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
server.tool('dwlf_list_thesis_fires', 'The feed of thesis fires, oldest first: each time a step was met, a condition was missed, an invalidation was hit or a deciding event was withdrawn, across all the user\'s theses. Pass back the returned `cursor` next time to read only new fires (each fire is read once). The cursor is yours to keep (this server stores nothing): with none, the feed pages from the oldest fire, and the ones the user has not seen are the loud fires with `acknowledgedAt` null. `knowableAt` is when DWLF could first know it; `session` the bar. Closes are withheld for keys not entitled to raw prices. After telling the user, acknowledge with dwlf_ack_thesis_fires.', {
|
|
314
|
+
cursor: z.string().optional().describe('The cursor from your last read; omit to start from the oldest.'),
|
|
315
|
+
limit: z.number().int().min(1).max(100).optional().describe('Default 50.'),
|
|
316
|
+
}, async ({ cursor, limit }) => {
|
|
317
|
+
try {
|
|
318
|
+
const data = await client.get('/theses/fires', { cursor, limit });
|
|
319
|
+
const fires = (data.fires || []);
|
|
320
|
+
const unacked = fires.filter((f) => f.loud && !f.acknowledgedAt).length;
|
|
321
|
+
const summary = fires.length
|
|
322
|
+
? `${fires.length} fire(s): ${describeCounts(countBy(fires, 'kind'))}; ${unacked} not yet acknowledged. Keep \`cursor\` for the next read.`
|
|
323
|
+
: 'No new fires. Keep `cursor` for the next read.';
|
|
324
|
+
return ok(data, { summary, definitions: { fireKind: definitionsFor(FIRE_KIND_DEFINITIONS, fires.map((f) => f.kind)) }, why: WHY });
|
|
325
|
+
}
|
|
326
|
+
catch (error) {
|
|
327
|
+
return fail(error);
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
server.tool('dwlf_ack_thesis_fires', 'Acknowledge fires the user has seen (up to 100 per call), so the app stops showing them as new. Pass { thesisId, fireId } pairs from dwlf_list_thesis_fires or dwlf_get_thesis.', {
|
|
331
|
+
fires: z.array(z.object({ thesisId: z.string(), fireId: z.string() })).min(1).max(100),
|
|
332
|
+
}, async ({ fires }) => {
|
|
333
|
+
try {
|
|
334
|
+
const data = await client.post('/theses/fires/ack', { fires });
|
|
335
|
+
return ok(data, { summary: `Acknowledged ${String(data.acknowledged ?? fires.length)} fire(s).` });
|
|
336
|
+
}
|
|
337
|
+
catch (error) {
|
|
338
|
+
return fail(error);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
//# sourceMappingURL=theses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theses.js","sourceRoot":"","sources":["../../src/tools/theses.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAE3D;;;;;;GAMG;AAEH,MAAM,kBAAkB,GAAG;IACzB,OAAO,EAAE,mDAAmD;IAC5D,WAAW,EAAE,+EAA+E;IAC5F,QAAQ,EAAE,iBAAiB;IAC3B,UAAU,EAAE,8JAA8J;IAC1K,QAAQ,EAAE,yCAAyC;IACnD,MAAM,EAAE,uDAAuD;CACvD,CAAC;AAEX,MAAM,2BAA2B,GAAG;IAClC,OAAO,EAAE,kBAAkB;IAC3B,GAAG,EAAE,4FAA4F;IACjG,MAAM,EAAE,+FAA+F;IACvG,MAAM,EAAE,uFAAuF;CACvF,CAAC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E,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;KACvF,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QAClB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,CAAS,CAAC;YACvE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,MAAM,CAAC,IAAI,CAAC,YAAY,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QACrG,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAAC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC;IACzC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dwlf/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.0",
|
|
4
4
|
"mcpName": "uk.co.dwlf/mcp-server",
|
|
5
5
|
"description": "MCP server for DWLF market analysis platform — exposes market data, indicators, signals, strategies, backtests, portfolio, trade journal, and more as AI-accessible tools",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dev": "tsx src/index.ts",
|
|
20
20
|
"prepublishOnly": "npm run build",
|
|
21
21
|
"test": "npm run build && node --test test/*.test.mjs",
|
|
22
|
-
"
|
|
22
|
+
"wording:sync": "node scripts/wording-sync.mjs"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"mcp",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"zod": "^4.3.6"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@anthropic-ai/sdk": "^1.8.0",
|
|
58
57
|
"@types/node": "^25.1.0",
|
|
59
58
|
"tsx": "^4.21.0",
|
|
60
59
|
"typescript": "^5.9.3"
|