@thallylabs/mcp 0.10.33 → 0.10.34
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 +6 -0
- package/dist/index.js +11 -4
- package/dist/tools.js +11 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,6 +46,12 @@ site over HTTP.
|
|
|
46
46
|
imports content. To preserve an existing Thally runtime and import content in
|
|
47
47
|
place, the caller must explicitly choose `import_docs`.
|
|
48
48
|
|
|
49
|
+
Migration imports and static checks do not authorize source execution. Set
|
|
50
|
+
`trustSource: true` only after the user explicitly approves local dependency
|
|
51
|
+
installation and build execution of that source. Otherwise the production
|
|
52
|
+
build is skipped and the migration report remains unverified. Imported MDX and
|
|
53
|
+
components are executable code; static analysis is not a sandbox.
|
|
54
|
+
|
|
49
55
|
## License
|
|
50
56
|
|
|
51
57
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -447,7 +447,8 @@ var migrationSourceShape = {
|
|
|
447
447
|
docsDir: z7.string().optional().describe("Docs subdirectory in repo (default: auto-detect)"),
|
|
448
448
|
apiKey: z7.string().optional().describe("Anthropic API key for non-Markdown file conversion"),
|
|
449
449
|
maxPages: z7.number().int().min(1).max(1e3).optional().describe("Maximum public URL pages to import"),
|
|
450
|
-
platform: z7.enum(["mintlify", "docusaurus"]).optional().describe("Source platform (default: auto-detect)")
|
|
450
|
+
platform: z7.enum(["mintlify", "docusaurus"]).optional().describe("Source platform (default: auto-detect)"),
|
|
451
|
+
trustSource: z7.boolean().optional().describe("Only set true after the user explicitly authorizes executing this source locally. Enables dependency installation and production build; imported MDX/components are executable code, not sandboxed data. Default false, even for unattended runs.")
|
|
451
452
|
};
|
|
452
453
|
var migrateDocsSchema = z7.object({
|
|
453
454
|
...migrationSourceShape,
|
|
@@ -470,16 +471,22 @@ async function runMigration(input, isInPlaceImport) {
|
|
|
470
471
|
docsDir: input.docsDir,
|
|
471
472
|
maxPages: input.maxPages,
|
|
472
473
|
platform: input.platform,
|
|
473
|
-
yes: true
|
|
474
|
+
yes: true,
|
|
475
|
+
trustSource: input.trustSource === true
|
|
474
476
|
});
|
|
475
477
|
}
|
|
476
478
|
async function handleMigrateDocs(input) {
|
|
477
479
|
const result = await runMigration(input, false);
|
|
478
|
-
return `
|
|
480
|
+
return `Created a fresh Thally template at ${result.projectDir} and imported ${result.pagesWritten} pages. ${validationSummary(result)}`;
|
|
479
481
|
}
|
|
480
482
|
async function handleImportDocs(input) {
|
|
481
483
|
const result = await runMigration(input, true);
|
|
482
|
-
return `
|
|
484
|
+
return `Imported ${result.pagesWritten} pages into the existing Thally project at ${result.projectDir}. ${validationSummary(result)}`;
|
|
485
|
+
}
|
|
486
|
+
function validationSummary(result) {
|
|
487
|
+
const { validation } = result;
|
|
488
|
+
const status = validation.content === "passed" && validation.build === "passed" ? "Content and production build passed." : "Validation is incomplete; review the failures or skipped checks before publishing.";
|
|
489
|
+
return `${status} ${result.warnings.length} migration warning(s). Report: ${result.reportPath}`;
|
|
483
490
|
}
|
|
484
491
|
|
|
485
492
|
// src/tools/search-docs.ts
|
package/dist/tools.js
CHANGED
|
@@ -438,7 +438,8 @@ var migrationSourceShape = {
|
|
|
438
438
|
docsDir: z7.string().optional().describe("Docs subdirectory in repo (default: auto-detect)"),
|
|
439
439
|
apiKey: z7.string().optional().describe("Anthropic API key for non-Markdown file conversion"),
|
|
440
440
|
maxPages: z7.number().int().min(1).max(1e3).optional().describe("Maximum public URL pages to import"),
|
|
441
|
-
platform: z7.enum(["mintlify", "docusaurus"]).optional().describe("Source platform (default: auto-detect)")
|
|
441
|
+
platform: z7.enum(["mintlify", "docusaurus"]).optional().describe("Source platform (default: auto-detect)"),
|
|
442
|
+
trustSource: z7.boolean().optional().describe("Only set true after the user explicitly authorizes executing this source locally. Enables dependency installation and production build; imported MDX/components are executable code, not sandboxed data. Default false, even for unattended runs.")
|
|
442
443
|
};
|
|
443
444
|
var migrateDocsSchema = z7.object({
|
|
444
445
|
...migrationSourceShape,
|
|
@@ -461,16 +462,22 @@ async function runMigration(input, isInPlaceImport) {
|
|
|
461
462
|
docsDir: input.docsDir,
|
|
462
463
|
maxPages: input.maxPages,
|
|
463
464
|
platform: input.platform,
|
|
464
|
-
yes: true
|
|
465
|
+
yes: true,
|
|
466
|
+
trustSource: input.trustSource === true
|
|
465
467
|
});
|
|
466
468
|
}
|
|
467
469
|
async function handleMigrateDocs(input) {
|
|
468
470
|
const result = await runMigration(input, false);
|
|
469
|
-
return `
|
|
471
|
+
return `Created a fresh Thally template at ${result.projectDir} and imported ${result.pagesWritten} pages. ${validationSummary(result)}`;
|
|
470
472
|
}
|
|
471
473
|
async function handleImportDocs(input) {
|
|
472
474
|
const result = await runMigration(input, true);
|
|
473
|
-
return `
|
|
475
|
+
return `Imported ${result.pagesWritten} pages into the existing Thally project at ${result.projectDir}. ${validationSummary(result)}`;
|
|
476
|
+
}
|
|
477
|
+
function validationSummary(result) {
|
|
478
|
+
const { validation } = result;
|
|
479
|
+
const status = validation.content === "passed" && validation.build === "passed" ? "Content and production build passed." : "Validation is incomplete; review the failures or skipped checks before publishing.";
|
|
480
|
+
return `${status} ${result.warnings.length} migration warning(s). Report: ${result.reportPath}`;
|
|
474
481
|
}
|
|
475
482
|
|
|
476
483
|
// src/tools/search-docs.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thallylabs/mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.34",
|
|
4
4
|
"description": "MCP server for managing Thally docs and tracing product changes into evidence-backed updates for human review.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@anthropic-ai/sdk": "^0.36.0",
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
41
|
-
"create-thally-docs": "0.10.
|
|
41
|
+
"create-thally-docs": "0.10.32",
|
|
42
42
|
"p-limit": "^6.1.0",
|
|
43
43
|
"yaml": "^2.8.2",
|
|
44
44
|
"zod": "^3.0.0"
|