@podlite/mcp 0.0.20 → 0.0.22
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/CHANGELOG.podlite +20 -0
- package/README.md +6 -4
- package/lib/index.js +31 -9
- package/lib/index.js.map +1 -1
- package/lib/tools.d.ts +14 -4
- package/lib/tools.js +240 -28
- package/lib/tools.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.podlite
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
=head1 Upcoming
|
|
4
4
|
|
|
5
|
+
=head1 0.0.21
|
|
6
|
+
|
|
7
|
+
=item a file of C<files> is read in the format its name gives, any other extension than Podlite or Markdown in the default mode, and a C<:mime-type> on the C<=include> line decides how it is read
|
|
8
|
+
|
|
9
|
+
=item C<podlite_query> reads a source its selector names (C<file:part.podlite | head1>, a mask, or C<input.podlite> for the document itself) and a C<file:> operand from C<files>; each file found is read with its own includes, and the selection runs over each of them, as C<podlite query> does over files on disk. When the files the selection names do not include the document itself, the answer says that C<text> was not used as its document. Under a mask with an address a file without the address is passed over
|
|
10
|
+
|
|
11
|
+
=item the json answer of C<podlite_query> gives each block the file it comes from, first
|
|
12
|
+
|
|
13
|
+
=item C<files> and the document are one set: a file of the set that includes C<input.podlite> gets the document itself
|
|
14
|
+
|
|
15
|
+
=item a mask of an include in C<files> stays in its directory: C<=include file:*.podlite> no longer brings files of directories below, in C<podlite_render>, C<podlite_query> and C<podlite_validate> alike; C<**> goes down
|
|
16
|
+
|
|
17
|
+
=item C<podlite_render>, C<podlite_query> and C<podlite_validate> take C<files>, the texts a document includes, by path relative to the document; an C<=include> is assembled from them as C<convert> assembles it from disk. In C<podlite_render> and C<podlite_query> a problem the assembly reports as an error makes the answer an error, with the problems first; other problems and the list of the files whose blocks are in the document come after the output. C<podlite_validate> answers with its report alone The document stands in the map as C<input.podlite>, and a key of that name is refused
|
|
18
|
+
|
|
19
|
+
=item a call without C<files> on a document with an C<=include> now answers with a second part naming the paths the includes ask for; the output is as before. C<podlite_validate> gives the same as an C<info> problem, and the report stays C<ok>
|
|
20
|
+
|
|
21
|
+
=item C<podlite_query> reports a source or an address in the selector that does not resolve as an error of the tool; it returned no matches
|
|
22
|
+
|
|
23
|
+
=item the query tool selects from the tree C<convert> reads, so a Markdown section is read into blocks, and gives a found block as C<podlite query> does.
|
|
24
|
+
|
|
5
25
|
=head1 0.0.18
|
|
6
26
|
|
|
7
27
|
=item the package declares an exports map and its own type entry, and no longer points at an esm build it never produced. A bundler that preferred that entry resolved to a missing file
|
package/README.md
CHANGED
|
@@ -28,9 +28,9 @@ claude mcp add podlite -- npx -y @podlite/mcp
|
|
|
28
28
|
| Tool | Input | Output |
|
|
29
29
|
|------|-------|--------|
|
|
30
30
|
| `podlite_parse` | `text` | AST as JSON: typed blocks with `line`/`column` locations |
|
|
31
|
-
| `podlite_validate` | `text` | `{ok, counts, problems[]}` — parse errors, lint rules, schema check |
|
|
32
|
-
| `podlite_render` | `text`, `format: html\|md` | rendered document |
|
|
33
|
-
| `podlite_query` | `selector`, `text`, `format: podlite\|json\|html\|md` | blocks matching a structural selector |
|
|
31
|
+
| `podlite_validate` | `text`, `files?` | `{ok, counts, problems[]}` — parse errors, lint rules, schema check |
|
|
32
|
+
| `podlite_render` | `text`, `format: html\|md`, `files?` | rendered document |
|
|
33
|
+
| `podlite_query` | `selector`, `text`, `format: podlite\|json\|html\|md`, `files?` | blocks matching a structural selector |
|
|
34
34
|
|
|
35
35
|
Selector examples for `podlite_query`:
|
|
36
36
|
|
|
@@ -45,7 +45,9 @@ A structural break in generated markup comes back as a line-located problem, so
|
|
|
45
45
|
## Scope notes
|
|
46
46
|
|
|
47
47
|
- The lint rule set is growing. A clean `podlite_validate` result means the source parses and passes current rules, not an exhaustive audit.
|
|
48
|
-
- `=include`
|
|
48
|
+
- `=include` is resolved only against the `files` a call gives to `podlite_render`, `podlite_query` or `podlite_validate`: a map from path to text, with paths relative to the document, which stands at the root of the map as `input.podlite`. The server reads no disk. Without `files` an include of another path is left as written and the answer names the paths it asks for (an include of `input.podlite` is the document itself, a cycle that brings nothing); with `files: {}` a missing file is an error. When blocks of the files are in the document, the answer of `podlite_render` and `podlite_query` names those files; `podlite_validate` answers with its report alone.
|
|
49
|
+
- Included text goes through the same conversion as any text. The server checks the arguments of a call; the caller answers for what the files contain.
|
|
50
|
+
- A selector of `podlite_query` that names a source of its own (`file:part.podlite | head1`, a mask such as `file:notes/*.podlite`, or `input.podlite` for the document itself) reads it from `files`, each file with its own includes; the answer says when `text` was not used as the document of the selection. An operand such as `in file:terms.podlite` is read from `files` too. A mask's `*` does not go down into a directory; `**` does. In json each block carries the file it comes from.
|
|
49
51
|
- Read-only: no tools mutate files.
|
|
50
52
|
|
|
51
53
|
## Links
|
package/lib/index.js
CHANGED
|
@@ -10,6 +10,20 @@ const errorResult = (e) => ({
|
|
|
10
10
|
content: [{ type: 'text', text: e instanceof Error ? e.message : String(e) }],
|
|
11
11
|
isError: true,
|
|
12
12
|
});
|
|
13
|
+
// The output, then the problems of the assembly, then what was included. A
|
|
14
|
+
// problem that lost included content marks the answer an error and comes first.
|
|
15
|
+
const assembledResult = (output, report) => {
|
|
16
|
+
const problems = report.problems.length ? [{ type: 'text', text: report.problems.join('\n') }] : [];
|
|
17
|
+
const notes = report.notes.map(note => ({ type: 'text', text: note }));
|
|
18
|
+
const shown = { type: 'text', text: output };
|
|
19
|
+
return report.error
|
|
20
|
+
? { content: [...problems, shown, ...notes], isError: true }
|
|
21
|
+
: { content: [shown, ...problems, ...notes] };
|
|
22
|
+
};
|
|
23
|
+
const files = zod_1.z
|
|
24
|
+
.record(zod_1.z.string(), zod_1.z.string())
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('Texts the document includes, by path relative to the document. The document itself stands at the root of this set under the name input.podlite, which a key may not take. Without this field the includes are left as written and the paths they ask for are named. Included text goes through the same conversion as any text; the server checks these arguments, and the caller answers for what the files contain.');
|
|
13
27
|
const createServer = () => {
|
|
14
28
|
const server = new mcp_js_1.McpServer({ name: 'podlite', version });
|
|
15
29
|
server.registerTool('podlite_parse', {
|
|
@@ -31,18 +45,28 @@ const createServer = () => {
|
|
|
31
45
|
description: 'Check Podlite source: parse errors plus lint rules. The rule set is growing; a clean result means the source parses and passes current rules, not an exhaustive audit.',
|
|
32
46
|
inputSchema: {
|
|
33
47
|
text: zod_1.z.string().describe('Podlite source text'),
|
|
48
|
+
files,
|
|
34
49
|
},
|
|
35
|
-
}, async ({ text }) =>
|
|
50
|
+
}, async ({ text, files }) => {
|
|
51
|
+
try {
|
|
52
|
+
return textResult(JSON.stringify((0, tools_1.validateSource)(text, files), null, 2));
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
return errorResult(e);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
36
58
|
server.registerTool('podlite_render', {
|
|
37
59
|
title: 'Render Podlite',
|
|
38
60
|
description: 'Render Podlite source to HTML or Markdown.',
|
|
39
61
|
inputSchema: {
|
|
40
62
|
text: zod_1.z.string().describe('Podlite source text'),
|
|
41
63
|
format: zod_1.z.enum(['html', 'md']).describe('Output format'),
|
|
64
|
+
files,
|
|
42
65
|
},
|
|
43
|
-
}, async ({ text, format }) => {
|
|
66
|
+
}, async ({ text, format, files }) => {
|
|
44
67
|
try {
|
|
45
|
-
|
|
68
|
+
const report = (0, tools_1.renderReport)(text, format, files);
|
|
69
|
+
return assembledResult(report.output, report);
|
|
46
70
|
}
|
|
47
71
|
catch (e) {
|
|
48
72
|
return errorResult(e);
|
|
@@ -55,14 +79,12 @@ const createServer = () => {
|
|
|
55
79
|
selector: zod_1.z.string().describe('Block selector'),
|
|
56
80
|
text: zod_1.z.string().describe('Podlite source text'),
|
|
57
81
|
format: zod_1.z.enum(['podlite', 'json', 'html', 'md']).describe('Output format'),
|
|
82
|
+
files,
|
|
58
83
|
},
|
|
59
|
-
}, async ({ selector, text, format }) => {
|
|
84
|
+
}, async ({ selector, text, format, files }) => {
|
|
60
85
|
try {
|
|
61
|
-
const report = (0, tools_1.querySource)(selector, text, format);
|
|
62
|
-
|
|
63
|
-
return textResult('No matches.');
|
|
64
|
-
}
|
|
65
|
-
return textResult(report.output);
|
|
86
|
+
const report = (0, tools_1.querySource)(selector, text, format, files);
|
|
87
|
+
return assembledResult(report.matchCount === 0 ? 'No matches.' : report.output, report);
|
|
66
88
|
}
|
|
67
89
|
catch (e) {
|
|
68
90
|
return errorResult(e);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,oEAAmE;AACnE,mCAAgF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,oEAAmE;AACnE,mCAAgF;AAGhF,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAI9C,MAAM,UAAU,GAAG,CAAC,IAAY,EAAc,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAA;AAExF,MAAM,WAAW,GAAG,CAAC,CAAU,EAAc,EAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7E,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEF,2EAA2E;AAC3E,gFAAgF;AAChF,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,MAAsB,EAAc,EAAE;IAC7E,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAA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
10
10
|
};
|
|
11
11
|
export declare const parseSource: (text: string) => any;
|
|
12
|
+
export type Files = Record<string, string>;
|
|
13
|
+
export type AssemblyReport = {
|
|
14
|
+
problems: string[];
|
|
15
|
+
error: boolean;
|
|
16
|
+
notes: string[];
|
|
17
|
+
};
|
|
12
18
|
export type RenderFormat = 'html' | 'md';
|
|
13
|
-
export
|
|
19
|
+
export type RenderReport = AssemblyReport & {
|
|
20
|
+
output: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const renderSource: (text: string, format: RenderFormat, files?: Files) => string;
|
|
23
|
+
export declare const renderReport: (text: string, format: RenderFormat, files?: Files) => RenderReport;
|
|
14
24
|
export type QueryFormat = 'podlite' | 'json' | 'html' | 'md';
|
|
15
|
-
export type QueryReport = {
|
|
25
|
+
export type QueryReport = AssemblyReport & {
|
|
16
26
|
matchCount: number;
|
|
17
27
|
output: string;
|
|
18
28
|
};
|
|
19
|
-
export declare const querySource: (selector: string, text: string, format: QueryFormat) => QueryReport;
|
|
20
|
-
export declare const validateSource: (text: string) => ValidateReport;
|
|
29
|
+
export declare const querySource: (selector: string, text: string, format: QueryFormat, files?: Files) => QueryReport;
|
|
30
|
+
export declare const validateSource: (text: string, files?: Files) => ValidateReport;
|
package/lib/tools.js
CHANGED
|
@@ -1,71 +1,283 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateSource = exports.querySource = exports.renderSource = exports.parseSource = void 0;
|
|
3
|
+
exports.validateSource = exports.querySource = exports.renderReport = exports.renderSource = exports.parseSource = void 0;
|
|
4
4
|
const schema_1 = require("@podlite/schema");
|
|
5
5
|
const podlite_1 = require("podlite");
|
|
6
|
+
const podlite_2 = require("podlite");
|
|
7
|
+
const refresh_tocs_1 = require("podlite/lib/refresh-tocs");
|
|
8
|
+
const loader_1 = require("podlite/lib/lint/loader");
|
|
6
9
|
const scan_1 = require("podlite/lib/lint/grammar/scan");
|
|
7
10
|
const index_1 = require("podlite/lib/lint/rules/index");
|
|
8
11
|
const engine_1 = require("podlite/lib/lint/engine");
|
|
9
|
-
const
|
|
12
|
+
const loader_2 = require("podlite/lib/lint/loader");
|
|
10
13
|
const syntax_valid_1 = require("podlite/lib/lint/rules/syntax-valid");
|
|
14
|
+
const query_blocks_1 = require("podlite/lib/query-blocks");
|
|
11
15
|
const virtualFile = 'input.podlite';
|
|
12
16
|
const parseSource = (text) => (0, schema_1.parse)(text);
|
|
13
17
|
exports.parseSource = parseSource;
|
|
14
|
-
|
|
18
|
+
// a path of the set as the set names it: no leading slash, its . and .. steps taken
|
|
19
|
+
const placeOf = (path) => {
|
|
20
|
+
const out = [];
|
|
21
|
+
for (const part of path.split('/')) {
|
|
22
|
+
if (part === '' || part === '.')
|
|
23
|
+
continue;
|
|
24
|
+
if (part === '..')
|
|
25
|
+
out.pop();
|
|
26
|
+
else
|
|
27
|
+
out.push(part);
|
|
28
|
+
}
|
|
29
|
+
return out.join('/');
|
|
30
|
+
};
|
|
31
|
+
const describeProblem = (problem) => {
|
|
32
|
+
const at = problem.chain[problem.chain.length - 1];
|
|
33
|
+
const line = at?.location ? `:${at.location.start.line}` : '';
|
|
34
|
+
return `${at ? placeOf(at.file) : virtualFile}${line}: ${problem.message}`;
|
|
35
|
+
};
|
|
36
|
+
const dirOf = (key) => {
|
|
37
|
+
const at = key.lastIndexOf('/');
|
|
38
|
+
return at < 0 ? '' : key.slice(0, at);
|
|
39
|
+
};
|
|
40
|
+
// The set of a call and its sources. Without files only the document is known: a
|
|
41
|
+
// path to anything else is not known, and is named once.
|
|
42
|
+
const openSet = (text, files) => {
|
|
43
|
+
if (files && Object.keys(files).some(key => placeOf(key) === virtualFile)) {
|
|
44
|
+
throw new Error(`files must not hold ${virtualFile}: that name is the document itself`);
|
|
45
|
+
}
|
|
46
|
+
const all = { ...(files ?? {}), [virtualFile]: text };
|
|
47
|
+
const texts = new Map(Object.keys(all).map((path) => [placeOf(path), all[path]]));
|
|
48
|
+
const asked = [];
|
|
49
|
+
const known = (0, podlite_2.sourcesFromFiles)(all);
|
|
50
|
+
const sources = files
|
|
51
|
+
? known
|
|
52
|
+
: {
|
|
53
|
+
locate: (path, context, plain, at, scheme) => {
|
|
54
|
+
const found = known.locate(path, context, plain, at, scheme);
|
|
55
|
+
// only the document itself is known; a mask could name files that were not given
|
|
56
|
+
if (found && !found.masked && found.sources.every(source => texts.has(placeOf(source.id))))
|
|
57
|
+
return found;
|
|
58
|
+
if (!asked.includes(path))
|
|
59
|
+
asked.push(path);
|
|
60
|
+
return undefined;
|
|
61
|
+
},
|
|
62
|
+
read: known.read,
|
|
63
|
+
};
|
|
64
|
+
return { texts, sources, asked };
|
|
65
|
+
};
|
|
66
|
+
const openReading = (text, files) => {
|
|
67
|
+
const { texts, sources, asked } = openSet(text, files);
|
|
15
68
|
const p = (0, podlite_1.podlite)({ importPlugins: true });
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
69
|
+
const read = (0, podlite_1.readerFor)(p, { format: loader_1.detectFileType });
|
|
70
|
+
const sections = new WeakMap();
|
|
71
|
+
const origin = new WeakMap();
|
|
72
|
+
const toTree = (source, file, config, how) => {
|
|
73
|
+
const tree = read(source, file, config, { format: how?.format });
|
|
74
|
+
(0, query_blocks_1.markSections)(tree, sections);
|
|
75
|
+
return tree;
|
|
76
|
+
};
|
|
77
|
+
const carry = (from, to) => {
|
|
78
|
+
if (sections.has(from))
|
|
79
|
+
sections.set(to, sections.get(from));
|
|
80
|
+
};
|
|
81
|
+
const report = { problems: [], error: false, notes: [] };
|
|
82
|
+
const included = new Set();
|
|
83
|
+
const assemble = (key) => {
|
|
84
|
+
const own = texts.get(key) ?? '';
|
|
85
|
+
const assembled = (0, podlite_2.assembleIncludes)(toTree(own, key), {
|
|
86
|
+
sources,
|
|
87
|
+
// paths written in the file are resolved from its directory in the set
|
|
88
|
+
context: dirOf(key) === '' ? '' : `/${dirOf(key)}`,
|
|
89
|
+
file: key,
|
|
90
|
+
self: `/${key}`,
|
|
91
|
+
text: own,
|
|
92
|
+
parse: toTree,
|
|
93
|
+
origin,
|
|
94
|
+
onCopy: carry,
|
|
95
|
+
tolerant: true,
|
|
96
|
+
onError: problem => {
|
|
97
|
+
report.error = true;
|
|
98
|
+
report.problems.push(describeProblem(problem));
|
|
99
|
+
},
|
|
100
|
+
onWarning: problem => report.problems.push(describeProblem(problem)),
|
|
101
|
+
});
|
|
102
|
+
const tree = (0, refresh_tocs_1.refreshTocs)(assembled, p.parse(own, { podMode: 1 }), key, origin, carry);
|
|
103
|
+
// a file is named when a block of it is in the document, not when it was read
|
|
104
|
+
const visit = (node) => {
|
|
105
|
+
if (!node || typeof node !== 'object')
|
|
106
|
+
return;
|
|
107
|
+
if (Array.isArray(node))
|
|
108
|
+
return node.forEach(visit);
|
|
109
|
+
const from = origin.get(node)?.file;
|
|
110
|
+
if (files && from && placeOf(from) !== key)
|
|
111
|
+
included.add(placeOf(from));
|
|
112
|
+
visit(node.content);
|
|
113
|
+
};
|
|
114
|
+
visit(tree);
|
|
115
|
+
return { tree, key, text: own };
|
|
116
|
+
};
|
|
117
|
+
const finish = () => {
|
|
118
|
+
// a warning: it comes with the other warnings of the assembly, after the output
|
|
119
|
+
if (asked.length)
|
|
120
|
+
report.problems.push(`files were not given; includes not assembled: ${asked.join(', ')}`);
|
|
121
|
+
if (included.size)
|
|
122
|
+
report.notes.push(`included from files: ${[...included].join(', ')}`);
|
|
123
|
+
return report;
|
|
124
|
+
};
|
|
125
|
+
return { texts, given: Boolean(files), sources, origin, sections, report, included, assemble, finish };
|
|
19
126
|
};
|
|
127
|
+
const renderSource = (text, format, files) => (0, exports.renderReport)(text, format, files).output;
|
|
20
128
|
exports.renderSource = renderSource;
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
return text.slice(loc.start.offset, loc.end.offset);
|
|
129
|
+
const renderReport = (text, format, files) => {
|
|
130
|
+
const reading = openReading(text, files);
|
|
131
|
+
const { tree } = reading.assemble(virtualFile);
|
|
132
|
+
const out = format === 'md' ? (0, schema_1.toMarkdown)({}).run(tree) : (0, schema_1.toHtml)({}).run(tree);
|
|
133
|
+
return { ...reading.finish(), output: out.toString() };
|
|
27
134
|
};
|
|
135
|
+
exports.renderReport = renderReport;
|
|
28
136
|
const renderBlock = (block, format) => {
|
|
29
137
|
const root = { type: 'block', name: 'pod', margin: '', content: [block] };
|
|
30
138
|
const out = format === 'md' ? (0, schema_1.toMarkdown)({}).run(root) : (0, schema_1.toHtml)({}).run(root);
|
|
31
139
|
return out.toString().trimEnd();
|
|
32
140
|
};
|
|
33
|
-
|
|
34
|
-
|
|
141
|
+
// The selector with the path of its leading source written anew: the path as the
|
|
142
|
+
// parser read it, after the scheme if one is written; the rest stays as written
|
|
143
|
+
const withSourcePath = (selector, written, path) => {
|
|
144
|
+
const lead = /^\s*(?:file:\s*)?/.exec(selector)?.[0] ?? '';
|
|
145
|
+
return selector.slice(lead.length).startsWith(written)
|
|
146
|
+
? `${lead}${path}${selector.slice(lead.length + written.length)}`
|
|
147
|
+
: selector;
|
|
148
|
+
};
|
|
149
|
+
const querySource = (selector, text, format, files) => {
|
|
150
|
+
const parsed = (0, schema_1.parseSelector)(selector);
|
|
151
|
+
if (!parsed) {
|
|
35
152
|
throw new Error(`Invalid selector: ${selector}`);
|
|
36
153
|
}
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
154
|
+
const reading = openReading(text, files);
|
|
155
|
+
const { texts, origin, sections } = reading;
|
|
156
|
+
// an operand names one file of the set, written as it is, from the root of the set
|
|
157
|
+
const readFile = (document) => {
|
|
158
|
+
const key = placeOf(document);
|
|
159
|
+
if (!texts.has(key))
|
|
160
|
+
return undefined;
|
|
161
|
+
return [{ file: key, node: (0, query_blocks_1.contentOf)(reading.assemble(key).tree) }];
|
|
162
|
+
};
|
|
163
|
+
const found = [];
|
|
164
|
+
const take = (doc, items) => {
|
|
165
|
+
for (const item of items) {
|
|
166
|
+
// a source selected whole comes back as the list of its blocks; a blank line
|
|
167
|
+
// between them is not a block
|
|
168
|
+
if (Array.isArray(item)) {
|
|
169
|
+
take(doc, item);
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (item && typeof item === 'object' && item.type === 'blankline')
|
|
173
|
+
continue;
|
|
174
|
+
if (item && typeof item === 'object' && !('file' in item) && !(0, query_blocks_1.isWrapper)(item)) {
|
|
175
|
+
const where = origin.get(item);
|
|
176
|
+
found.push({
|
|
177
|
+
file: placeOf(where?.file ?? doc.key),
|
|
178
|
+
text: where?.text ?? doc.text,
|
|
179
|
+
block: item,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
const { scheme, document, anchor } = parsed;
|
|
185
|
+
if (scheme === 'file' && document) {
|
|
186
|
+
// the selector names its own source: the documents of the set it names are
|
|
187
|
+
// read, each with its includes, and the selection runs over each of them
|
|
188
|
+
const written = document;
|
|
189
|
+
const pattern = placeOf(written);
|
|
190
|
+
const masked = /[*?]/.test(written);
|
|
191
|
+
const keys = masked
|
|
192
|
+
? [...texts.keys()].filter(key => (0, schema_1.filePathMatches)(`/${key}`, `/${pattern}`)).sort()
|
|
193
|
+
: texts.has(pattern)
|
|
194
|
+
? [pattern]
|
|
195
|
+
: [];
|
|
196
|
+
if (!masked && keys.length === 0) {
|
|
197
|
+
throw new Error(`the source does not resolve: file:${written}${anchor ? `#${anchor}` : ''}`);
|
|
198
|
+
}
|
|
199
|
+
const local = withSourcePath(selector, written, pattern);
|
|
200
|
+
if (keys.length === 0) {
|
|
201
|
+
// nothing found, and the operands of the selection are still read
|
|
202
|
+
const blank = { file: '', node: { type: 'block', name: 'root', margin: '', content: [] } };
|
|
203
|
+
(0, schema_1.runSelector)(local, [], { readFile, home: [blank] });
|
|
204
|
+
}
|
|
205
|
+
// under a mask a file without the address is passed over, as podlite query does;
|
|
206
|
+
// the address is missing only if no file holds it
|
|
207
|
+
let addressed = false;
|
|
208
|
+
for (const key of keys) {
|
|
209
|
+
const doc = reading.assemble(key);
|
|
210
|
+
let items;
|
|
211
|
+
try {
|
|
212
|
+
items = (0, schema_1.runSelector)(local, [{ file: key, node: (0, query_blocks_1.contentOf)(doc.tree) }], { readFile });
|
|
213
|
+
}
|
|
214
|
+
catch (e) {
|
|
215
|
+
if (masked && anchor && e instanceof schema_1.SelectorError && e.kind === 'address')
|
|
216
|
+
continue;
|
|
217
|
+
throw e;
|
|
218
|
+
}
|
|
219
|
+
addressed = true;
|
|
220
|
+
take(doc, items);
|
|
221
|
+
}
|
|
222
|
+
if (masked && anchor && keys.length > 0 && !addressed) {
|
|
223
|
+
throw new Error(`no block has the address ${anchor}: file:${written}#${anchor}`);
|
|
224
|
+
}
|
|
225
|
+
if (!reading.given && masked) {
|
|
226
|
+
reading.report.problems.push(`files were not given; the selector's source is looked for in text only: ${written}`);
|
|
227
|
+
}
|
|
228
|
+
if (!keys.includes(virtualFile)) {
|
|
229
|
+
reading.report.notes.push('text not used as the document of the selection: the selector names its own source');
|
|
42
230
|
}
|
|
43
231
|
}
|
|
232
|
+
else {
|
|
233
|
+
const doc = reading.assemble(virtualFile);
|
|
234
|
+
take(doc, (0, schema_1.runSelector)(selector, [{ file: virtualFile, node: (0, query_blocks_1.contentOf)(doc.tree) }], { readFile }));
|
|
235
|
+
}
|
|
236
|
+
const report = reading.finish();
|
|
44
237
|
let output;
|
|
45
238
|
if (format === 'json') {
|
|
46
|
-
output = JSON.stringify(
|
|
239
|
+
output = JSON.stringify(found.map(m => ({ file: m.file, ...(0, query_blocks_1.jsonBlock)(m.block, sections) })), null, 2);
|
|
47
240
|
}
|
|
48
241
|
else if (format === 'podlite') {
|
|
49
|
-
output =
|
|
50
|
-
|
|
242
|
+
output = found
|
|
243
|
+
// a block an include brought is given as its own file holds it
|
|
244
|
+
.map(m => (0, query_blocks_1.podliteText)(m.block, m.text, sections).trimEnd())
|
|
51
245
|
.filter(Boolean)
|
|
52
246
|
.join('\n\n');
|
|
53
247
|
}
|
|
54
248
|
else {
|
|
55
|
-
output =
|
|
56
|
-
.map(
|
|
249
|
+
output = found
|
|
250
|
+
.map(m => renderBlock(m.block, format))
|
|
57
251
|
.filter(Boolean)
|
|
58
252
|
.join('\n\n');
|
|
59
253
|
}
|
|
60
|
-
return { matchCount:
|
|
254
|
+
return { ...report, matchCount: found.length, output };
|
|
61
255
|
};
|
|
62
256
|
exports.querySource = querySource;
|
|
63
|
-
const validateSource = (text) => {
|
|
257
|
+
const validateSource = (text, files) => {
|
|
258
|
+
// the same set as render and query: without files only the document itself is
|
|
259
|
+
// known, the includes of other paths are not checked, and the paths are named
|
|
260
|
+
const { sources, asked } = openSet(text, files);
|
|
64
261
|
const problems = [...(0, scan_1.scanSourceRules)(text)];
|
|
65
262
|
try {
|
|
66
|
-
const ast = (0,
|
|
67
|
-
const ctx = {
|
|
263
|
+
const ast = (0, loader_2.parseContent)(text, 'podlite');
|
|
264
|
+
const ctx = {
|
|
265
|
+
filePath: virtualFile,
|
|
266
|
+
fileType: 'podlite',
|
|
267
|
+
config: {},
|
|
268
|
+
source: text,
|
|
269
|
+
sources,
|
|
270
|
+
context: '',
|
|
271
|
+
self: `/${virtualFile}`,
|
|
272
|
+
};
|
|
68
273
|
problems.push(...(0, engine_1.runRules)(ast, index_1.DEFAULT_RULES, ctx));
|
|
274
|
+
if (asked.length) {
|
|
275
|
+
problems.push({
|
|
276
|
+
rule: 'include-resolves',
|
|
277
|
+
severity: 'info',
|
|
278
|
+
message: `files were not given; includes not checked: ${asked.join(', ')}`,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
69
281
|
for (const err of (0, schema_1.validatePodliteAst)(ast)) {
|
|
70
282
|
problems.push({
|
|
71
283
|
rule: 'schema-valid',
|
package/lib/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],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AAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;AACrD,CAAC,CAAA;AArCY,QAAA,cAAc,kBAqC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podlite/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "MCP server for Podlite: parse, validate, render, and query tools for AI agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"podlite",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
57
|
-
"@podlite/schema": "0.0.
|
|
58
|
-
"podlite": "0.0.
|
|
57
|
+
"@podlite/schema": "0.0.72",
|
|
58
|
+
"podlite": "0.0.85",
|
|
59
59
|
"zod": "^3.25.0"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|