@bendyline/docblocks 2.1.0 → 2.1.2
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 +2 -2
- package/dist/{chunk-WJKYY5QR.js → chunk-4437YWLE.js} +5 -6
- package/dist/{chunk-XUML3MKV.js → chunk-45T5AFCN.js} +5 -6
- package/dist/{chunk-COYQXQK3.js → chunk-6L3JRDE7.js} +4 -5
- package/dist/{chunk-BNKV7MTO.js → chunk-6XHOOBYF.js} +0 -1
- package/dist/{chunk-U722UUFN.js → chunk-73OOROXH.js} +0 -1
- package/dist/{chunk-JS6XFWQK.js → chunk-AYWKIZLD.js} +0 -1
- package/dist/{chunk-VTCSF7VS.js → chunk-BVY7GGNV.js} +4 -5
- package/dist/{chunk-B56KWCSE.js → chunk-DOV5VRTD.js} +61 -10
- package/dist/{chunk-AEHCVWU5.js → chunk-DZB666V7.js} +0 -1
- package/dist/{chunk-GM5YXU4L.js → chunk-KQ6756AJ.js} +1 -2
- package/dist/{chunk-BXMF5YQJ.js → chunk-LMMOFRGQ.js} +0 -1
- package/dist/{chunk-FNW556FN.js → chunk-M2PUNKHS.js} +0 -1
- package/dist/{chunk-FA7UNOXK.js → chunk-M5ZNQGR5.js} +1 -2
- package/dist/{chunk-P4WATND4.js → chunk-M62ZGJ5I.js} +0 -1
- package/dist/{chunk-RVPGQBWR.js → chunk-OQCPBOQA.js} +0 -1
- package/dist/{chunk-MNSZ7EZN.js → chunk-QI6YKTQV.js} +2 -3
- package/dist/{chunk-P3DVZQ6S.js → chunk-SJBB5OD7.js} +2 -3
- package/dist/{chunk-EZKJZUNJ.js → chunk-XAMILHQP.js} +0 -1
- package/dist/{chunk-6IYMTYMQ.js → chunk-YM7O3PWO.js} +7 -8
- package/dist/{chunk-DN7A33LL.js → chunk-ZO7G53QP.js} +4 -5
- package/dist/document/index.js +5 -6
- package/dist/filesystem/electron.js +6 -7
- package/dist/filesystem/index.js +16 -17
- package/dist/filesystem/indexeddb.js +8 -9
- package/dist/filesystem/memory.js +5 -6
- package/dist/filesystem/native.js +6 -7
- package/dist/host/index.js +2 -3
- package/dist/index.js +19 -20
- package/dist/mcp/index.d.ts +6 -3
- package/dist/mcp/index.js +4 -3
- package/dist/mcp/zod.d.ts +1859 -648
- package/dist/mcp/zod.js +78 -7
- package/dist/share/index.js +1 -2
- package/dist/{types-CX893hgH.d.ts → types-B7BBB5az.d.ts} +63 -2
- package/dist/vscode/index.d.ts +5 -0
- package/dist/vscode/index.js +11 -5
- package/dist/workspace/index.js +3 -4
- package/package.json +3 -2
- package/dist/chunk-6IYMTYMQ.js.map +0 -1
- package/dist/chunk-AEHCVWU5.js.map +0 -1
- package/dist/chunk-B56KWCSE.js.map +0 -1
- package/dist/chunk-BNKV7MTO.js.map +0 -1
- package/dist/chunk-BXMF5YQJ.js.map +0 -1
- package/dist/chunk-COYQXQK3.js.map +0 -1
- package/dist/chunk-DN7A33LL.js.map +0 -1
- package/dist/chunk-EZKJZUNJ.js.map +0 -1
- package/dist/chunk-FA7UNOXK.js.map +0 -1
- package/dist/chunk-FNW556FN.js.map +0 -1
- package/dist/chunk-GM5YXU4L.js.map +0 -1
- package/dist/chunk-JS6XFWQK.js.map +0 -1
- package/dist/chunk-MNSZ7EZN.js.map +0 -1
- package/dist/chunk-P3DVZQ6S.js.map +0 -1
- package/dist/chunk-P4WATND4.js.map +0 -1
- package/dist/chunk-RVPGQBWR.js.map +0 -1
- package/dist/chunk-U722UUFN.js.map +0 -1
- package/dist/chunk-VTCSF7VS.js.map +0 -1
- package/dist/chunk-WJKYY5QR.js.map +0 -1
- package/dist/chunk-XUML3MKV.js.map +0 -1
- package/dist/document/index.js.map +0 -1
- package/dist/filesystem/electron.js.map +0 -1
- package/dist/filesystem/index.js.map +0 -1
- package/dist/filesystem/indexeddb.js.map +0 -1
- package/dist/filesystem/memory.js.map +0 -1
- package/dist/filesystem/native.js.map +0 -1
- package/dist/host/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/zod.js.map +0 -1
- package/dist/share/index.js.map +0 -1
- package/dist/vscode/index.js.map +0 -1
- package/dist/workspace/index.js.map +0 -1
package/dist/mcp/zod.js
CHANGED
|
@@ -3,11 +3,12 @@ import {
|
|
|
3
3
|
parseArtifactRef,
|
|
4
4
|
parseComparisonResult,
|
|
5
5
|
parseConversionResult,
|
|
6
|
+
parseDocumentRevisionResult,
|
|
6
7
|
parseInspectionResult,
|
|
7
8
|
parsePreviewResult,
|
|
8
9
|
parseValidationResult
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-DOV5VRTD.js";
|
|
11
|
+
import "../chunk-AYWKIZLD.js";
|
|
11
12
|
|
|
12
13
|
// src/mcp/zod.ts
|
|
13
14
|
import { z } from "zod";
|
|
@@ -69,19 +70,19 @@ var bundleDocumentSourceSchema = z.object({
|
|
|
69
70
|
kind: z.literal("bundle"),
|
|
70
71
|
markdown: z.string().max(MAX_MARKDOWN_CHARACTERS).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire"),
|
|
71
72
|
assets: z.array(bundleAssetSchema).max(MCP_WIRE_LIMITS.bundleAssets),
|
|
72
|
-
name: labelSchema.nullable()
|
|
73
|
+
name: labelSchema.nullable().optional().default(null)
|
|
73
74
|
}).strict();
|
|
74
75
|
var documentSourceSchema = z.discriminatedUnion("kind", [
|
|
75
76
|
z.object({
|
|
76
77
|
kind: z.literal("markdown"),
|
|
77
78
|
markdown: z.string().max(MAX_MARKDOWN_CHARACTERS).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire"),
|
|
78
|
-
name: labelSchema.nullable()
|
|
79
|
+
name: labelSchema.nullable().optional().default(null)
|
|
79
80
|
}).strict(),
|
|
80
81
|
z.object({
|
|
81
82
|
kind: z.literal("file"),
|
|
82
83
|
rootId: idSchema,
|
|
83
84
|
path: workspacePathSchema,
|
|
84
|
-
format: formatSchema.nullable()
|
|
85
|
+
format: formatSchema.nullable().optional().default(null)
|
|
85
86
|
}).strict(),
|
|
86
87
|
z.object({ kind: z.literal("artifact"), uri: artifactUriSchema }).strict(),
|
|
87
88
|
bundleDocumentSourceSchema
|
|
@@ -388,6 +389,30 @@ var comparisonResultSchema = z.object({
|
|
|
388
389
|
}).strict().superRefine((value, context) => addExactWireIssue(parseComparisonResult(value), context));
|
|
389
390
|
var boundedPathTextSchema = z.string().min(1).max(MCP_WIRE_LIMITS.pathCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire");
|
|
390
391
|
var sha256Schema = z.string().regex(/^[a-f0-9]{64}$/u);
|
|
392
|
+
var replaceBlockRevisionSchema = z.object({
|
|
393
|
+
kind: z.literal("replace_block"),
|
|
394
|
+
blockId: idSchema,
|
|
395
|
+
markdown: z.string().min(1).max(MCP_WIRE_LIMITS.revisionFragmentCharacters).regex(WIRE_STRING_PATTERN, "NUL and DEL are not permitted on the MCP wire")
|
|
396
|
+
}).strict();
|
|
397
|
+
var documentRevisionRequestSchema = z.object({
|
|
398
|
+
artifactUri: artifactUriSchema,
|
|
399
|
+
expectedSha256: sha256Schema,
|
|
400
|
+
edits: z.array(replaceBlockRevisionSchema).min(1).max(MCP_WIRE_LIMITS.revisionEdits)
|
|
401
|
+
}).strict();
|
|
402
|
+
var appliedBlockRevisionSchema = z.object({
|
|
403
|
+
kind: z.literal("replace_block"),
|
|
404
|
+
blockId: idSchema,
|
|
405
|
+
beforeSha256: sha256Schema,
|
|
406
|
+
afterSha256: sha256Schema
|
|
407
|
+
}).strict();
|
|
408
|
+
var documentRevisionResultSchema = z.object({
|
|
409
|
+
version: z.literal(1),
|
|
410
|
+
kind: z.literal("revision"),
|
|
411
|
+
parentArtifact: artifactRefSchema,
|
|
412
|
+
artifact: artifactRefSchema,
|
|
413
|
+
edits: z.array(appliedBlockRevisionSchema).min(1).max(MCP_WIRE_LIMITS.revisionEdits),
|
|
414
|
+
diagnostics: z.array(diagnosticSchema).max(MCP_WIRE_LIMITS.arrayEntries)
|
|
415
|
+
}).strict().superRefine((value, context) => addExactWireIssue(parseDocumentRevisionResult(value), context));
|
|
391
416
|
var convertDocumentResultSchema = z.object({ results: z.array(conversionResultSchema).min(1).max(12) }).strict();
|
|
392
417
|
var rootGrantSummarySchema = z.object({
|
|
393
418
|
id: idSchema,
|
|
@@ -441,6 +466,25 @@ var describeTemplateResultSchema = z.object({
|
|
|
441
466
|
template: templateSummarySchema.extend({ inputs: z.array(templateInputSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries) }).strict(),
|
|
442
467
|
annotationExample: boundedString
|
|
443
468
|
}).strict();
|
|
469
|
+
var authoringTemplateSummarySchema = templateSummarySchema.extend({
|
|
470
|
+
inputs: z.array(templateInputSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
|
|
471
|
+
role: z.enum([
|
|
472
|
+
"opener",
|
|
473
|
+
"divider",
|
|
474
|
+
"content",
|
|
475
|
+
"highlight",
|
|
476
|
+
"quote",
|
|
477
|
+
"comparison",
|
|
478
|
+
"event",
|
|
479
|
+
"media",
|
|
480
|
+
"data",
|
|
481
|
+
"spatial"
|
|
482
|
+
]),
|
|
483
|
+
bodyPolicy: z.enum(["complete", "derived", "ignored", "structured"]),
|
|
484
|
+
safeForContentFirst: z.boolean(),
|
|
485
|
+
placement: z.literal("heading"),
|
|
486
|
+
annotationExample: boundedString
|
|
487
|
+
}).strict();
|
|
444
488
|
var templateContentProfileSchema = z.object({
|
|
445
489
|
hasImage: z.boolean(),
|
|
446
490
|
imageCount: nonNegativeSafeIntegerSchema,
|
|
@@ -466,6 +510,25 @@ var recommendTemplatesResultSchema = z.object({
|
|
|
466
510
|
totalBlocks: nonNegativeSafeIntegerSchema,
|
|
467
511
|
truncated: z.boolean()
|
|
468
512
|
}).strict();
|
|
513
|
+
var authoringContextResultSchema = z.object({
|
|
514
|
+
goal: z.enum(["content-first", "visual-polish"]),
|
|
515
|
+
targetFormat: formatSchema.nullable(),
|
|
516
|
+
defaultTemplateId: idSchema,
|
|
517
|
+
defaultFidelity: z.enum(["semantic", "editable-native", "rendered-fidelity", "hybrid"]).nullable(),
|
|
518
|
+
workflow: z.array(boundedString).max(32),
|
|
519
|
+
syntax: z.object({
|
|
520
|
+
headingAnnotation: boundedString,
|
|
521
|
+
standaloneAnnotation: boundedString,
|
|
522
|
+
standaloneWarning: boundedString
|
|
523
|
+
}).strict(),
|
|
524
|
+
formats: z.array(formatCapabilitySummarySchema).max(64),
|
|
525
|
+
templates: z.array(authoringTemplateSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
|
|
526
|
+
themes: z.array(themeCatalogEntrySchema).max(MCP_WIRE_LIMITS.arrayEntries),
|
|
527
|
+
transformStyles: z.array(transformStyleSummarySchema).max(MCP_WIRE_LIMITS.arrayEntries),
|
|
528
|
+
recommendations: z.array(templateRecommendationSchema).max(100),
|
|
529
|
+
totalBlocks: nonNegativeSafeIntegerSchema.nullable(),
|
|
530
|
+
truncated: z.boolean()
|
|
531
|
+
}).strict();
|
|
469
532
|
var themeDescriptionSchema = z.object({
|
|
470
533
|
id: idSchema,
|
|
471
534
|
name: nonEmptyLabelSchema,
|
|
@@ -514,11 +577,13 @@ var DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS = Object.freeze({
|
|
|
514
577
|
get_conversion_report: conversionResultSchema,
|
|
515
578
|
convert_document: convertDocumentResultSchema,
|
|
516
579
|
create_document_bundle: conversionResultSchema,
|
|
580
|
+
revise_document: documentRevisionResultSchema,
|
|
517
581
|
save_artifact: saveArtifactResultSchema,
|
|
518
582
|
inspect_document: inspectionResultSchema,
|
|
519
583
|
validate_document: validationResultSchema,
|
|
520
584
|
preview_document: previewResultSchema,
|
|
521
585
|
compare_documents: comparisonResultSchema,
|
|
586
|
+
get_authoring_context: authoringContextResultSchema,
|
|
522
587
|
list_templates: listTemplatesResultSchema,
|
|
523
588
|
describe_template: describeTemplateResultSchema,
|
|
524
589
|
recommend_templates: recommendTemplatesResultSchema,
|
|
@@ -537,11 +602,13 @@ var DOCBLOCKS_MCP_TOOL_OUTPUT_SCHEMAS = Object.freeze({
|
|
|
537
602
|
create_document_bundle: toolOutputSchema(
|
|
538
603
|
DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.create_document_bundle
|
|
539
604
|
),
|
|
605
|
+
revise_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.revise_document),
|
|
540
606
|
save_artifact: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.save_artifact),
|
|
541
607
|
inspect_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.inspect_document),
|
|
542
608
|
validate_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.validate_document),
|
|
543
609
|
preview_document: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.preview_document),
|
|
544
610
|
compare_documents: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.compare_documents),
|
|
611
|
+
get_authoring_context: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.get_authoring_context),
|
|
545
612
|
list_templates: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.list_templates),
|
|
546
613
|
describe_template: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.describe_template),
|
|
547
614
|
recommend_templates: toolOutputSchema(DOCBLOCKS_MCP_TOOL_RESULT_SCHEMAS.recommend_templates),
|
|
@@ -558,7 +625,7 @@ var materializationOptionsSchema = z.discriminatedUnion("ifExists", [
|
|
|
558
625
|
rootId: idSchema,
|
|
559
626
|
path: workspacePathSchema,
|
|
560
627
|
ifExists: z.literal("error"),
|
|
561
|
-
expectedSha256: z.null()
|
|
628
|
+
expectedSha256: z.null().optional().default(null)
|
|
562
629
|
}).strict(),
|
|
563
630
|
z.object({
|
|
564
631
|
rootId: idSchema,
|
|
@@ -681,6 +748,8 @@ export {
|
|
|
681
748
|
applyInferredThemeResultSchema,
|
|
682
749
|
artifactRefSchema,
|
|
683
750
|
artifactUriSchema,
|
|
751
|
+
authoringContextResultSchema,
|
|
752
|
+
authoringTemplateSummarySchema,
|
|
684
753
|
bundleAssetSchema,
|
|
685
754
|
bundleDocumentSourceSchema,
|
|
686
755
|
comparisonResultSchema,
|
|
@@ -689,6 +758,8 @@ export {
|
|
|
689
758
|
describeTemplateResultSchema,
|
|
690
759
|
describeThemeResultSchema,
|
|
691
760
|
diagnosticSchema,
|
|
761
|
+
documentRevisionRequestSchema,
|
|
762
|
+
documentRevisionResultSchema,
|
|
692
763
|
documentSourceSchema,
|
|
693
764
|
formatCapabilitySummarySchema,
|
|
694
765
|
formatDirectionCapabilitySchema,
|
|
@@ -709,6 +780,7 @@ export {
|
|
|
709
780
|
pptxLayoutSummarySchema,
|
|
710
781
|
previewResultSchema,
|
|
711
782
|
recommendTemplatesResultSchema,
|
|
783
|
+
replaceBlockRevisionSchema,
|
|
712
784
|
rootGrantSummarySchema,
|
|
713
785
|
saveArtifactResultSchema,
|
|
714
786
|
templateContentProfileSchema,
|
|
@@ -721,4 +793,3 @@ export {
|
|
|
721
793
|
transformStyleSummarySchema,
|
|
722
794
|
validationResultSchema
|
|
723
795
|
};
|
|
724
|
-
//# sourceMappingURL=zod.js.map
|
package/dist/share/index.js
CHANGED
|
@@ -3,11 +3,10 @@ import {
|
|
|
3
3
|
createSharedDocumentHash,
|
|
4
4
|
createSharedDocumentUrl,
|
|
5
5
|
parseSharedDocumentHash
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-LMMOFRGQ.js";
|
|
7
7
|
export {
|
|
8
8
|
SHARED_DOCUMENT_LIMITS,
|
|
9
9
|
createSharedDocumentHash,
|
|
10
10
|
createSharedDocumentUrl,
|
|
11
11
|
parseSharedDocumentHash
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,7 @@ import { a as WorkspacePath } from './workspace-path-CWVrcuPL.js';
|
|
|
4
4
|
declare const DOCBLOCKS_MCP_WIRE_VERSION: 1;
|
|
5
5
|
type DocBlocksMcpWireVersion = typeof DOCBLOCKS_MCP_WIRE_VERSION;
|
|
6
6
|
/** Canonical artifact-first tools exposed by the local DocBlocks MCP server. */
|
|
7
|
-
declare const DOCBLOCKS_MCP_TOOL_NAMES: readonly ["list_roots", "get_conversion_report", "convert_document", "create_document_bundle", "save_artifact", "inspect_document", "validate_document", "preview_document", "compare_documents", "list_templates", "describe_template", "recommend_templates", "describe_theme", "infer_theme_from_file", "inspect_pptx_layouts", "apply_inferred_theme", "list_formats", "list_themes", "list_transform_styles"];
|
|
7
|
+
declare const DOCBLOCKS_MCP_TOOL_NAMES: readonly ["list_roots", "get_conversion_report", "convert_document", "create_document_bundle", "revise_document", "save_artifact", "inspect_document", "validate_document", "preview_document", "compare_documents", "get_authoring_context", "list_templates", "describe_template", "recommend_templates", "describe_theme", "infer_theme_from_file", "inspect_pptx_layouts", "apply_inferred_theme", "list_formats", "list_themes", "list_transform_styles"];
|
|
8
8
|
type DocBlocksMcpToolName = (typeof DOCBLOCKS_MCP_TOOL_NAMES)[number];
|
|
9
9
|
type AppliedOptionValue = string | number | boolean | null;
|
|
10
10
|
interface AppliedOption {
|
|
@@ -150,6 +150,36 @@ interface ConversionResult {
|
|
|
150
150
|
interface ConvertDocumentResult {
|
|
151
151
|
readonly results: readonly ConversionResult[];
|
|
152
152
|
}
|
|
153
|
+
/** One bounded, heading-scoped replacement applied to an immutable document artifact. */
|
|
154
|
+
interface ReplaceBlockRevision {
|
|
155
|
+
readonly kind: 'replace_block';
|
|
156
|
+
/** Stable block id returned by inspect_document for the parent artifact. */
|
|
157
|
+
readonly blockId: string;
|
|
158
|
+
/** Complete replacement heading plus its direct body; nested headings are not accepted. */
|
|
159
|
+
readonly markdown: string;
|
|
160
|
+
}
|
|
161
|
+
/** Optimistic, artifact-native revision request. The parent artifact is never mutated. */
|
|
162
|
+
interface DocumentRevisionRequest {
|
|
163
|
+
readonly artifactUri: string;
|
|
164
|
+
readonly expectedSha256: string;
|
|
165
|
+
readonly edits: readonly ReplaceBlockRevision[];
|
|
166
|
+
}
|
|
167
|
+
/** Hash-addressed record of one block replacement in a document revision. */
|
|
168
|
+
interface AppliedBlockRevision {
|
|
169
|
+
readonly kind: 'replace_block';
|
|
170
|
+
readonly blockId: string;
|
|
171
|
+
readonly beforeSha256: string;
|
|
172
|
+
readonly afterSha256: string;
|
|
173
|
+
}
|
|
174
|
+
/** Successful immutable artifact-to-artifact document revision. */
|
|
175
|
+
interface DocumentRevisionResult {
|
|
176
|
+
readonly version: DocBlocksMcpWireVersion;
|
|
177
|
+
readonly kind: 'revision';
|
|
178
|
+
readonly parentArtifact: ArtifactRef;
|
|
179
|
+
readonly artifact: ArtifactRef;
|
|
180
|
+
readonly edits: readonly AppliedBlockRevision[];
|
|
181
|
+
readonly diagnostics: readonly McpDiagnostic[];
|
|
182
|
+
}
|
|
153
183
|
interface DocumentMetadataSummary {
|
|
154
184
|
readonly title: string | null;
|
|
155
185
|
readonly author: string | null;
|
|
@@ -368,6 +398,37 @@ interface DescribeTemplateResult {
|
|
|
368
398
|
readonly template: DescribedTemplate;
|
|
369
399
|
readonly annotationExample: string;
|
|
370
400
|
}
|
|
401
|
+
type AuthoringGoal = 'content-first' | 'visual-polish';
|
|
402
|
+
type TemplateAuthoringRole = 'opener' | 'divider' | 'content' | 'highlight' | 'quote' | 'comparison' | 'event' | 'media' | 'data' | 'spatial';
|
|
403
|
+
type TemplateBodyPolicy = 'complete' | 'derived' | 'ignored' | 'structured';
|
|
404
|
+
interface AuthoringTemplateSummary extends DescribedTemplate {
|
|
405
|
+
readonly role: TemplateAuthoringRole;
|
|
406
|
+
readonly bodyPolicy: TemplateBodyPolicy;
|
|
407
|
+
readonly safeForContentFirst: boolean;
|
|
408
|
+
readonly placement: 'heading';
|
|
409
|
+
readonly annotationExample: string;
|
|
410
|
+
}
|
|
411
|
+
interface AuthoringSyntaxSummary {
|
|
412
|
+
readonly headingAnnotation: string;
|
|
413
|
+
readonly standaloneAnnotation: string;
|
|
414
|
+
readonly standaloneWarning: string;
|
|
415
|
+
}
|
|
416
|
+
/** One-call, linked-registry-backed context for agent authoring. */
|
|
417
|
+
interface AuthoringContextResult {
|
|
418
|
+
readonly goal: AuthoringGoal;
|
|
419
|
+
readonly targetFormat: string | null;
|
|
420
|
+
readonly defaultTemplateId: string;
|
|
421
|
+
readonly defaultFidelity: ConversionFidelity | null;
|
|
422
|
+
readonly workflow: readonly string[];
|
|
423
|
+
readonly syntax: AuthoringSyntaxSummary;
|
|
424
|
+
readonly formats: readonly FormatCapabilitySummary[];
|
|
425
|
+
readonly templates: readonly AuthoringTemplateSummary[];
|
|
426
|
+
readonly themes: readonly ThemeCatalogEntry[];
|
|
427
|
+
readonly transformStyles: readonly TransformStyleSummary[];
|
|
428
|
+
readonly recommendations: readonly TemplateRecommendation[];
|
|
429
|
+
readonly totalBlocks: number | null;
|
|
430
|
+
readonly truncated: boolean;
|
|
431
|
+
}
|
|
371
432
|
interface TemplateContentProfile {
|
|
372
433
|
readonly hasImage: boolean;
|
|
373
434
|
readonly imageCount: number;
|
|
@@ -465,4 +526,4 @@ type MaterializationOptions = {
|
|
|
465
526
|
readonly expectedSha256: string;
|
|
466
527
|
};
|
|
467
528
|
|
|
468
|
-
export { type
|
|
529
|
+
export { type ListFormatsResult as $, type ArtifactRef as A, type BlockSummary as B, type ComparisonResult as C, type DocumentRevisionResult as D, type DescribeThemeResult as E, type DescribedTemplate as F, type DiagnosticLocation as G, type DiagnosticSeverity as H, type InspectionResult as I, type DiagnosticStage as J, type DocBlocksMcpToolName as K, type DocBlocksMcpWireVersion as L, type MaterializationOptions as M, type DocumentItemSummary as N, type DocumentMetadataSummary as O, type PreviewResult as P, type DocumentRevisionRequest as Q, type DocumentStatistics as R, type EngineVersion as S, type FileDocumentSource as T, type FormatCapabilitySummary as U, type ValidationResult as V, type FormatDirectionCapability as W, type InferThemeResult as X, type InferredLayoutSummary as Y, type InspectPptxLayoutsResult as Z, type LinkSummary as _, type ConversionResult as a, type ListRootsResult as a0, type ListTemplatesResult as a1, type ListThemesResult as a2, type ListTransformStylesResult as a3, type MarkdownDocumentSource as a4, type McpErrorDetail as a5, type McpSuccessResult as a6, type OutlineEntry as a7, type PptxLayoutSummary as a8, type PptxSlideSize as a9, type PreviewItem as aa, type PreviewItemKind as ab, type RecommendTemplatesResult as ac, type ReplaceBlockRevision as ad, type RootGrantSummary as ae, type SaveArtifactResult as af, type SavedArtifactDestination as ag, type SourceRange as ah, type TableSummary as ai, type TemplateAuthoringRole as aj, type TemplateBodyPolicy as ak, type TemplateContentProfile as al, type TemplateInputSummary as am, type TemplateRecommendation as an, type TemplateSummary as ao, type ThemeCatalogEntry as ap, type ThemeDescription as aq, type ThemeDescriptionColors as ar, type ThemeSummary as as, type TransformStyleSummary as at, type ValidationSummary as au, type DocumentSource as b, type McpDiagnostic as c, type McpErrorResult as d, type AppliedBlockRevision as e, type AppliedOption as f, type AppliedOptionValue as g, type ApplyInferredThemeResult as h, type ArtifactDocumentSource as i, type AssetSummary as j, type AuthoringContextResult as k, type AuthoringGoal as l, type AuthoringSyntaxSummary as m, type AuthoringTemplateSummary as n, type BundleAssetContentSource as o, type BundleAssetRef as p, type BundleDocumentSource as q, type ComparisonCategory as r, type ComparisonChange as s, type ComparisonMetric as t, type ComparisonStatus as u, type ConversionFidelity as v, type ConvertDocumentResult as w, DOCBLOCKS_MCP_TOOL_NAMES as x, DOCBLOCKS_MCP_WIRE_VERSION as y, type DescribeTemplateResult as z };
|
package/dist/vscode/index.d.ts
CHANGED
|
@@ -139,6 +139,9 @@ type WebviewToExtensionMessage = {
|
|
|
139
139
|
} | {
|
|
140
140
|
type: 'setWriteCanvasSettings';
|
|
141
141
|
settings: VscodeWriteCanvasSettings;
|
|
142
|
+
} | {
|
|
143
|
+
type: 'openLink';
|
|
144
|
+
href: string;
|
|
142
145
|
} | {
|
|
143
146
|
type: 'edit';
|
|
144
147
|
content: string;
|
|
@@ -179,6 +182,8 @@ type WebviewToExtensionMessage = {
|
|
|
179
182
|
dataBase64: string;
|
|
180
183
|
mimeType: string;
|
|
181
184
|
grantId: string | null;
|
|
185
|
+
/** Optional validated basename edit; the host derives it from the opaque grant. */
|
|
186
|
+
targetFilename: string | null;
|
|
182
187
|
} | {
|
|
183
188
|
type: 'resolveExportTarget';
|
|
184
189
|
requestId: number;
|
package/dist/vscode/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOST_WIRE_LIMITS,
|
|
3
3
|
isBoundedString
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-M2PUNKHS.js";
|
|
5
5
|
|
|
6
6
|
// src/vscode/messages.ts
|
|
7
7
|
var MAX_REQUEST_ID = 2147483647;
|
|
@@ -36,6 +36,8 @@ function parseWebviewToExtensionMessage(value) {
|
|
|
36
36
|
const settings = parseVscodeWriteCanvasSettings(value.settings);
|
|
37
37
|
return settings ? { type: "setWriteCanvasSettings", settings } : null;
|
|
38
38
|
}
|
|
39
|
+
case "openLink":
|
|
40
|
+
return hasOnlyKeys(value, ["type", "href"]) && hasBoundedString(value, "href", HOST_WIRE_LIMITS.urlCharacters, 1) ? { type: "openLink", href: value.href } : null;
|
|
39
41
|
case "edit":
|
|
40
42
|
return hasOnlyKeys(value, [
|
|
41
43
|
"type",
|
|
@@ -87,14 +89,16 @@ function parseWebviewToExtensionMessage(value) {
|
|
|
87
89
|
"filename",
|
|
88
90
|
"dataBase64",
|
|
89
91
|
"mimeType",
|
|
90
|
-
"grantId"
|
|
91
|
-
|
|
92
|
+
"grantId",
|
|
93
|
+
"targetFilename"
|
|
94
|
+
]) && hasRequestId(value) && hasSafeFilename(value, "filename") && hasBoundedString(value, "dataBase64", HOST_WIRE_LIMITS.base64Characters) && hasMimeType(value, "mimeType") && hasNullableBoundedString(value, "grantId", HOST_WIRE_LIMITS.identifierCharacters, 1) && hasNullableSafeFilename(value, "targetFilename") ? {
|
|
92
95
|
type: "saveExport",
|
|
93
96
|
requestId: value.requestId,
|
|
94
97
|
filename: value.filename,
|
|
95
98
|
dataBase64: value.dataBase64,
|
|
96
99
|
mimeType: value.mimeType,
|
|
97
|
-
grantId: value.grantId
|
|
100
|
+
grantId: value.grantId,
|
|
101
|
+
targetFilename: value.targetFilename
|
|
98
102
|
} : null;
|
|
99
103
|
case "resolveExportTarget":
|
|
100
104
|
return hasOnlyKeys(value, ["type", "requestId", "filename"]) && hasRequestId(value) && hasSafeFilename(value, "filename") ? { type: "resolveExportTarget", requestId: value.requestId, filename: value.filename } : null;
|
|
@@ -347,6 +351,9 @@ function hasOnlyKeys(value, keys) {
|
|
|
347
351
|
function hasSafeFilename(value, key) {
|
|
348
352
|
return isSafeExportFilename(value[key]);
|
|
349
353
|
}
|
|
354
|
+
function hasNullableSafeFilename(value, key) {
|
|
355
|
+
return value[key] === null || isSafeExportFilename(value[key]);
|
|
356
|
+
}
|
|
350
357
|
function isSafeExportFilename(value) {
|
|
351
358
|
return isBoundedString(value, 255, 1) && value.trim() === value && !/[\\/:*?"<>|]/.test(value) && !hasControlCharacter(value) && value !== "." && value !== ".." && !value.endsWith(".") && !value.endsWith(" ");
|
|
352
359
|
}
|
|
@@ -380,4 +387,3 @@ export {
|
|
|
380
387
|
parseExtensionToWebviewMessage,
|
|
381
388
|
parseWebviewToExtensionMessage
|
|
382
389
|
};
|
|
383
|
-
//# sourceMappingURL=index.js.map
|
package/dist/workspace/index.js
CHANGED
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
saveWorkspace,
|
|
11
11
|
touchWorkspace,
|
|
12
12
|
unregisterTransientWorkspace
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-SJBB5OD7.js";
|
|
14
|
+
import "../chunk-OQCPBOQA.js";
|
|
15
|
+
import "../chunk-XAMILHQP.js";
|
|
16
16
|
export {
|
|
17
17
|
ensureDefaultWorkspace,
|
|
18
18
|
getTransientWorkspace,
|
|
@@ -26,4 +26,3 @@ export {
|
|
|
26
26
|
touchWorkspace,
|
|
27
27
|
unregisterTransientWorkspace
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/docblocks",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Core data structures and filesystem abstractions for DocBlocks",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"main": "./dist/index.js",
|
|
24
24
|
"module": "./dist/index.js",
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
|
+
"sideEffects": false,
|
|
26
27
|
"files": [
|
|
27
28
|
"dist"
|
|
28
29
|
],
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
"typecheck": "tsc --noEmit"
|
|
99
100
|
},
|
|
100
101
|
"dependencies": {
|
|
101
|
-
"@bendyline/squisq": "2.3.
|
|
102
|
+
"@bendyline/squisq": "2.3.2",
|
|
102
103
|
"zod": "3.25.76"
|
|
103
104
|
}
|
|
104
105
|
}
|