@stratta/mcp 0.5.0 → 0.7.1
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 +63 -13
- package/dist/errors.d.ts +6 -0
- package/dist/errors.js +55 -0
- package/dist/index.js +69 -119
- package/dist/tools/define.d.ts +45 -0
- package/dist/tools/define.js +4 -0
- package/dist/tools/ingest.d.ts +140 -243
- package/dist/tools/ingest.js +225 -238
- package/dist/tools/read.d.ts +51 -0
- package/dist/tools/read.js +247 -0
- package/package.json +9 -9
- package/skills/ingest-norm/SKILL.md +140 -128
- package/dist/tools/get-cross-refs.d.ts +0 -24
- package/dist/tools/get-cross-refs.js +0 -23
- package/dist/tools/get-figure.d.ts +0 -24
- package/dist/tools/get-figure.js +0 -50
- package/dist/tools/get-methodology.d.ts +0 -18
- package/dist/tools/get-methodology.js +0 -21
- package/dist/tools/get-section.d.ts +0 -24
- package/dist/tools/get-section.js +0 -34
- package/dist/tools/get-subtree.d.ts +0 -29
- package/dist/tools/get-subtree.js +0 -39
- package/dist/tools/get-toc.d.ts +0 -24
- package/dist/tools/get-toc.js +0 -32
- package/dist/tools/list-norms.d.ts +0 -11
- package/dist/tools/list-norms.js +0 -17
- package/dist/tools/search-in-norm.d.ts +0 -29
- package/dist/tools/search-in-norm.js +0 -31
package/dist/tools/ingest.d.ts
CHANGED
|
@@ -1,243 +1,140 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
};
|
|
142
|
-
readonly tableNumber: {
|
|
143
|
-
readonly type: "string";
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
readonly required: readonly ["sectionId", "data", "caption", "tableNumber"];
|
|
147
|
-
readonly additionalProperties: false;
|
|
148
|
-
};
|
|
149
|
-
}, {
|
|
150
|
-
readonly name: "ingest_attach_cross_ref";
|
|
151
|
-
readonly description: "Attach a cross-reference from a section to another norm/section.";
|
|
152
|
-
readonly inputSchema: {
|
|
153
|
-
readonly type: "object";
|
|
154
|
-
readonly properties: {
|
|
155
|
-
readonly sourceSectionId: {
|
|
156
|
-
readonly type: "string";
|
|
157
|
-
};
|
|
158
|
-
readonly targetDocumentCode: {
|
|
159
|
-
readonly type: "string";
|
|
160
|
-
};
|
|
161
|
-
readonly targetSectionPath: {
|
|
162
|
-
readonly type: "string";
|
|
163
|
-
};
|
|
164
|
-
readonly refText: {
|
|
165
|
-
readonly type: "string";
|
|
166
|
-
};
|
|
167
|
-
readonly refType: {
|
|
168
|
-
readonly type: "string";
|
|
169
|
-
readonly enum: readonly ["explicit", "implicit"];
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
readonly required: readonly ["sourceSectionId", "targetDocumentCode", "refText", "refType"];
|
|
173
|
-
readonly additionalProperties: false;
|
|
174
|
-
};
|
|
175
|
-
}, {
|
|
176
|
-
readonly name: "ingest_upload_figure";
|
|
177
|
-
readonly description: "Upload a figure image (base64) and attach it to a section. mimeType must be image/png, image/jpeg or image/webp; max 8 MB.";
|
|
178
|
-
readonly inputSchema: {
|
|
179
|
-
readonly type: "object";
|
|
180
|
-
readonly properties: {
|
|
181
|
-
readonly sectionId: {
|
|
182
|
-
readonly type: "string";
|
|
183
|
-
};
|
|
184
|
-
readonly base64: {
|
|
185
|
-
readonly type: "string";
|
|
186
|
-
readonly description: "Base64-encoded image bytes (data: prefix tolerated).";
|
|
187
|
-
};
|
|
188
|
-
readonly mimeType: {
|
|
189
|
-
readonly type: "string";
|
|
190
|
-
readonly enum: readonly ["image/png", "image/jpeg", "image/webp"];
|
|
191
|
-
};
|
|
192
|
-
readonly caption: {
|
|
193
|
-
readonly type: "string";
|
|
194
|
-
};
|
|
195
|
-
readonly figureNumber: {
|
|
196
|
-
readonly type: "string";
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
readonly required: readonly ["sectionId", "base64", "mimeType", "caption", "figureNumber"];
|
|
200
|
-
readonly additionalProperties: false;
|
|
201
|
-
};
|
|
202
|
-
}, {
|
|
203
|
-
readonly name: "ingest_normalize_cross_refs";
|
|
204
|
-
readonly description: "Scan all sections of a document and (re)build cross-references to other norms detected in the text. Idempotent.";
|
|
205
|
-
readonly inputSchema: {
|
|
206
|
-
readonly type: "object";
|
|
207
|
-
readonly properties: {
|
|
208
|
-
readonly documentId: {
|
|
209
|
-
readonly type: "string";
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
readonly required: readonly ["documentId"];
|
|
213
|
-
readonly additionalProperties: false;
|
|
214
|
-
};
|
|
215
|
-
}, {
|
|
216
|
-
readonly name: "ingest_publish";
|
|
217
|
-
readonly description: "Publish a draft document so it becomes queryable via the read tools in YOUR workspace.";
|
|
218
|
-
readonly inputSchema: {
|
|
219
|
-
readonly type: "object";
|
|
220
|
-
readonly properties: {
|
|
221
|
-
readonly documentId: {
|
|
222
|
-
readonly type: "string";
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
readonly required: readonly ["documentId"];
|
|
226
|
-
readonly additionalProperties: false;
|
|
227
|
-
};
|
|
228
|
-
}, {
|
|
229
|
-
readonly name: "ingest_delete";
|
|
230
|
-
readonly description: "Delete a document and all its sections/figures/tables/formulas/cross-refs. Use before re-ingesting.";
|
|
231
|
-
readonly inputSchema: {
|
|
232
|
-
readonly type: "object";
|
|
233
|
-
readonly properties: {
|
|
234
|
-
readonly documentId: {
|
|
235
|
-
readonly type: "string";
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
readonly required: readonly ["documentId"];
|
|
239
|
-
readonly additionalProperties: false;
|
|
240
|
-
};
|
|
241
|
-
}];
|
|
242
|
-
export declare function isIngestTool(name: string): boolean;
|
|
243
|
-
export declare function handleIngestTool(client: ConvexHttpClient, name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ingestStatus: import("./define.js").ToolDef<{
|
|
3
|
+
code: z.ZodString;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const ingestCreateDocument: import("./define.js").ToolDef<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
year: z.ZodNumber;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
language: z.ZodEnum<{
|
|
10
|
+
fr: "fr";
|
|
11
|
+
de: "de";
|
|
12
|
+
it: "it";
|
|
13
|
+
en: "en";
|
|
14
|
+
}>;
|
|
15
|
+
totalPages: z.ZodNumber;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const ingestCreateSections: import("./define.js").ToolDef<{
|
|
18
|
+
documentId: z.ZodString;
|
|
19
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
20
|
+
nodeId: z.ZodString;
|
|
21
|
+
parentNodeId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
path: z.ZodString;
|
|
23
|
+
title: z.ZodString;
|
|
24
|
+
summary: z.ZodString;
|
|
25
|
+
depth: z.ZodNumber;
|
|
26
|
+
content: z.ZodString;
|
|
27
|
+
rawContent: z.ZodString;
|
|
28
|
+
pageStart: z.ZodNumber;
|
|
29
|
+
pageEnd: z.ZodNumber;
|
|
30
|
+
orderIndex: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const ingestAttachFormula: import("./define.js").ToolDef<{
|
|
34
|
+
sectionId: z.ZodString;
|
|
35
|
+
latex: z.ZodString;
|
|
36
|
+
description: z.ZodString;
|
|
37
|
+
formulaNumber: z.ZodString;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const ingestAttachTable: import("./define.js").ToolDef<{
|
|
40
|
+
sectionId: z.ZodString;
|
|
41
|
+
data: z.ZodObject<{
|
|
42
|
+
headers: z.ZodArray<z.ZodCoercedString<unknown>>;
|
|
43
|
+
rows: z.ZodArray<z.ZodArray<z.ZodCoercedString<unknown>>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
caption: z.ZodString;
|
|
46
|
+
tableNumber: z.ZodString;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const ingestAttachCrossRef: import("./define.js").ToolDef<{
|
|
49
|
+
sourceSectionId: z.ZodString;
|
|
50
|
+
targetDocumentCode: z.ZodString;
|
|
51
|
+
targetSectionPath: z.ZodOptional<z.ZodString>;
|
|
52
|
+
refText: z.ZodString;
|
|
53
|
+
refType: z.ZodEnum<{
|
|
54
|
+
explicit: "explicit";
|
|
55
|
+
implicit: "implicit";
|
|
56
|
+
}>;
|
|
57
|
+
}>;
|
|
58
|
+
export declare const ingestUploadFigure: import("./define.js").ToolDef<{
|
|
59
|
+
sectionId: z.ZodString;
|
|
60
|
+
base64: z.ZodString;
|
|
61
|
+
mimeType: z.ZodEnum<{
|
|
62
|
+
"image/png": "image/png";
|
|
63
|
+
"image/jpeg": "image/jpeg";
|
|
64
|
+
"image/webp": "image/webp";
|
|
65
|
+
}>;
|
|
66
|
+
caption: z.ZodString;
|
|
67
|
+
figureNumber: z.ZodString;
|
|
68
|
+
}>;
|
|
69
|
+
export declare const ingestNormalizeCrossRefs: import("./define.js").ToolDef<{
|
|
70
|
+
documentId: z.ZodString;
|
|
71
|
+
}>;
|
|
72
|
+
export declare const ingestPublish: import("./define.js").ToolDef<{
|
|
73
|
+
documentId: z.ZodString;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const ingestDelete: import("./define.js").ToolDef<{
|
|
76
|
+
documentId: z.ZodString;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const ingestTools: (import("./define.js").ToolDef<{
|
|
79
|
+
code: z.ZodString;
|
|
80
|
+
}> | import("./define.js").ToolDef<{
|
|
81
|
+
code: z.ZodString;
|
|
82
|
+
year: z.ZodNumber;
|
|
83
|
+
title: z.ZodString;
|
|
84
|
+
language: z.ZodEnum<{
|
|
85
|
+
fr: "fr";
|
|
86
|
+
de: "de";
|
|
87
|
+
it: "it";
|
|
88
|
+
en: "en";
|
|
89
|
+
}>;
|
|
90
|
+
totalPages: z.ZodNumber;
|
|
91
|
+
}> | import("./define.js").ToolDef<{
|
|
92
|
+
documentId: z.ZodString;
|
|
93
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
94
|
+
nodeId: z.ZodString;
|
|
95
|
+
parentNodeId: z.ZodOptional<z.ZodString>;
|
|
96
|
+
path: z.ZodString;
|
|
97
|
+
title: z.ZodString;
|
|
98
|
+
summary: z.ZodString;
|
|
99
|
+
depth: z.ZodNumber;
|
|
100
|
+
content: z.ZodString;
|
|
101
|
+
rawContent: z.ZodString;
|
|
102
|
+
pageStart: z.ZodNumber;
|
|
103
|
+
pageEnd: z.ZodNumber;
|
|
104
|
+
orderIndex: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
}> | import("./define.js").ToolDef<{
|
|
107
|
+
sectionId: z.ZodString;
|
|
108
|
+
latex: z.ZodString;
|
|
109
|
+
description: z.ZodString;
|
|
110
|
+
formulaNumber: z.ZodString;
|
|
111
|
+
}> | import("./define.js").ToolDef<{
|
|
112
|
+
sectionId: z.ZodString;
|
|
113
|
+
data: z.ZodObject<{
|
|
114
|
+
headers: z.ZodArray<z.ZodCoercedString<unknown>>;
|
|
115
|
+
rows: z.ZodArray<z.ZodArray<z.ZodCoercedString<unknown>>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
caption: z.ZodString;
|
|
118
|
+
tableNumber: z.ZodString;
|
|
119
|
+
}> | import("./define.js").ToolDef<{
|
|
120
|
+
sourceSectionId: z.ZodString;
|
|
121
|
+
targetDocumentCode: z.ZodString;
|
|
122
|
+
targetSectionPath: z.ZodOptional<z.ZodString>;
|
|
123
|
+
refText: z.ZodString;
|
|
124
|
+
refType: z.ZodEnum<{
|
|
125
|
+
explicit: "explicit";
|
|
126
|
+
implicit: "implicit";
|
|
127
|
+
}>;
|
|
128
|
+
}> | import("./define.js").ToolDef<{
|
|
129
|
+
sectionId: z.ZodString;
|
|
130
|
+
base64: z.ZodString;
|
|
131
|
+
mimeType: z.ZodEnum<{
|
|
132
|
+
"image/png": "image/png";
|
|
133
|
+
"image/jpeg": "image/jpeg";
|
|
134
|
+
"image/webp": "image/webp";
|
|
135
|
+
}>;
|
|
136
|
+
caption: z.ZodString;
|
|
137
|
+
figureNumber: z.ZodString;
|
|
138
|
+
}> | import("./define.js").ToolDef<{
|
|
139
|
+
documentId: z.ZodString;
|
|
140
|
+
}>)[];
|