@bendyline/docblocks-cli 2.3.2 → 2.3.4
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 +9 -3
- package/THIRD_PARTY_NOTICES.txt +16 -16
- package/dist/bin.js +110 -21
- package/dist/index.js +2 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -69,12 +69,18 @@ For durable output, call `list_roots` before drafting. If no root is write-enabl
|
|
|
69
69
|
restart the server with `--allow-write`; do not bypass MCP with the direct `convert`
|
|
70
70
|
command. Plain text or ordinary Markdown can be passed directly to
|
|
71
71
|
`convert_document` without a preflight; compatible templates are chosen automatically,
|
|
72
|
-
and explicit Squisq annotations remain optional overrides.
|
|
73
|
-
|
|
72
|
+
and explicit Squisq annotations remain optional overrides. For PPTX, a level-one
|
|
73
|
+
heading creates each deliberate slide boundary by itself; do not add `---` between
|
|
74
|
+
slide headings unless a visible horizontal rule is intended. `get_authoring_context`
|
|
75
|
+
is optional discovery for exact annotation examples, safe defaults, and semantically
|
|
76
|
+
described theme/Summarize choices. MCP guidance tells agents to infer and choose a
|
|
77
|
+
style from the brief rather than presenting raw IDs, asking one compact high-level
|
|
78
|
+
question only when the choice is materially ambiguous. The complete catalog remains
|
|
74
79
|
available at `docblocks://authoring-guide`.
|
|
75
80
|
|
|
76
81
|
`convert` and `video` accept Markdown, Squisq JSON Doc, DBK/ZIP, folders, and
|
|
77
|
-
import-capable linked-registry formats. `build`
|
|
82
|
+
import-capable linked-registry formats. `build`/`serve` standalone HTML includes
|
|
83
|
+
Copy controls for ordinary fenced code blocks; Mermaid fences remain diagrams. `build` replaces generated HTML files;
|
|
78
84
|
`convert` and `video` refuse existing destinations unless `--allow-overwrite` is
|
|
79
85
|
passed. Multi-target conversion stages the complete batch and rolls back replacements
|
|
80
86
|
if publication fails. Build traversal, input bytes, and output bytes are bounded, as
|
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -15,11 +15,11 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
15
15
|
| Package | Version | License | Source |
|
|
16
16
|
| --- | --- | --- | --- |
|
|
17
17
|
| @antfu/install-pkg | 1.1.0 | MIT | https://github.com/antfu/install-pkg |
|
|
18
|
-
| @bendyline/squisq | 2.
|
|
19
|
-
| @bendyline/squisq-cli | 2.
|
|
20
|
-
| @bendyline/squisq-formats | 2.
|
|
21
|
-
| @bendyline/squisq-react | 2.
|
|
22
|
-
| @bendyline/squisq-video | 2.2.
|
|
18
|
+
| @bendyline/squisq | 2.7.0 | MIT | https://github.com/bendyline/squisq |
|
|
19
|
+
| @bendyline/squisq-cli | 2.5.2 | MIT | https://github.com/bendyline/squisq |
|
|
20
|
+
| @bendyline/squisq-formats | 2.4.1 | MIT | https://github.com/bendyline/squisq |
|
|
21
|
+
| @bendyline/squisq-react | 2.7.0 | MIT | https://github.com/bendyline/squisq |
|
|
22
|
+
| @bendyline/squisq-video | 2.2.11 | MIT | https://github.com/bendyline/squisq |
|
|
23
23
|
| @braintree/sanitize-url | 7.1.2 | MIT | https://github.com/braintree/sanitize-url |
|
|
24
24
|
| @chevrotain/types | 11.1.2 | Apache-2.0 | https://github.com/Chevrotain/chevrotain |
|
|
25
25
|
| @ffmpeg/ffmpeg | 0.12.15 | MIT | https://github.com/ffmpegwasm/ffmpeg.wasm |
|
|
@@ -403,7 +403,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
403
403
|
SOFTWARE.
|
|
404
404
|
|
|
405
405
|
==============================================================================
|
|
406
|
-
Components: @bendyline/squisq-cli@2.
|
|
406
|
+
Components: @bendyline/squisq-cli@2.5.2, @bendyline/squisq-formats@2.4.1, @bendyline/squisq-react@2.7.0, @bendyline/squisq-video@2.2.11, @bendyline/squisq@2.7.0
|
|
407
407
|
Source files: node_modules/@bendyline/squisq-cli/LICENSE, node_modules/@bendyline/squisq-formats/LICENSE, node_modules/@bendyline/squisq-react/LICENSE, node_modules/@bendyline/squisq-video/LICENSE, node_modules/@bendyline/squisq/LICENSE
|
|
408
408
|
==============================================================================
|
|
409
409
|
MIT License
|
|
@@ -673,7 +673,7 @@ This software contains code derived from the Puppeteer project (https://github.c
|
|
|
673
673
|
available under the Apache 2.0 license (https://github.com/puppeteer/puppeteer/blob/master/LICENSE).
|
|
674
674
|
|
|
675
675
|
==============================================================================
|
|
676
|
-
Components: @bendyline/squisq-cli@2.
|
|
676
|
+
Components: @bendyline/squisq-cli@2.5.2
|
|
677
677
|
Source files: node_modules/@bendyline/squisq-cli/NOTICE.md
|
|
678
678
|
==============================================================================
|
|
679
679
|
# Third-Party Notices for @bendyline/squisq-cli
|
|
@@ -693,7 +693,7 @@ Copyright and complete license texts for these dependencies are included in
|
|
|
693
693
|
their respective npm distributions and source repositories.
|
|
694
694
|
|
|
695
695
|
==============================================================================
|
|
696
|
-
Components: @bendyline/squisq-cli@2.
|
|
696
|
+
Components: @bendyline/squisq-cli@2.5.2
|
|
697
697
|
Source files: node_modules/@bendyline/squisq-cli/THIRD_PARTY_LICENSES.txt
|
|
698
698
|
==============================================================================
|
|
699
699
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-cli
|
|
@@ -5181,7 +5181,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
5181
5181
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
5182
5182
|
|
|
5183
5183
|
==============================================================================
|
|
5184
|
-
Components: @bendyline/squisq-formats@2.
|
|
5184
|
+
Components: @bendyline/squisq-formats@2.4.1
|
|
5185
5185
|
Source files: node_modules/@bendyline/squisq-formats/NOTICE.md
|
|
5186
5186
|
==============================================================================
|
|
5187
5187
|
# Third-Party Notices for @bendyline/squisq-formats
|
|
@@ -5206,7 +5206,7 @@ texts for these dependencies are included in their respective npm
|
|
|
5206
5206
|
distributions and source repositories.
|
|
5207
5207
|
|
|
5208
5208
|
==============================================================================
|
|
5209
|
-
Components: @bendyline/squisq-formats@2.
|
|
5209
|
+
Components: @bendyline/squisq-formats@2.4.1
|
|
5210
5210
|
Source files: node_modules/@bendyline/squisq-formats/THIRD_PARTY_LICENSES.txt
|
|
5211
5211
|
==============================================================================
|
|
5212
5212
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-formats
|
|
@@ -5388,7 +5388,7 @@ Awesome, nor vice versa. **Please do not use brand logos for any purpose except
|
|
|
5388
5388
|
to represent the company, product, or service to which they refer.**
|
|
5389
5389
|
|
|
5390
5390
|
==============================================================================
|
|
5391
|
-
Components: @bendyline/squisq-react@2.
|
|
5391
|
+
Components: @bendyline/squisq-react@2.7.0
|
|
5392
5392
|
Source files: node_modules/@bendyline/squisq-react/NOTICE.md
|
|
5393
5393
|
==============================================================================
|
|
5394
5394
|
# Third-Party Notices for @bendyline/squisq-react
|
|
@@ -5413,7 +5413,7 @@ third-party license texts for the complete standalone bundle graph are shipped
|
|
|
5413
5413
|
in THIRD_PARTY_LICENSES.txt.
|
|
5414
5414
|
|
|
5415
5415
|
==============================================================================
|
|
5416
|
-
Components: @bendyline/squisq-react@2.
|
|
5416
|
+
Components: @bendyline/squisq-react@2.7.0
|
|
5417
5417
|
Source files: node_modules/@bendyline/squisq-react/THIRD_PARTY_LICENSES.txt
|
|
5418
5418
|
==============================================================================
|
|
5419
5419
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-react
|
|
@@ -9950,7 +9950,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
9950
9950
|
SOFTWARE.
|
|
9951
9951
|
|
|
9952
9952
|
==============================================================================
|
|
9953
|
-
Components: @bendyline/squisq-video@2.2.
|
|
9953
|
+
Components: @bendyline/squisq-video@2.2.11
|
|
9954
9954
|
Source files: node_modules/@bendyline/squisq-video/NOTICE.md
|
|
9955
9955
|
==============================================================================
|
|
9956
9956
|
# Third-Party Notices for @bendyline/squisq-video
|
|
@@ -9975,7 +9975,7 @@ Copyright and complete license texts for the listed dependencies are included
|
|
|
9975
9975
|
in their respective npm distributions and source repositories.
|
|
9976
9976
|
|
|
9977
9977
|
==============================================================================
|
|
9978
|
-
Components: @bendyline/squisq-video@2.2.
|
|
9978
|
+
Components: @bendyline/squisq-video@2.2.11
|
|
9979
9979
|
Source files: node_modules/@bendyline/squisq-video/THIRD_PARTY_LICENSES.txt
|
|
9980
9980
|
==============================================================================
|
|
9981
9981
|
THIRD-PARTY LICENSES FOR @bendyline/squisq-video
|
|
@@ -9987,7 +9987,7 @@ repository license, the pinned upstream copy is vendored and identified below.
|
|
|
9987
9987
|
COMPONENTS
|
|
9988
9988
|
|
|
9989
9989
|
==============================================================================
|
|
9990
|
-
Components: @bendyline/squisq@2.
|
|
9990
|
+
Components: @bendyline/squisq@2.7.0
|
|
9991
9991
|
Source files: node_modules/@bendyline/squisq/NOTICE.md
|
|
9992
9992
|
==============================================================================
|
|
9993
9993
|
# Third-Party Notices for @bendyline/squisq
|
|
@@ -10018,7 +10018,7 @@ third-party license texts for bundled code and data are shipped in
|
|
|
10018
10018
|
THIRD_PARTY_LICENSES.txt.
|
|
10019
10019
|
|
|
10020
10020
|
==============================================================================
|
|
10021
|
-
Components: @bendyline/squisq@2.
|
|
10021
|
+
Components: @bendyline/squisq@2.7.0
|
|
10022
10022
|
Source files: node_modules/@bendyline/squisq/THIRD_PARTY_LICENSES.txt
|
|
10023
10023
|
==============================================================================
|
|
10024
10024
|
THIRD-PARTY LICENSES FOR @bendyline/squisq
|
package/dist/bin.js
CHANGED
|
@@ -1398,6 +1398,13 @@ function warningDiagnostic(message, stage, format = null) {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
function classifyWarning(message, format) {
|
|
1400
1400
|
const normalized = message.toLowerCase();
|
|
1401
|
+
if (normalized.includes("redundant thematic break")) {
|
|
1402
|
+
return {
|
|
1403
|
+
code: "redundant-slide-separator",
|
|
1404
|
+
count: warningCount(message, /removed\s+(\d+)\s+redundant thematic break/iu),
|
|
1405
|
+
remediation: "Remove --- between slide headings because heading-based slide breaks already create the boundaries. Keep --- only for an intentional visible horizontal rule within a slide."
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1401
1408
|
if (normalized.includes("unsupported markdown node")) {
|
|
1402
1409
|
return {
|
|
1403
1410
|
code: "unsupported-markdown-node",
|
|
@@ -3217,7 +3224,16 @@ Placeholder`).join("\n\n");
|
|
|
3217
3224
|
const converted = await convert(
|
|
3218
3225
|
{ kind: "markdown", markdown: scaffold, baseName: "rendered" },
|
|
3219
3226
|
"pptx",
|
|
3220
|
-
{
|
|
3227
|
+
{
|
|
3228
|
+
...title === void 0 ? {} : { title },
|
|
3229
|
+
signal,
|
|
3230
|
+
// The scaffold is a throwaway 1:1 frame->slide vehicle whose slides are
|
|
3231
|
+
// all overwritten below with captured images. Squisq's cover slide is on
|
|
3232
|
+
// by default; here it would prepend a slide built from the placeholder
|
|
3233
|
+
// text, shifting every frame by one and leaving the last scaffold slide
|
|
3234
|
+
// un-overwritten as a visible "Rendered slide N / Placeholder" page.
|
|
3235
|
+
formatOptions: { pptx: { includeCoverSlide: false } }
|
|
3236
|
+
}
|
|
3221
3237
|
);
|
|
3222
3238
|
throwIfAborted5(signal);
|
|
3223
3239
|
const archive = await JSZip.loadAsync(converted.bytes);
|
|
@@ -4037,6 +4053,17 @@ var init_progress = __esm({
|
|
|
4037
4053
|
}
|
|
4038
4054
|
});
|
|
4039
4055
|
|
|
4056
|
+
// src/mcp/style-guidance.ts
|
|
4057
|
+
var STYLE_SELECTION_GUIDANCE, TRANSFORM_SELECTION_GUIDANCE, MOTION_SELECTION_GUIDANCE;
|
|
4058
|
+
var init_style_guidance = __esm({
|
|
4059
|
+
"src/mcp/style-guidance.ts"() {
|
|
4060
|
+
"use strict";
|
|
4061
|
+
STYLE_SELECTION_GUIDANCE = 'Choose theme and Squisq Summarize/transform style automatically from the user brief, audience, tone, content shape, brand constraints, and accessibility needs. Do not present raw theme/transform ids to the user or ask separate theme, summarization, animation, and template questions. If the choice is materially ambiguous and interactive clarification is available, ask one concise high-level preference question with at most four semantic directions plus a "choose for me" option; otherwise use safe defaults and proceed.';
|
|
4062
|
+
TRANSFORM_SELECTION_GUIDANCE = "Treat transformId as the Squisq Summarize control: it can change content emphasis, density, pacing, and structure. For an existing source whose exact language or coverage matters, leave transformId unset unless the user requests or permits summarization or visual restructuring. When transformId is selected and the user did not request an exact theme, omit themeId so Squisq can apply that transform style's preferred compatible theme.";
|
|
4063
|
+
MOTION_SELECTION_GUIDANCE = "Treat motion as a high-level none, subtle, or dynamic preference instead of listing individual transitions. Themes provide motion defaults; use animationsEnabled only to honor an explicit MP4 or GIF motion preference.";
|
|
4064
|
+
}
|
|
4065
|
+
});
|
|
4066
|
+
|
|
4040
4067
|
// src/mcp/agentic-tools.ts
|
|
4041
4068
|
import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4042
4069
|
import { z } from "zod";
|
|
@@ -4099,12 +4126,16 @@ function registerAgenticTools(server, context) {
|
|
|
4099
4126
|
server.registerTool(
|
|
4100
4127
|
"convert_document",
|
|
4101
4128
|
{
|
|
4102
|
-
description: "Convert plain text, Markdown, bundles, or linked-registry inputs directly into one or more immutable artifacts. Plain Markdown needs no preflight or annotations; valid Squisq annotations are optional layout hints. Use save_artifact only for durable filesystem output.",
|
|
4129
|
+
description: "Convert plain text, Markdown, bundles, or linked-registry inputs directly into one or more immutable artifacts. Plain Markdown needs no preflight or annotations; valid Squisq annotations are optional layout hints. For PPTX, heading-based slide boundaries do not need --- separators. Use save_artifact only for durable filesystem output.",
|
|
4103
4130
|
inputSchema: z.object({
|
|
4104
4131
|
source: documentSourceSchema,
|
|
4105
4132
|
targets: z.array(conversionTargetSchema).min(1).max(12),
|
|
4106
|
-
themeId: identifierSchema.optional()
|
|
4107
|
-
|
|
4133
|
+
themeId: identifierSchema.optional().describe(
|
|
4134
|
+
"Exact Squisq theme id. Infer it from the brief when the visual direction is clear. If transformId is set and no exact theme was requested, omit themeId so the transform can apply its preferred compatible theme."
|
|
4135
|
+
),
|
|
4136
|
+
transformId: identifierSchema.optional().describe(
|
|
4137
|
+
"Optional Squisq Summarize style id. It can change content emphasis, density, pacing, and structure; leave it unset for source-preserving work unless summarization or visual restructuring is requested or permitted."
|
|
4138
|
+
),
|
|
4108
4139
|
autoTemplates: z.boolean().optional().describe(
|
|
4109
4140
|
"Enable content-aware automatic template selection. Defaults to true; explicit annotations still take precedence."
|
|
4110
4141
|
),
|
|
@@ -4135,8 +4166,10 @@ function registerAgenticTools(server, context) {
|
|
|
4135
4166
|
);
|
|
4136
4167
|
for (const result of results) requireWire(parseConversionResult2(result), "conversion");
|
|
4137
4168
|
const payload = { results };
|
|
4169
|
+
const warningSummary = conversionWarningSummary(results);
|
|
4138
4170
|
return {
|
|
4139
4171
|
content: [
|
|
4172
|
+
...warningSummary ? [{ type: "text", text: warningSummary }] : [],
|
|
4140
4173
|
{ type: "text", text: JSON.stringify(payload) },
|
|
4141
4174
|
...results.map((result) => artifactLink(result.artifact))
|
|
4142
4175
|
],
|
|
@@ -4410,11 +4443,14 @@ function registerAuthoringGuideResource(server) {
|
|
|
4410
4443
|
import("@bendyline/squisq/transform")
|
|
4411
4444
|
]);
|
|
4412
4445
|
const guide = {
|
|
4413
|
-
version:
|
|
4446
|
+
version: 10,
|
|
4414
4447
|
workflow: [
|
|
4415
4448
|
"plain text and ordinary Markdown can be passed directly to convert_document without a preflight or template annotations",
|
|
4416
|
-
"for deliberate PPTX slide boundaries, use one level-one Markdown heading per slide;
|
|
4449
|
+
"for deliberate PPTX slide boundaries, use one level-one Markdown heading per slide; headings alone create the boundaries, so do not add --- between them unless a visible horizontal rule is intended",
|
|
4417
4450
|
"convert_document chooses compatible templates automatically; Squisq annotations on headings are optional layout hints that take precedence",
|
|
4451
|
+
STYLE_SELECTION_GUIDANCE,
|
|
4452
|
+
TRANSFORM_SELECTION_GUIDANCE,
|
|
4453
|
+
MOTION_SELECTION_GUIDANCE,
|
|
4418
4454
|
"use a bundle source when assets must travel with the document, or create_document_bundle when one draft will be reused by two or more inspect, preview, or convert calls",
|
|
4419
4455
|
"use inspect_document or preview_document only when the user asks for document analysis or visual evidence",
|
|
4420
4456
|
"convert_document creates immutable artifacts; save_artifact only when a durable file is required"
|
|
@@ -4458,7 +4494,7 @@ function registerTemplateTools(server, context) {
|
|
|
4458
4494
|
server.registerTool(
|
|
4459
4495
|
"get_authoring_context",
|
|
4460
4496
|
{
|
|
4461
|
-
description: "Optionally discover target capabilities, safe defaults, themes
|
|
4497
|
+
description: "Optionally discover target capabilities, safe defaults, semantically described themes and Squisq Summarize styles, and exact starter annotation examples. Use these descriptions to choose for the user rather than presenting raw ids. Plain Markdown can be converted without calling this tool.",
|
|
4462
4498
|
inputSchema: z.object({
|
|
4463
4499
|
targetFormat: formatInputSchema.optional(),
|
|
4464
4500
|
goal: z.enum(["content-first", "visual-polish"]).optional(),
|
|
@@ -4532,7 +4568,10 @@ function registerTemplateTools(server, context) {
|
|
|
4532
4568
|
defaultFidelity: authoringDefaultFidelity(normalizedTarget),
|
|
4533
4569
|
workflow: [
|
|
4534
4570
|
"For durable local output, call list_roots before drafting. If no returned root is write-enabled, stop and explain that the MCP server must restart with --allow-write; do not fall back to a shell or CLI converter. A transient artifact is acceptable only when the user did not require a file.",
|
|
4535
|
-
normalizedTarget === "pptx" ? "Plain text and ordinary Markdown convert directly. Use one level-one Markdown heading (#) for each deliberate slide boundary; unstructured text is still accepted." : "Plain text and ordinary Markdown convert directly without a preflight.",
|
|
4571
|
+
normalizedTarget === "pptx" ? "Plain text and ordinary Markdown convert directly. Use one level-one Markdown heading (#) for each deliberate slide boundary. Headings alone create the boundaries, so do not add --- between them unless a visible horizontal rule is intended; unstructured text is still accepted." : "Plain text and ordinary Markdown convert directly without a preflight.",
|
|
4572
|
+
STYLE_SELECTION_GUIDANCE,
|
|
4573
|
+
TRANSFORM_SELECTION_GUIDANCE,
|
|
4574
|
+
...normalizedTarget === "pptx" || normalizedTarget === "html" || normalizedTarget === "htmlzip" || normalizedTarget === "mp4" || normalizedTarget === "gif" ? [MOTION_SELECTION_GUIDANCE] : [],
|
|
4536
4575
|
"convert_document chooses compatible templates automatically. Annotations on headings are optional layout hints that take precedence; use the returned exact starter examples when useful.",
|
|
4537
4576
|
annotationHandling === "ignored" ? "This target flattens template annotations to semantic content, so annotations are unnecessary for the exported file." : "Explicit valid annotations override automatic layout choices; invalid or unnecessary annotations should be omitted rather than repaired through a separate workflow.",
|
|
4538
4577
|
"Pass Markdown directly to convert_document. Use a bundle source for assets, or create_document_bundle only when one draft will be reused by two or more inspect, preview, or convert calls.",
|
|
@@ -4982,6 +5021,29 @@ function artifactLink(artifact) {
|
|
|
4982
5021
|
size: artifact.size
|
|
4983
5022
|
};
|
|
4984
5023
|
}
|
|
5024
|
+
function conversionWarningSummary(results) {
|
|
5025
|
+
const warnings = results.flatMap(
|
|
5026
|
+
(result) => result.diagnostics.filter((diagnostic) => diagnostic.severity === "warning").map((diagnostic) => ({ format: result.targetFormat, diagnostic }))
|
|
5027
|
+
);
|
|
5028
|
+
if (warnings.length === 0) return null;
|
|
5029
|
+
const totalOccurrences = warnings.reduce((total, { diagnostic }) => total + diagnostic.count, 0);
|
|
5030
|
+
const visible = warnings.slice(0, 10);
|
|
5031
|
+
const lines = [
|
|
5032
|
+
`Conversion warnings: ${totalOccurrences} occurrence(s) across ${warnings.length} diagnostic(s).`,
|
|
5033
|
+
...visible.map(({ format, diagnostic }) => {
|
|
5034
|
+
const count = diagnostic.count > 1 ? ` x${diagnostic.count}` : "";
|
|
5035
|
+
const remediation = diagnostic.remediation ? ` Remediation: ${diagnostic.remediation}` : "";
|
|
5036
|
+
return `- [${diagnostic.code}] ${format}${count}: ${diagnostic.message}${remediation}`;
|
|
5037
|
+
})
|
|
5038
|
+
];
|
|
5039
|
+
if (visible.length < warnings.length) {
|
|
5040
|
+
lines.push(
|
|
5041
|
+
`- ${warnings.length - visible.length} additional diagnostic(s) remain in structuredContent.`
|
|
5042
|
+
);
|
|
5043
|
+
}
|
|
5044
|
+
lines.push("The complete JSON result follows in the next text content item.");
|
|
5045
|
+
return lines.join("\n");
|
|
5046
|
+
}
|
|
4985
5047
|
async function sendProgress(extra, progress, total, message) {
|
|
4986
5048
|
await reportMcpProgress(extra, progress, total, message);
|
|
4987
5049
|
}
|
|
@@ -5028,8 +5090,16 @@ function compactAuthoringContextText(context) {
|
|
|
5028
5090
|
`Warning: ${context.syntax.standaloneWarning}`,
|
|
5029
5091
|
`Templates (${context.templates.length}): ${context.templates.map(({ id }) => id).join(", ")}`,
|
|
5030
5092
|
...context.templates.filter(({ id }) => id !== "content").map(({ annotationExample }) => `Optional example: ${annotationExample}`),
|
|
5031
|
-
|
|
5032
|
-
`
|
|
5093
|
+
"",
|
|
5094
|
+
`Theme choices with descriptions (${context.themes.length}):`,
|
|
5095
|
+
...context.themes.map(
|
|
5096
|
+
({ id, name, description }) => `- ${id} (${name}): ${description ?? "No additional description."}`
|
|
5097
|
+
),
|
|
5098
|
+
"",
|
|
5099
|
+
`Squisq Summarize choices for transformId (${context.transformStyles.length}):`,
|
|
5100
|
+
...context.transformStyles.map(
|
|
5101
|
+
({ id, name, description }) => `- ${id} (${name}): ${description}`
|
|
5102
|
+
)
|
|
5033
5103
|
];
|
|
5034
5104
|
if (context.recommendations.length > 0) {
|
|
5035
5105
|
lines.push(
|
|
@@ -5152,6 +5222,7 @@ var init_agentic_tools = __esm({
|
|
|
5152
5222
|
init_error_result();
|
|
5153
5223
|
init_progress();
|
|
5154
5224
|
init_output_bounds();
|
|
5225
|
+
init_style_guidance();
|
|
5155
5226
|
READ_ONLY = {
|
|
5156
5227
|
readOnlyHint: true,
|
|
5157
5228
|
destructiveHint: false,
|
|
@@ -5207,7 +5278,9 @@ var init_agentic_tools = __esm({
|
|
|
5207
5278
|
format: z.literal("pptx"),
|
|
5208
5279
|
fidelity: fidelitySchemas.pptx.optional(),
|
|
5209
5280
|
...metadataFields,
|
|
5210
|
-
slideBreak: z.enum(["h1", "h2", "heading"]).optional()
|
|
5281
|
+
slideBreak: z.enum(["h1", "h2", "heading"]).optional().describe(
|
|
5282
|
+
"Heading depths that start slides. Headings alone create slide boundaries; do not add --- between them unless a visible horizontal rule is intended."
|
|
5283
|
+
),
|
|
5211
5284
|
defaultFont: z.string().max(256).optional(),
|
|
5212
5285
|
defaultFontSize: z.number().min(6).max(96).optional(),
|
|
5213
5286
|
width: z.number().int().min(160).max(1920).optional(),
|
|
@@ -5257,7 +5330,9 @@ var init_agentic_tools = __esm({
|
|
|
5257
5330
|
height: z.number().int().min(16).max(3840).optional(),
|
|
5258
5331
|
captionStyle: z.enum(["standard", "social"]).optional(),
|
|
5259
5332
|
coverPreRoll: z.number().min(0).max(60).optional(),
|
|
5260
|
-
animationsEnabled: z.boolean().optional()
|
|
5333
|
+
animationsEnabled: z.boolean().optional().describe(
|
|
5334
|
+
"Explicit rendered-media motion switch. Use it only to honor a user preference such as no motion or dynamic motion; otherwise rely on the theme/target default. It does not select an individual transition."
|
|
5335
|
+
)
|
|
5261
5336
|
}).strict(),
|
|
5262
5337
|
z.object({
|
|
5263
5338
|
format: z.literal("gif"),
|
|
@@ -5268,7 +5343,9 @@ var init_agentic_tools = __esm({
|
|
|
5268
5343
|
height: z.number().int().min(16).max(1920).optional(),
|
|
5269
5344
|
captionStyle: z.enum(["standard", "social"]).optional(),
|
|
5270
5345
|
coverPreRoll: z.number().min(0).max(60).optional(),
|
|
5271
|
-
animationsEnabled: z.boolean().optional()
|
|
5346
|
+
animationsEnabled: z.boolean().optional().describe(
|
|
5347
|
+
"Explicit rendered-media motion switch. Use it only to honor a user preference such as no motion or dynamic motion; otherwise rely on the theme/target default. It does not select an individual transition."
|
|
5348
|
+
),
|
|
5272
5349
|
loop: z.number().int().min(-1).max(65535).optional(),
|
|
5273
5350
|
maxColors: z.number().int().min(2).max(256).optional(),
|
|
5274
5351
|
dither: z.enum(["none", "bayer", "heckbert", "floyd_steinberg", "sierra2", "sierra2_4a"]).optional(),
|
|
@@ -5416,14 +5493,18 @@ import { completable } from "@modelcontextprotocol/sdk/server/completable.js";
|
|
|
5416
5493
|
import { z as z3 } from "zod";
|
|
5417
5494
|
function registerAuthoringPrompts(server) {
|
|
5418
5495
|
const style = completable(
|
|
5419
|
-
z3.string().max(MAX_ID_CHARACTERS).optional().describe(
|
|
5496
|
+
z3.string().max(MAX_ID_CHARACTERS).optional().describe(
|
|
5497
|
+
"Optional exact Squisq Summarize/transform style id. Usually let the model infer this from the brief."
|
|
5498
|
+
),
|
|
5420
5499
|
async (prefix) => {
|
|
5421
5500
|
const { getTransformStyleIds } = await import("@bendyline/squisq/transform");
|
|
5422
5501
|
return complete(getTransformStyleIds(), prefix);
|
|
5423
5502
|
}
|
|
5424
5503
|
);
|
|
5425
5504
|
const theme = completable(
|
|
5426
|
-
z3.string().max(MAX_ID_CHARACTERS).optional().describe(
|
|
5505
|
+
z3.string().max(MAX_ID_CHARACTERS).optional().describe(
|
|
5506
|
+
"Optional exact Squisq theme id. Usually let the model infer this from the brief or the selected transform."
|
|
5507
|
+
),
|
|
5427
5508
|
async (prefix) => {
|
|
5428
5509
|
const { getAvailableThemes } = await import("@bendyline/squisq/schemas");
|
|
5429
5510
|
return complete(getAvailableThemes(), prefix);
|
|
@@ -5516,13 +5597,15 @@ function presentationPrompt(topic, style, theme, template) {
|
|
|
5516
5597
|
const templateHint = template ? ` Use the requested \`${template}\` annotation where appropriate.` : "";
|
|
5517
5598
|
const themeHint = theme ? ` with themeId \`${theme}\`` : "";
|
|
5518
5599
|
const styleHint = style ? ` and transformId \`${style}\`` : "";
|
|
5600
|
+
const selectionHint = style || theme ? `Honor the caller-supplied ${style ? `transform style \`${style}\`` : ""}${style && theme ? " and " : ""}${theme ? `theme \`${theme}\`` : ""}; do not ask for another style choice.${style && !theme ? " Because no exact theme was requested, omit themeId so Squisq can apply the transform style's preferred compatible theme." : ""}` : `${STYLE_SELECTION_GUIDANCE} ${TRANSFORM_SELECTION_GUIDANCE}`;
|
|
5519
5601
|
return `Create a presentation about: ${topic}
|
|
5520
5602
|
|
|
5521
5603
|
1. For durable output, call list_roots before drafting. If no returned root is write-enabled, stop and explain that the MCP server must restart with --allow-write; do not use a shell or CLI converter.
|
|
5522
|
-
2.
|
|
5523
|
-
3.
|
|
5524
|
-
4. Use
|
|
5525
|
-
5.
|
|
5604
|
+
2. ${selectionHint} ${MOTION_SELECTION_GUIDANCE} Call get_authoring_context only when the linked theme and Summarize descriptions would materially improve the choice.
|
|
5605
|
+
3. Author plain Markdown. One level-one heading (\`#\`) creates each deliberate slide boundary; headings alone create the boundaries, so do not add \`---\` between them unless a visible horizontal rule is intended. Unstructured text is also accepted. Squisq annotations are optional layout hints.${templateHint}
|
|
5606
|
+
4. Pass the Markdown directly to convert_document with a pptx target${themeHint}${styleHint}. Use a bundle source only when assets must travel with the document. No validation, inspection, or preview is required.
|
|
5607
|
+
5. Use inspect_document or preview_document only when the user explicitly asks for document analysis or visual evidence.
|
|
5608
|
+
6. Call save_artifact only when a durable file is required.`;
|
|
5526
5609
|
}
|
|
5527
5610
|
function videoPrompt(topic, orientation, theme, template) {
|
|
5528
5611
|
const templateHint = template ? ` Use the requested \`${template}\` annotation where appropriate.` : "";
|
|
@@ -5555,6 +5638,7 @@ var MAX_ID_CHARACTERS, MAX_TOPIC_CHARACTERS;
|
|
|
5555
5638
|
var init_prompts = __esm({
|
|
5556
5639
|
"src/mcp/prompts.ts"() {
|
|
5557
5640
|
"use strict";
|
|
5641
|
+
init_style_guidance();
|
|
5558
5642
|
MAX_ID_CHARACTERS = 256;
|
|
5559
5643
|
MAX_TOPIC_CHARACTERS = 1e4;
|
|
5560
5644
|
}
|
|
@@ -5589,8 +5673,11 @@ function createMcpServer(options = {}) {
|
|
|
5589
5673
|
{
|
|
5590
5674
|
instructions: [
|
|
5591
5675
|
"For durable local output, call list_roots before drafting and use a returned write-enabled root id exactly as given. If none is writable, stop and explain that the server must restart with --allow-write; do not fall back to a shell or CLI converter.",
|
|
5592
|
-
"Pass plain text or ordinary Markdown directly to convert_document; no preflight, inspection, preview, or template annotation is required. For deliberate PPTX slide boundaries, use one level-one heading per slide;
|
|
5676
|
+
"Pass plain text or ordinary Markdown directly to convert_document; no preflight, inspection, preview, or template annotation is required. For deliberate PPTX slide boundaries, use one level-one heading per slide. Headings alone create slide boundaries; do not add --- between them unless a visible horizontal rule is intended.",
|
|
5593
5677
|
"convert_document chooses compatible templates automatically. Squisq annotations on headings are optional layout hints that take precedence. Call get_authoring_context only when exact starter examples, themes, transforms, or target details are useful; read the full authoring-guide or call describe_template only for advanced author control.",
|
|
5678
|
+
STYLE_SELECTION_GUIDANCE,
|
|
5679
|
+
TRANSFORM_SELECTION_GUIDANCE,
|
|
5680
|
+
MOTION_SELECTION_GUIDANCE,
|
|
5594
5681
|
"Use a bundle source when assets must travel with the document. Use create_document_bundle only when one complete draft will be reused by two or more inspect, preview, or convert calls.",
|
|
5595
5682
|
"Use inspect_document or preview_document only when the user asks for document analysis or visual evidence.",
|
|
5596
5683
|
"convert_document returns immutable artifacts and diagnostics. Save only final durable output with save_artifact; never invent root ids or switch conversion to a shell or CLI."
|
|
@@ -5662,6 +5749,7 @@ var init_server = __esm({
|
|
|
5662
5749
|
init_authority();
|
|
5663
5750
|
init_discovery_tools();
|
|
5664
5751
|
init_prompts();
|
|
5752
|
+
init_style_guidance();
|
|
5665
5753
|
DEFAULT_MAX_CONCURRENT_OPERATIONS = 2;
|
|
5666
5754
|
DEFAULT_OPERATION_TIMEOUT_MS = 2 * 60 * 1e3;
|
|
5667
5755
|
DEFAULT_SHUTDOWN_DRAIN_TIMEOUT_MS = 5e3;
|
|
@@ -5877,7 +5965,8 @@ async function renderMarkdownHtml(markdown, options) {
|
|
|
5877
5965
|
images,
|
|
5878
5966
|
title: options.title,
|
|
5879
5967
|
mode: options.mode ?? "static",
|
|
5880
|
-
themeId: options.themeId
|
|
5968
|
+
themeId: options.themeId,
|
|
5969
|
+
showCodeCopyButton: true
|
|
5881
5970
|
});
|
|
5882
5971
|
}
|
|
5883
5972
|
async function readReferencedImages(doc, sourcePath, assetRoot, maxAssetBytes, allowReferencedAsset, warn) {
|
package/dist/index.js
CHANGED
|
@@ -138,7 +138,8 @@ async function renderMarkdownHtml(markdown, options) {
|
|
|
138
138
|
images,
|
|
139
139
|
title: options.title,
|
|
140
140
|
mode: options.mode ?? "static",
|
|
141
|
-
themeId: options.themeId
|
|
141
|
+
themeId: options.themeId,
|
|
142
|
+
showCodeCopyButton: true
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
145
|
async function readReferencedImages(doc, sourcePath, assetRoot, maxAssetBytes, allowReferencedAsset, warn) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/docblocks-cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"description": "Build, preview, convert, render, inspect, and automate documents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"typecheck": "tsc --noEmit"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@bendyline/docblocks": "2.3.
|
|
51
|
-
"@bendyline/squisq": "2.
|
|
52
|
-
"@bendyline/squisq-cli": "2.5.
|
|
53
|
-
"@bendyline/squisq-formats": "2.
|
|
54
|
-
"@bendyline/squisq-react": "2.
|
|
55
|
-
"@bendyline/squisq-video": "2.2.
|
|
50
|
+
"@bendyline/docblocks": "2.3.4",
|
|
51
|
+
"@bendyline/squisq": "2.7.1",
|
|
52
|
+
"@bendyline/squisq-cli": "2.5.3",
|
|
53
|
+
"@bendyline/squisq-formats": "2.4.2",
|
|
54
|
+
"@bendyline/squisq-react": "2.7.1",
|
|
55
|
+
"@bendyline/squisq-video": "2.2.12",
|
|
56
56
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
57
57
|
"commander": "13.1.0",
|
|
58
58
|
"jszip": "3.10.1",
|