@stratta/mcp 0.14.0 → 0.15.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/confirm.js +9 -0
- package/dist/tools/catalog.gen.js +3 -2
- package/dist/tools/ingest.d.ts +4 -0
- package/dist/tools/ingest.js +12 -3
- package/package.json +1 -1
package/dist/confirm.js
CHANGED
|
@@ -32,6 +32,15 @@ export const CONFIRMED_TOOLS = {
|
|
|
32
32
|
summary: () => 'remove this option; the evidence filed under it stays on the question',
|
|
33
33
|
prompt: 'Remove it?',
|
|
34
34
|
},
|
|
35
|
+
// The third deletion, gated since 0.15.0 on both transports: it is the one
|
|
36
|
+
// that empties a corpus rather than a dossier.
|
|
37
|
+
ingest_delete: {
|
|
38
|
+
what: 'Document',
|
|
39
|
+
summary: () => 'delete this document with all its sections, figures, tables, formulas ' +
|
|
40
|
+
'and cross-references; the dossiers that cite it keep their citations, ' +
|
|
41
|
+
'pointing at a document that no longer exists',
|
|
42
|
+
prompt: 'Delete it?',
|
|
43
|
+
},
|
|
35
44
|
};
|
|
36
45
|
export const CONFIRMATION_HINT = 'Not recorded: this client cannot ask the user directly. Confirm the ' +
|
|
37
46
|
'decision with the user in the conversation, then call again with ' +
|
|
@@ -1081,7 +1081,7 @@ export const CATALOG = [
|
|
|
1081
1081
|
{
|
|
1082
1082
|
"name": "ingest_delete",
|
|
1083
1083
|
"title": "Delete document",
|
|
1084
|
-
"description": "Delete a document with all its sections, figures, tables, formulas and cross-references. Irreversible; use it before re-ingesting a norm.",
|
|
1084
|
+
"description": "Delete a document of your own organization with all its sections, figures, tables, formulas and cross-references. Irreversible; use it before re-ingesting a norm. The user is asked to confirm through the client before anything is deleted, unless confirmed is true because they already did in the conversation. Reserved to owners and administrators.",
|
|
1085
1085
|
"annotations": {
|
|
1086
1086
|
"readOnlyHint": false,
|
|
1087
1087
|
"destructiveHint": true,
|
|
@@ -1093,7 +1093,8 @@ export const CATALOG = [
|
|
|
1093
1093
|
"remote"
|
|
1094
1094
|
],
|
|
1095
1095
|
"params": {
|
|
1096
|
-
"documentId": "Document id from ingest_create_document."
|
|
1096
|
+
"documentId": "Document id from ingest_create_document.",
|
|
1097
|
+
"confirmed": "true when the user already confirmed the deletion in the conversation. Otherwise the user is asked through the client first."
|
|
1097
1098
|
}
|
|
1098
1099
|
}
|
|
1099
1100
|
];
|
package/dist/tools/ingest.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare const ingestPublish: import("./define.js").ToolDef<{
|
|
|
77
77
|
}>;
|
|
78
78
|
export declare const ingestDelete: import("./define.js").ToolDef<{
|
|
79
79
|
documentId: z.ZodString;
|
|
80
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
80
81
|
}>;
|
|
81
82
|
export declare const ingestTools: (import("./define.js").ToolDef<{
|
|
82
83
|
code: z.ZodString;
|
|
@@ -145,4 +146,7 @@ export declare const ingestTools: (import("./define.js").ToolDef<{
|
|
|
145
146
|
}> | import("./define.js").ToolDef<{
|
|
146
147
|
documentId: z.ZodString;
|
|
147
148
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
}> | import("./define.js").ToolDef<{
|
|
150
|
+
documentId: z.ZodString;
|
|
151
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
148
152
|
}>)[];
|
package/dist/tools/ingest.js
CHANGED
|
@@ -8,8 +8,10 @@ import { defineTool } from './define.js';
|
|
|
8
8
|
* its Stratta workspace, from the user's own agent. Every call is
|
|
9
9
|
* authenticated by the user's API key and scoped server-side to their
|
|
10
10
|
* organisation (see convex/ingestionApi.ts). Driven by the `ingest-norm`
|
|
11
|
-
* skill.
|
|
12
|
-
*
|
|
11
|
+
* skill. ⚠️ They are served on the remote connector too since 2026-09-05
|
|
12
|
+
* (`convex/mcpIngestRegistrations.ts`): the pre-pass still reads a PDF on the
|
|
13
|
+
* caller's disk, which rules out a browser client but not Claude Code, Codex,
|
|
14
|
+
* Cursor or Gemini CLI.
|
|
13
15
|
*
|
|
14
16
|
* Names, descriptions and annotations come from the generated catalogue. The
|
|
15
17
|
* Zod shapes below are enforced by the SDK before a handler runs, so a bad
|
|
@@ -232,7 +234,14 @@ export const ingestPublish = defineTool({
|
|
|
232
234
|
});
|
|
233
235
|
export const ingestDelete = defineTool({
|
|
234
236
|
...headOf('ingest_delete'),
|
|
235
|
-
inputSchema: {
|
|
237
|
+
inputSchema: {
|
|
238
|
+
documentId: documentId('ingest_delete'),
|
|
239
|
+
// Read by the confirmation gate in `confirm.ts`, never sent on.
|
|
240
|
+
confirmed: z
|
|
241
|
+
.boolean()
|
|
242
|
+
.optional()
|
|
243
|
+
.describe(param('ingest_delete', 'confirmed')),
|
|
244
|
+
},
|
|
236
245
|
run: async (client, args) => {
|
|
237
246
|
await client.action(api.ingestionApi.deleteDocument, {
|
|
238
247
|
apiKey: requireApiKey(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stratta/mcp",
|
|
3
3
|
"mcpName": "ch.stratta/mcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"description": "MCP server exposing the engineering norms your firm is licensed for (SIA / Eurocodes) to any MCP client, via Stratta TreeRAG.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"author": "SmartFlow <hello@stratta.ch>",
|