@superdoc/mcp 1.10.0-next.6 → 1.10.0-next.8

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.
Files changed (2) hide show
  1. package/dist/index.js +185 -82
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -31630,7 +31630,7 @@ var init_host = __esm(() => {
31630
31630
  });
31631
31631
 
31632
31632
  // ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
31633
- var SDK_VERSION = "2.23.0-next.6";
31633
+ var SDK_VERSION = "2.23.0-next.8";
31634
31634
 
31635
31635
  // ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
31636
31636
  import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
@@ -112913,7 +112913,7 @@ function refConfigSchemas(reviewAware = false) {
112913
112913
  failure: refFailureSchema
112914
112914
  };
112915
112915
  }
112916
- var trackChangeTypeValues, inlineReadSlotStateSchema, formatReadSelectionOptionsSchema, sourcePathSchema, diagnosticPathSchema, conversionSourceRangeSchema, conversionSourceSchema, diagnosticProperties, sdDiagnosticSchema, sdThemeProperties, stylePartStatusSchema, styleDiagnosticSchema, sdConversionDiagnosticSchema, conversionReportSchema, receiptSuccessMetadataProperties, clipboardInsertSuccessSchema, nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, themeValueSourcesSchema, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, commentTrackedChangeTargetSchema, textSearchCommentTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, listsV2BlockTargetSchema, paragraphTargetSchema, sectionAddressSchema, watermarkSlotTargetSchema, watermarkTargetSchema, watermarkAddressSchema, watermarkHorizontalPlacementSchema, watermarkVerticalPlacementSchema, watermarkPlacementSchema, textWatermarkSchema, pictureWatermarkInputSchema, retainedPictureWatermarkInputSchema, watermarksApplyTargetSchema, pictureWatermarkInfoSchema, watermarkInfoSchema, watermarksApplySuccessSchema, watermarksApplyFailureSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, commentTrackedChangeLinkSchema, targetLocatorSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, commentsCreateSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, storyLocatorSchema, bodyStoryLocatorSchema, markRunColorRefSchema, markRunFontsSchema, markRunLanguagesSchema, markRunUnderlineSchema, markRunShadingSchema, markRunBorderSchema, markRunPropsSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, createHeadingLevelSchema, semanticHeadingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema, planTextSelectorSchema, nodeSelectorSchema, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, evaluatedRevisionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentMetadataSchema, commentReadMetadataProperties, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema, trackChangeSourceIdsSchema, trackChangeBroadTypeEnum, trackChangeGroupingEnum, trackChangeCanonicalizationKindEnum, trackChangeAddressKindEnum, trackChangeSourcePlatformEnum, trackChangeReplacementSideSchema, trackChangeReplacementSchema, trackChangeOverlapRelationshipSchema, trackChangeOverlapLayerSchema, trackChangeOverlapInfoSchema, trackChangeFormattingSnapshotSchema, trackChangeListDeltaKindEnum, trackChangeListDeltaSideSchema, trackChangeListMemberDeltaSchema, trackChangeListDeltaSummarySchema, trackChangeStructuralTargetKinds, trackChangeStructuralSnapshotSchema, trackChangeStructuralDescriptorSchema, trackChangeNavigationTargetSchema, trackChangeReadMetadataProperties, trackChangeTargetSchema, trackChangeSnapshotSchema, trackChangeCustomAttributeSchema, trackChangeRewriteReviewGroupSchema, trackChangeComparisonHunkReviewGroupSchema, trackChangeReviewGroupSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, reviewDecideRangeTargetOptions, historyActionCollaborationSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilitySupportDecisionSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern, tableBorderSpecSchema, nullableTableBorderSpecSchema, sdFragmentSchema, conversionFragmentSchema, placementSchema, nestingPolicySchema, selectionOoxmlCaptureSchema, nativeOoxmlProperties, insertInputSchema, supportCheckRichInsertInputSchema, supportCheckRichReplaceInputSchema, supportCheckProjectionInputSchema, supportCheckInputSchema, supportCheckFailureSchema, supportCheckGuardSchema, supportCheckCommonProperties, supportCheckOutputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableAnchorLocationMembers, tableAnchorLocationSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMoveDestinationSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccInfoSchema, ccListResultSchema, refListQueryProperties, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, customXmlPartTargetSchema, customXmlPartMutation, customXmlPartCreateMutation, anchoredMetadataAttachMutation, anchoredMetadataMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffApplyEligibilityBlockerSchema, diffApplyModeEligibilitySchema, diffApplyEligibilitySchema, diffPayloadSchema, diffApplyResultSchema, temporaryHandleProperties, temporaryProgramProperties, temporaryReceiptSchema, operationSchemas;
112916
+ var trackChangeTypeValues, inlineReadSlotStateSchema, formatReadSelectionOptionsSchema, sourcePathSchema, diagnosticPathSchema, conversionSourceRangeSchema, conversionSourceSchema, diagnosticProperties, sdDiagnosticSchema, sdThemeProperties, stylePartStatusSchema, styleDiagnosticSchema, sdConversionDiagnosticSchema, conversionReportSchema, receiptSuccessMetadataProperties, clipboardInsertSuccessSchema, nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, themeValueSourcesSchema, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, commentTrackedChangeTargetSchema, textSearchCommentTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, listsV2BlockTargetSchema, paragraphTargetSchema, sectionAddressSchema, watermarkSlotTargetSchema, watermarkTargetSchema, watermarkAddressSchema, watermarkHorizontalPlacementSchema, watermarkVerticalPlacementSchema, watermarkPlacementSchema, textWatermarkSchema, pictureWatermarkInputSchema, retainedPictureWatermarkInputSchema, watermarksApplyTargetSchema, pictureWatermarkInfoSchema, watermarkInfoSchema, watermarksApplySuccessSchema, watermarksApplyFailureSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, commentTrackedChangeLinkSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, commentsCreateSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, storyLocatorSchema, bodyStoryLocatorSchema, markRunColorRefSchema, markRunFontsSchema, markRunLanguagesSchema, markRunUnderlineSchema, markRunShadingSchema, markRunBorderSchema, markRunPropsSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, createHeadingLevelSchema, semanticHeadingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, textSelectorSchema, planTextSelectorSchema, nodeSelectorSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, evaluatedRevisionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentMetadataSchema, commentReadMetadataProperties, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema, trackChangeSourceIdsSchema, trackChangeBroadTypeEnum, trackChangeGroupingEnum, trackChangeCanonicalizationKindEnum, trackChangeAddressKindEnum, trackChangeSourcePlatformEnum, trackChangeReplacementSideSchema, trackChangeReplacementSchema, trackChangeOverlapRelationshipSchema, trackChangeOverlapLayerSchema, trackChangeOverlapInfoSchema, trackChangeFormattingSnapshotSchema, trackChangeListDeltaKindEnum, trackChangeListDeltaSideSchema, trackChangeListMemberDeltaSchema, trackChangeListDeltaSummarySchema, trackChangeStructuralTargetKinds, trackChangeStructuralSnapshotSchema, trackChangeStructuralDescriptorSchema, trackChangeNavigationTargetSchema, trackChangeReadMetadataProperties, trackChangeTargetSchema, trackChangeSnapshotSchema, trackChangeCustomAttributeSchema, trackChangeRewriteReviewGroupSchema, trackChangeComparisonHunkReviewGroupSchema, trackChangeReviewGroupSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, reviewDecideRangeTargetOptions, historyActionCollaborationSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilitySupportDecisionSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern, tableBorderSpecSchema, nullableTableBorderSpecSchema, sdFragmentSchema, conversionFragmentSchema, placementSchema, nestingPolicySchema, selectionOoxmlCaptureSchema, nativeOoxmlProperties, insertInputSchema, supportCheckRichInsertInputSchema, supportCheckRichReplaceInputSchema, supportCheckProjectionInputSchema, supportCheckInputSchema, supportCheckFailureSchema, supportCheckGuardSchema, supportCheckCommonProperties, supportCheckOutputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableAnchorLocationMembers, tableAnchorLocationSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMoveDestinationSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccInfoSchema, ccListResultSchema, refListQueryProperties, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, customXmlPartTargetSchema, customXmlPartMutation, customXmlPartCreateMutation, anchoredMetadataAttachMutation, anchoredMetadataMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffApplyEligibilityBlockerSchema, diffApplyModeEligibilitySchema, diffApplyEligibilitySchema, diffPayloadSchema, diffApplyResultSchema, temporaryHandleProperties, temporaryProgramProperties, temporaryReceiptSchema, operationSchemas;
112917
112917
  var init_schemas4 = __esm(() => {
112918
112918
  init_command_catalog();
112919
112919
  init_types4();
@@ -113820,7 +113820,6 @@ var init_schemas4 = __esm(() => {
113820
113820
  entityAddressSchema = ref2("EntityAddress");
113821
113821
  selectionTargetSchema = ref2("SelectionTarget");
113822
113822
  commentTrackedChangeLinkSchema = ref2("CommentTrackedChangeLink");
113823
- targetLocatorSchema = ref2("TargetLocator");
113824
113823
  deleteBehaviorSchema = ref2("DeleteBehavior");
113825
113824
  resolvedHandleSchema = ref2("ResolvedHandle");
113826
113825
  pageInfoSchema = ref2("PageInfo");
@@ -113992,37 +113991,6 @@ var init_schemas4 = __esm(() => {
113992
113991
  appliedChangeMode: { enum: ["direct", "tracked"] },
113993
113992
  paragraph: paragraphAddressSchema
113994
113993
  }, ["success", "paragraph"]);
113995
- nodeSummarySchema = objectSchema2({
113996
- label: { type: "string" },
113997
- text: { type: "string" }
113998
- });
113999
- nodeInfoSchema = {
114000
- type: "object",
114001
- required: ["nodeType", "kind"],
114002
- properties: {
114003
- nodeType: { enum: [...nodeTypeValues] },
114004
- kind: { enum: ["block", "inline"] },
114005
- summary: nodeSummarySchema,
114006
- text: { type: "string" },
114007
- nodes: arraySchema2({ type: "object" }),
114008
- properties: { type: "object" },
114009
- bodyText: { type: "string" },
114010
- bodyNodes: arraySchema2({ type: "object" })
114011
- },
114012
- additionalProperties: false
114013
- };
114014
- matchContextSchema = objectSchema2({
114015
- address: nodeAddressSchema,
114016
- snippet: { type: "string" },
114017
- highlightRange: rangeSchema,
114018
- textRanges: arraySchema2(textAddressSchema),
114019
- target: selectionTargetSchema
114020
- }, ["address", "snippet", "highlightRange"]);
114021
- unknownNodeDiagnosticSchema = objectSchema2({
114022
- message: { type: "string" },
114023
- address: nodeAddressSchema,
114024
- hint: { type: "string" }
114025
- }, ["message"]);
114026
113994
  textSelectorSchema = objectSchema2({
114027
113995
  type: { const: "text", description: "Must be 'text' for text pattern search." },
114028
113996
  pattern: {
@@ -114049,9 +114017,6 @@ var init_schemas4 = __esm(() => {
114049
114017
  },
114050
114018
  kind: { enum: ["block", "inline"], description: "Filter: 'block' or 'inline'." }
114051
114019
  }, ["type"]);
114052
- selectorShorthandSchema = objectSchema2({
114053
- nodeType: { enum: [...nodeTypeValues] }
114054
- }, ["nodeType"]);
114055
114020
  sdTextSelectorSchema = objectSchema2({
114056
114021
  type: { const: "text" },
114057
114022
  pattern: { type: "string" },
@@ -123760,7 +123725,7 @@ function executeBlocksList(adapter, input) {
123760
123725
  continue;
123761
123726
  const index = result.total++;
123762
123727
  if (index >= offset && result.blocks.length < limit) {
123763
- const { text: fullText, ...summary } = block;
123728
+ const { text: _text, ...summary } = block;
123764
123729
  result.blocks.push(normalized.includeText ? block : summary);
123765
123730
  }
123766
123731
  }
@@ -124022,7 +123987,7 @@ function normalizeReviewDecideTarget(target) {
124022
123987
  throw new DocumentApiValidationError("INVALID_TARGET", "trackChanges.decide target.kind 'id' must include a non-empty `id` string.", { field: "target.id", value: id });
124023
123988
  }
124024
123989
  const story = readOptionalStory(target, "target.story", false);
124025
- const side = readOptionalReplacementReviewDecideTargetSide(target, "target.side");
123990
+ const side = readOptionalReplacementReviewDecideTargetSide(target);
124026
123991
  const moveRole = readOptionalMoveRole(target);
124027
123992
  return {
124028
123993
  kind: "id",
@@ -124121,7 +124086,7 @@ function normalizeReviewDecideTarget(target) {
124121
124086
  }
124122
124087
  if (typeof target.id === "string" && target.id.length > 0) {
124123
124088
  const story = readOptionalStory(target, "target.story", false);
124124
- const side = readOptionalReplacementReviewDecideTargetSide(target, "target.side");
124089
+ const side = readOptionalReplacementReviewDecideTargetSide(target);
124125
124090
  const moveRole = readOptionalMoveRole(target);
124126
124091
  return {
124127
124092
  kind: "id",
@@ -124254,7 +124219,7 @@ function readOptionalMoveRole(target) {
124254
124219
  }
124255
124220
  return moveRole;
124256
124221
  }
124257
- function readOptionalReplacementReviewDecideTargetSide(target, field) {
124222
+ function readOptionalReplacementReviewDecideTargetSide(target) {
124258
124223
  if (!("side" in target) || target.side === undefined || target.side === null)
124259
124224
  return;
124260
124225
  validateReplacementTargetSide(target.side);
@@ -296418,7 +296383,7 @@ function refConfigSchemas2(reviewAware = false) {
296418
296383
  failure: refFailureSchema2
296419
296384
  };
296420
296385
  }
296421
- var trackChangeTypeValues2, inlineReadSlotStateSchema2, formatReadSelectionOptionsSchema2, sourcePathSchema2, diagnosticPathSchema2, conversionSourceRangeSchema2, conversionSourceSchema2, diagnosticProperties2, sdDiagnosticSchema2, sdThemeProperties2, stylePartStatusSchema2, styleDiagnosticSchema2, sdConversionDiagnosticSchema2, conversionReportSchema2, receiptSuccessMetadataProperties2, clipboardInsertSuccessSchema2, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, knownTargetKindValues2, themeValueSourcesSchema2, SHARED_DEFS2, rangeSchema2, positionSchema2, inlineAnchorSchema2, targetKindSchema2, textAddressSchema2, textTargetSchema2, commentTrackedChangeTargetSchema2, textSearchCommentTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, listsV2BlockTargetSchema2, paragraphTargetSchema2, sectionAddressSchema2, watermarkSlotTargetSchema2, watermarkTargetSchema2, watermarkAddressSchema2, watermarkHorizontalPlacementSchema2, watermarkVerticalPlacementSchema2, watermarkPlacementSchema2, textWatermarkSchema2, pictureWatermarkInputSchema2, retainedPictureWatermarkInputSchema2, watermarksApplyTargetSchema2, pictureWatermarkInfoSchema2, watermarkInfoSchema2, watermarksApplySuccessSchema2, watermarksApplyFailureSchema2, inlineNodeAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, commentTrackedChangeLinkSchema2, targetLocatorSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, commentsCreateSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchRunSchema2, matchBlockSchema2, storyLocatorSchema2, bodyStoryLocatorSchema2, markRunColorRefSchema2, markRunFontsSchema2, markRunLanguagesSchema2, markRunUnderlineSchema2, markRunShadingSchema2, markRunBorderSchema2, markRunPropsSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, createHeadingLevelSchema2, semanticHeadingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, listsExitSuccessSchema2, nodeSummarySchema2, nodeInfoSchema2, matchContextSchema2, unknownNodeDiagnosticSchema2, textSelectorSchema2, planTextSelectorSchema2, nodeSelectorSchema2, selectorShorthandSchema2, sdTextSelectorSchema2, sdNodeSelectorSchema2, sdSelectorSchema2, sdReadOptionsSchema2, sdFindInputSchema2, sdNodeResultSchema2, sdFindResultSchema2, sdMutationResolutionSchema2, evaluatedRevisionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStyleInfoSchema2, documentStylesSchema2, documentDefaultsSchema2, documentInfoSchema2, listKindSchema2, listInsertPositionSchema2, listItemInfoSchema2, listItemDomainItemSchema2, listsListResultSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionInfoSchema2, sectionResolvedHandleSchema2, sectionDomainItemSchema2, sectionsListResultSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, commentMetadataSchema2, commentReadMetadataProperties2, commentInfoSchema2, commentDomainItemSchema2, commentsListResultSchema2, trackChangeWordRevisionIdsSchema2, trackChangeSourceIdsSchema2, trackChangeBroadTypeEnum2, trackChangeGroupingEnum2, trackChangeCanonicalizationKindEnum2, trackChangeAddressKindEnum2, trackChangeSourcePlatformEnum2, trackChangeReplacementSideSchema2, trackChangeReplacementSchema2, trackChangeOverlapRelationshipSchema2, trackChangeOverlapLayerSchema2, trackChangeOverlapInfoSchema2, trackChangeFormattingSnapshotSchema2, trackChangeListDeltaKindEnum2, trackChangeListDeltaSideSchema2, trackChangeListMemberDeltaSchema2, trackChangeListDeltaSummarySchema2, trackChangeStructuralTargetKinds2, trackChangeStructuralSnapshotSchema2, trackChangeStructuralDescriptorSchema2, trackChangeNavigationTargetSchema2, trackChangeReadMetadataProperties2, trackChangeTargetSchema2, trackChangeSnapshotSchema2, trackChangeCustomAttributeSchema2, trackChangeRewriteReviewGroupSchema2, trackChangeComparisonHunkReviewGroupSchema2, trackChangeReviewGroupSchema2, trackChangeInfoSchema2, trackChangeDomainItemSchema2, trackChangesListResultSchema2, reviewDecideRangeTargetOptions2, historyActionCollaborationSchema2, capabilityReasonCodeSchema2, capabilityReasonsSchema2, capabilitySupportDecisionSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, inlinePropertyCapabilitiesByKeySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, capabilitiesOutputSchema2, strictEmptyObjectSchema2, tableBorderColorPattern2, tableBorderSpecSchema2, nullableTableBorderSpecSchema2, sdFragmentSchema2, conversionFragmentSchema2, placementSchema2, nestingPolicySchema2, selectionOoxmlCaptureSchema2, nativeOoxmlProperties2, insertInputSchema2, supportCheckRichInsertInputSchema2, supportCheckRichReplaceInputSchema2, supportCheckProjectionInputSchema2, supportCheckInputSchema2, supportCheckFailureSchema2, supportCheckGuardSchema2, supportCheckCommonProperties2, supportCheckOutputSchema2, tableLocatorSchema2, cellLocatorSchema2, cellOrTableScopedCellLocatorSchema2, tableOrCellLocatorSchema2, mergeRangeLocatorSchema2, tableAnchorLocationMembers2, tableAnchorLocationSchema2, tableCreateLocationSchema2, tableMutationSuccessSchema2, createTableSuccessSchema2, tableMutationFailureCodes2, tableMutationFailureSchema2, tableMutationResultSchema2, createTableResultSchema2, historyActionSuccessSchema2, historyActionFailureSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureCodes2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureCodes2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkDestinationSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureCodes2, hyperlinkMutationFailureSchema2, hyperlinkInfoSchema2, contentControlTargetSchema2, contentControlMoveDestinationSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccInfoSchema2, ccListResultSchema2, refListQueryProperties2, refListQuerySchema2, discoveryOutputSchema2, receiptFailureSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, customXmlPartTargetSchema2, customXmlPartMutation2, customXmlPartCreateMutation2, anchoredMetadataAttachMutation2, anchoredMetadataMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffApplyEligibilityBlockerSchema2, diffApplyModeEligibilitySchema2, diffApplyEligibilitySchema2, diffPayloadSchema2, diffApplyResultSchema2, temporaryHandleProperties2, temporaryProgramProperties2, temporaryReceiptSchema2, operationSchemas2;
296386
+ var trackChangeTypeValues2, inlineReadSlotStateSchema2, formatReadSelectionOptionsSchema2, sourcePathSchema2, diagnosticPathSchema2, conversionSourceRangeSchema2, conversionSourceSchema2, diagnosticProperties2, sdDiagnosticSchema2, sdThemeProperties2, stylePartStatusSchema2, styleDiagnosticSchema2, sdConversionDiagnosticSchema2, conversionReportSchema2, receiptSuccessMetadataProperties2, clipboardInsertSuccessSchema2, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, knownTargetKindValues2, themeValueSourcesSchema2, SHARED_DEFS2, rangeSchema2, positionSchema2, inlineAnchorSchema2, targetKindSchema2, textAddressSchema2, textTargetSchema2, commentTrackedChangeTargetSchema2, textSearchCommentTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, listsV2BlockTargetSchema2, paragraphTargetSchema2, sectionAddressSchema2, watermarkSlotTargetSchema2, watermarkTargetSchema2, watermarkAddressSchema2, watermarkHorizontalPlacementSchema2, watermarkVerticalPlacementSchema2, watermarkPlacementSchema2, textWatermarkSchema2, pictureWatermarkInputSchema2, retainedPictureWatermarkInputSchema2, watermarksApplyTargetSchema2, pictureWatermarkInfoSchema2, watermarkInfoSchema2, watermarksApplySuccessSchema2, watermarksApplyFailureSchema2, inlineNodeAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, commentTrackedChangeLinkSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, commentsCreateSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchRunSchema2, matchBlockSchema2, storyLocatorSchema2, bodyStoryLocatorSchema2, markRunColorRefSchema2, markRunFontsSchema2, markRunLanguagesSchema2, markRunUnderlineSchema2, markRunShadingSchema2, markRunBorderSchema2, markRunPropsSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, createHeadingLevelSchema2, semanticHeadingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, listsExitSuccessSchema2, textSelectorSchema2, planTextSelectorSchema2, nodeSelectorSchema2, sdTextSelectorSchema2, sdNodeSelectorSchema2, sdSelectorSchema2, sdReadOptionsSchema2, sdFindInputSchema2, sdNodeResultSchema2, sdFindResultSchema2, sdMutationResolutionSchema2, evaluatedRevisionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStyleInfoSchema2, documentStylesSchema2, documentDefaultsSchema2, documentInfoSchema2, listKindSchema2, listInsertPositionSchema2, listItemInfoSchema2, listItemDomainItemSchema2, listsListResultSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionInfoSchema2, sectionResolvedHandleSchema2, sectionDomainItemSchema2, sectionsListResultSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, commentMetadataSchema2, commentReadMetadataProperties2, commentInfoSchema2, commentDomainItemSchema2, commentsListResultSchema2, trackChangeWordRevisionIdsSchema2, trackChangeSourceIdsSchema2, trackChangeBroadTypeEnum2, trackChangeGroupingEnum2, trackChangeCanonicalizationKindEnum2, trackChangeAddressKindEnum2, trackChangeSourcePlatformEnum2, trackChangeReplacementSideSchema2, trackChangeReplacementSchema2, trackChangeOverlapRelationshipSchema2, trackChangeOverlapLayerSchema2, trackChangeOverlapInfoSchema2, trackChangeFormattingSnapshotSchema2, trackChangeListDeltaKindEnum2, trackChangeListDeltaSideSchema2, trackChangeListMemberDeltaSchema2, trackChangeListDeltaSummarySchema2, trackChangeStructuralTargetKinds2, trackChangeStructuralSnapshotSchema2, trackChangeStructuralDescriptorSchema2, trackChangeNavigationTargetSchema2, trackChangeReadMetadataProperties2, trackChangeTargetSchema2, trackChangeSnapshotSchema2, trackChangeCustomAttributeSchema2, trackChangeRewriteReviewGroupSchema2, trackChangeComparisonHunkReviewGroupSchema2, trackChangeReviewGroupSchema2, trackChangeInfoSchema2, trackChangeDomainItemSchema2, trackChangesListResultSchema2, reviewDecideRangeTargetOptions2, historyActionCollaborationSchema2, capabilityReasonCodeSchema2, capabilityReasonsSchema2, capabilitySupportDecisionSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, inlinePropertyCapabilitiesByKeySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, capabilitiesOutputSchema2, strictEmptyObjectSchema2, tableBorderColorPattern2, tableBorderSpecSchema2, nullableTableBorderSpecSchema2, sdFragmentSchema2, conversionFragmentSchema2, placementSchema2, nestingPolicySchema2, selectionOoxmlCaptureSchema2, nativeOoxmlProperties2, insertInputSchema2, supportCheckRichInsertInputSchema2, supportCheckRichReplaceInputSchema2, supportCheckProjectionInputSchema2, supportCheckInputSchema2, supportCheckFailureSchema2, supportCheckGuardSchema2, supportCheckCommonProperties2, supportCheckOutputSchema2, tableLocatorSchema2, cellLocatorSchema2, cellOrTableScopedCellLocatorSchema2, tableOrCellLocatorSchema2, mergeRangeLocatorSchema2, tableAnchorLocationMembers2, tableAnchorLocationSchema2, tableCreateLocationSchema2, tableMutationSuccessSchema2, createTableSuccessSchema2, tableMutationFailureCodes2, tableMutationFailureSchema2, tableMutationResultSchema2, createTableResultSchema2, historyActionSuccessSchema2, historyActionFailureSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureCodes2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureCodes2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkDestinationSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureCodes2, hyperlinkMutationFailureSchema2, hyperlinkInfoSchema2, contentControlTargetSchema2, contentControlMoveDestinationSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccInfoSchema2, ccListResultSchema2, refListQueryProperties2, refListQuerySchema2, discoveryOutputSchema2, receiptFailureSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, customXmlPartTargetSchema2, customXmlPartMutation2, customXmlPartCreateMutation2, anchoredMetadataAttachMutation2, anchoredMetadataMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffApplyEligibilityBlockerSchema2, diffApplyModeEligibilitySchema2, diffApplyEligibilitySchema2, diffPayloadSchema2, diffApplyResultSchema2, temporaryHandleProperties2, temporaryProgramProperties2, temporaryReceiptSchema2, operationSchemas2;
296422
296387
  var init_schemas5 = __esm(() => {
296423
296388
  init_command_catalog2();
296424
296389
  init_types8();
@@ -297325,7 +297290,6 @@ var init_schemas5 = __esm(() => {
297325
297290
  entityAddressSchema2 = ref4("EntityAddress");
297326
297291
  selectionTargetSchema2 = ref4("SelectionTarget");
297327
297292
  commentTrackedChangeLinkSchema2 = ref4("CommentTrackedChangeLink");
297328
- targetLocatorSchema2 = ref4("TargetLocator");
297329
297293
  deleteBehaviorSchema2 = ref4("DeleteBehavior");
297330
297294
  resolvedHandleSchema2 = ref4("ResolvedHandle");
297331
297295
  pageInfoSchema2 = ref4("PageInfo");
@@ -297497,37 +297461,6 @@ var init_schemas5 = __esm(() => {
297497
297461
  appliedChangeMode: { enum: ["direct", "tracked"] },
297498
297462
  paragraph: paragraphAddressSchema2
297499
297463
  }, ["success", "paragraph"]);
297500
- nodeSummarySchema2 = objectSchema4({
297501
- label: { type: "string" },
297502
- text: { type: "string" }
297503
- });
297504
- nodeInfoSchema2 = {
297505
- type: "object",
297506
- required: ["nodeType", "kind"],
297507
- properties: {
297508
- nodeType: { enum: [...nodeTypeValues2] },
297509
- kind: { enum: ["block", "inline"] },
297510
- summary: nodeSummarySchema2,
297511
- text: { type: "string" },
297512
- nodes: arraySchema4({ type: "object" }),
297513
- properties: { type: "object" },
297514
- bodyText: { type: "string" },
297515
- bodyNodes: arraySchema4({ type: "object" })
297516
- },
297517
- additionalProperties: false
297518
- };
297519
- matchContextSchema2 = objectSchema4({
297520
- address: nodeAddressSchema2,
297521
- snippet: { type: "string" },
297522
- highlightRange: rangeSchema2,
297523
- textRanges: arraySchema4(textAddressSchema2),
297524
- target: selectionTargetSchema2
297525
- }, ["address", "snippet", "highlightRange"]);
297526
- unknownNodeDiagnosticSchema2 = objectSchema4({
297527
- message: { type: "string" },
297528
- address: nodeAddressSchema2,
297529
- hint: { type: "string" }
297530
- }, ["message"]);
297531
297464
  textSelectorSchema2 = objectSchema4({
297532
297465
  type: { const: "text", description: "Must be 'text' for text pattern search." },
297533
297466
  pattern: {
@@ -297554,9 +297487,6 @@ var init_schemas5 = __esm(() => {
297554
297487
  },
297555
297488
  kind: { enum: ["block", "inline"], description: "Filter: 'block' or 'inline'." }
297556
297489
  }, ["type"]);
297557
- selectorShorthandSchema2 = objectSchema4({
297558
- nodeType: { enum: [...nodeTypeValues2] }
297559
- }, ["nodeType"]);
297560
297490
  sdTextSelectorSchema2 = objectSchema4({
297561
297491
  type: { const: "text" },
297562
297492
  pattern: { type: "string" },
@@ -307266,7 +307196,7 @@ function executeBlocksList2(adapter, input) {
307266
307196
  continue;
307267
307197
  const index = result.total++;
307268
307198
  if (index >= offset && result.blocks.length < limit) {
307269
- const { text: fullText, ...summary } = block;
307199
+ const { text: _text, ...summary } = block;
307270
307200
  result.blocks.push(normalized.includeText ? block : summary);
307271
307201
  }
307272
307202
  }
@@ -307528,7 +307458,7 @@ function normalizeReviewDecideTarget2(target) {
307528
307458
  throw new DocumentApiValidationError2("INVALID_TARGET", "trackChanges.decide target.kind 'id' must include a non-empty `id` string.", { field: "target.id", value: id });
307529
307459
  }
307530
307460
  const story = readOptionalStory2(target, "target.story", false);
307531
- const side = readOptionalReplacementReviewDecideTargetSide2(target, "target.side");
307461
+ const side = readOptionalReplacementReviewDecideTargetSide2(target);
307532
307462
  const moveRole = readOptionalMoveRole2(target);
307533
307463
  return {
307534
307464
  kind: "id",
@@ -307627,7 +307557,7 @@ function normalizeReviewDecideTarget2(target) {
307627
307557
  }
307628
307558
  if (typeof target.id === "string" && target.id.length > 0) {
307629
307559
  const story = readOptionalStory2(target, "target.story", false);
307630
- const side = readOptionalReplacementReviewDecideTargetSide2(target, "target.side");
307560
+ const side = readOptionalReplacementReviewDecideTargetSide2(target);
307631
307561
  const moveRole = readOptionalMoveRole2(target);
307632
307562
  return {
307633
307563
  kind: "id",
@@ -307760,7 +307690,7 @@ function readOptionalMoveRole2(target) {
307760
307690
  }
307761
307691
  return moveRole;
307762
307692
  }
307763
- function readOptionalReplacementReviewDecideTargetSide2(target, field) {
307693
+ function readOptionalReplacementReviewDecideTargetSide2(target) {
307764
307694
  if (!("side" in target) || target.side === undefined || target.side === null)
307765
307695
  return;
307766
307696
  validateReplacementTargetSide2(target.side);
@@ -485234,6 +485164,7 @@ function materializeProjectionInternal(input, recovery) {
485234
485164
  storyId: storyIdHint,
485235
485165
  partUri: partUriHint,
485236
485166
  sourceXmlByteAligned,
485167
+ nativeControlBoundaries: controlledSnapshot != null,
485237
485168
  tableReplacements: tableReplacements.filter((replacement2) => replacement2.xml !== "" || replacement2.tableBlockIds.length > 0 || findCurrentTableSpanFromTableNodeId(base3.xml, replacement2.tableNodeId) != null).map((replacement2) => ({ ...replacement2, creationPlacement: undefined }))
485238
485169
  }) ?? base3;
485239
485170
  stories.push(projected2);
@@ -486917,12 +486848,14 @@ function composeTableStructuralProjection(input) {
486917
486848
  if (replacement2.creationPlacement && !previousOverlay) {
486918
486849
  resolvedCreations.push({ replacement: replacement2, span });
486919
486850
  }
486851
+ const inherited = baseNamespaces.at(span.start);
486852
+ const tableXml = input.nativeControlBoundaries && !replacement2.creationPlacement && !replacement2.relocation && !replacement2.rowReordered && replacement2.splitChildren.length === 0 ? composeControlledTableBoundaries(baseXml.slice(span.start, span.end), replacement2.xml, replacement2.tableNodeId, replacement2.tableBlockIds, storyBlocks, inherited) ?? replacement2.xml : replacement2.xml;
486920
486853
  const projected2 = {
486921
486854
  tableNodeId: replacement2.tableNodeId,
486922
486855
  lastPreparedTxId: replacement2.lastPreparedTxId,
486923
486856
  start: span.start,
486924
486857
  end: span.end,
486925
- xml: replacement2.splitSourceTableNodeId && replacement2.tableBlockIds.length === 0 ? "" : replacement2.creationPlacement && storyBlocks.some((block) => block.structuralRefs.tableNodeId === replacement2.tableNodeId) ? composeCreatedTableBlockXml(replacement2.xml, replacement2.tableNodeId, storyBlocks, replacement2.columnInsertions, replacement2.rowProperties, replacement2.cellProperties, replacement2.gridChangeXml, baseNamespaces.at(span.start)) : composeLiveTableBlockXml(replacement2.xml, replacement2.tableNodeId, replacement2.tableBlockIds, storyBlocks, replacement2.rowInsertions, replacement2.columnInsertions, replacement2.rowProperties, replacement2.cellProperties, replacement2.gridChangeXml, baseNamespaces.at(span.start)),
486858
+ xml: replacement2.splitSourceTableNodeId && replacement2.tableBlockIds.length === 0 ? "" : replacement2.creationPlacement && storyBlocks.some((block) => block.structuralRefs.tableNodeId === replacement2.tableNodeId) ? composeCreatedTableBlockXml(replacement2.xml, replacement2.tableNodeId, storyBlocks, replacement2.columnInsertions, replacement2.rowProperties, replacement2.cellProperties, replacement2.gridChangeXml, baseNamespaces.at(span.start)) : composeLiveTableBlockXml(tableXml, replacement2.tableNodeId, replacement2.tableBlockIds, storyBlocks, replacement2.rowInsertions, replacement2.columnInsertions, replacement2.rowProperties, replacement2.cellProperties, replacement2.gridChangeXml, inherited),
486926
486859
  affectedBlockIds: replacement2.tableBlockIds,
486927
486860
  suppressOverlay: false
486928
486861
  };
@@ -487585,6 +487518,176 @@ function nestedTableParagraphIds(tableXml, inherited) {
487585
487518
  return null;
487586
487519
  return [...new Set(native4.filter((range) => range.tag.localName === "p").flatMap((range) => range.tag.attributes.filter((attribute3) => attribute3.localName === "paraId" && attribute3.namespaceUri === "http://schemas.microsoft.com/office/word/2010/wordml").map((attribute3) => attribute3.value)))];
487587
487520
  }
487521
+ function composeControlledTableBoundaries(nativeXml, overlayXml, tableNodeId, overlayBlockIds, storyBlocks, inherited) {
487522
+ const blocks = new Map(storyBlocks.filter((block) => block.structuralRefs.tableNodeId === tableNodeId).map((block) => [block.blockId, block]));
487523
+ if (blocks.size === 0)
487524
+ return null;
487525
+ const retainedIds = new Set(overlayBlockIds);
487526
+ const inspect = (xml, native5) => {
487527
+ const parsed = collectXmlElementRanges(xml, { fragment: true, additionalNamespaces: inherited });
487528
+ const ranges = parsed.ranges.filter((range) => range.tag.namespaceUri === WORD_NAMESPACE10).sort((left, right) => left.start - right.start || right.end - left.end);
487529
+ const table = ranges.find((range) => range.tag.localName === "tbl");
487530
+ if (parsed.errors.length || !table || table.start !== 0 || table.end !== xml.length)
487531
+ return null;
487532
+ const nestedTables = ranges.filter((range) => range.tag.localName === "tbl" && range !== table);
487533
+ const outerRanges = ranges.filter((range) => !nestedTables.some((nested) => range.start >= nested.start && range.end <= nested.end));
487534
+ const allParagraphs = ranges.filter((range) => range.tag.localName === "p");
487535
+ const paragraphId5 = (paragraph4) => paragraph4.tag.attributes.find((attribute3) => attribute3.localName === "paraId" && attribute3.namespaceUri === WORD_2010_NAMESPACE3)?.value ?? null;
487536
+ const paragraphs2 = outerRanges.filter((range) => range.tag.localName === "p");
487537
+ const seen = new Set;
487538
+ const seenParagraphs = new Set;
487539
+ for (const paragraph4 of allParagraphs) {
487540
+ const id2 = paragraphId5(paragraph4);
487541
+ if (id2 && seenParagraphs.has(id2))
487542
+ return null;
487543
+ if (id2)
487544
+ seenParagraphs.add(id2);
487545
+ }
487546
+ const ownedParagraphs = new Set;
487547
+ const seenRows = new Set, seenCells = new Set;
487548
+ const owners3 = [];
487549
+ const rowProperties = new Map;
487550
+ const cellProperties = new Map;
487551
+ const opaqueCells = [];
487552
+ const opaqueRows = [];
487553
+ const removed = [];
487554
+ for (const row of tableRowSpans(xml, inherited)) {
487555
+ const cells = outerRanges.filter((range) => range.tag.localName === "tc" && range.start > row.start && range.end < row.end);
487556
+ const rowOwners = [];
487557
+ let rowId = null;
487558
+ for (const cell of cells) {
487559
+ if (nestedTables.some((nested) => nested.start > cell.start && nested.end < cell.end)) {
487560
+ if (allParagraphs.some((paragraph4) => paragraph4.start > cell.start && paragraph4.end < cell.end && blocks.has(paragraphId5(paragraph4) ?? "")))
487561
+ return null;
487562
+ opaqueCells.push(cell);
487563
+ rowOwners.push(null);
487564
+ continue;
487565
+ }
487566
+ const members = paragraphs2.filter((paragraph4) => paragraph4.start > cell.start && paragraph4.end < cell.end);
487567
+ const ids = members.map(paragraphId5);
487568
+ if (ids.some((id2) => !id2 || !native5 && !retainedIds.has(id2)))
487569
+ return null;
487570
+ for (const paragraph4 of members) {
487571
+ if (ownedParagraphs.has(paragraph4.start))
487572
+ return null;
487573
+ ownedParagraphs.add(paragraph4.start);
487574
+ removed.push(paragraph4);
487575
+ }
487576
+ const live = ids.flatMap((id2) => id2 && blocks.has(id2) ? [blocks.get(id2)] : []);
487577
+ const first = live[0]?.structuralRefs;
487578
+ if (!first?.rowNodeId || !first.cellNodeId || rowId && rowId !== first.rowNodeId || native5 && live.length !== members.length || new Set(live.map((block) => block.blockId)).size !== live.length || live.some((block) => block.structuralRefs.rowNodeId !== first.rowNodeId || block.structuralRefs.cellNodeId !== first.cellNodeId || seen.has(block.blockId)))
487579
+ return null;
487580
+ for (const block of live)
487581
+ seen.add(block.blockId);
487582
+ if (seenCells.has(first.cellNodeId))
487583
+ return null;
487584
+ seenCells.add(first.cellNodeId);
487585
+ rowId = first.rowNodeId;
487586
+ rowOwners.push(first.cellNodeId);
487587
+ cellProperties.set(first.cellNodeId, readDirectChildPropertyXml2(xml.slice(cell.start, cell.end), "tc", "tcPr"));
487588
+ }
487589
+ if (cells.length === 0 || rowId && seenRows.has(rowId))
487590
+ return null;
487591
+ if (rowId)
487592
+ seenRows.add(rowId);
487593
+ else
487594
+ opaqueRows.push(row);
487595
+ owners3.push([rowId, ...rowOwners]);
487596
+ if (rowId)
487597
+ rowProperties.set(rowId, readDirectChildPropertyXml2(xml.slice(row.start, row.end), "tr", "trPr"));
487598
+ }
487599
+ if (owners3.length === 0 || native5 && (seen.size !== blocks.size || [...blocks.keys()].some((id2) => !seen.has(id2))))
487600
+ return null;
487601
+ if (nestedTables.some((nested) => !opaqueCells.some((cell) => nested.start > cell.start && nested.end < cell.end)))
487602
+ return null;
487603
+ if (paragraphs2.some((paragraph4) => !ownedParagraphs.has(paragraph4.start) && !opaqueCells.some((cell) => paragraph4.start > cell.start && paragraph4.end < cell.end)))
487604
+ return null;
487605
+ const opaqueParagraphs = allParagraphs.filter((paragraph4) => opaqueCells.some((cell) => paragraph4.start > cell.start && paragraph4.end < cell.end));
487606
+ removed.push(...redundantOpaqueParagraphSpaceSpans(xml, opaqueParagraphs, parsed.ranges, inherited));
487607
+ for (const range of ranges) {
487608
+ if (opaqueCells.some((cell) => range.start >= cell.start && range.end <= cell.end) || opaqueRows.some((row) => range.start >= row.start && range.end <= row.end))
487609
+ continue;
487610
+ if (paragraphs2.some((paragraph4) => range.start >= paragraph4.start && range.end <= paragraph4.end))
487611
+ continue;
487612
+ if (["tblPr", "tblGrid", "trPr", "tcPr"].includes(range.tag.localName))
487613
+ removed.push(range);
487614
+ if (range.tag.localName === "sdt") {
487615
+ if (opaqueCells.some((cell) => range.start < cell.start && range.end > cell.end))
487616
+ continue;
487617
+ const contents = directElementSpans(xml, range.openEnd, range.closeStart, "sdtContent");
487618
+ const content3 = ranges.find((child) => child.tag.localName === "sdtContent" && child.start === contents[0]?.start);
487619
+ if (contents.length !== 1 || !content3)
487620
+ return null;
487621
+ removed.push({ start: range.start, end: content3.openEnd }, { start: content3.closeStart, end: range.end });
487622
+ }
487623
+ }
487624
+ let skeleton = "", cursor = 0;
487625
+ for (const span of removed.sort((left, right) => left.start - right.start || right.end - left.end)) {
487626
+ if (span.start < cursor)
487627
+ continue;
487628
+ skeleton += xml.slice(cursor, span.start);
487629
+ cursor = span.end;
487630
+ }
487631
+ return { skeleton: skeleton + xml.slice(cursor), owners: owners3, rowProperties, cellProperties };
487632
+ };
487633
+ const native4 = inspect(nativeXml, true), overlay = inspect(overlayXml, false);
487634
+ if (!native4 || !overlay || native4.skeleton !== overlay.skeleton || JSON.stringify(native4.owners) !== JSON.stringify(overlay.owners))
487635
+ return null;
487636
+ let composed = replaceLiveTableStructuralProperties(nativeXml, [...blocks.values()], overlay.rowProperties, overlay.cellProperties, inherited);
487637
+ composed = replaceDirectChildPropertyPrefix(composed, "tblGrid", readDirectChildPropertyXml2(overlayXml, "tbl", "tblGrid"));
487638
+ composed = replaceDirectChildPropertyPrefix(composed, "tblPr", readDirectChildPropertyXml2(overlayXml, "tbl", "tblPr"));
487639
+ return collectXmlElementRanges(composed, { fragment: true, additionalNamespaces: inherited }).errors.length ? null : composed;
487640
+ }
487641
+ function redundantOpaqueParagraphSpaceSpans(xml, paragraphs2, ranges, inherited) {
487642
+ const xmlNamespace = "http://www.w3.org/XML/1998/namespace";
487643
+ const isSpace = (attribute3) => attribute3.namespaceUri === xmlNamespace && attribute3.localName === "space";
487644
+ const removed = [];
487645
+ for (const range of ranges) {
487646
+ const space = range.tag.attributes.find(isSpace);
487647
+ if (range.tag.namespaceUri !== WORD_NAMESPACE10 || range.tag.localName !== "t" || space?.value !== "preserve" || !paragraphs2.some((paragraph4) => range.start > paragraph4.start && range.end < paragraph4.end) || ranges.some((ancestor) => ancestor.start < range.start && ancestor.end > range.end && ancestor.tag.attributes.some(isSpace)) || xml.slice(range.openEnd, range.closeStart).includes("<"))
487648
+ continue;
487649
+ let text4 = "";
487650
+ const decoded = walkXmlElements(xml.slice(range.start, range.end), {
487651
+ fragment: true,
487652
+ additionalNamespaces: { ...inherited, ...range.namespaceBindings },
487653
+ onText: (value3) => {
487654
+ text4 += value3;
487655
+ }
487656
+ });
487657
+ if (decoded.errors.length || !/^[^\s]+(?: [^\s]+)*$/u.test(text4))
487658
+ continue;
487659
+ let cursor = range.start + 1 + range.tag.name.length;
487660
+ while (cursor < range.openEnd) {
487661
+ const start = cursor;
487662
+ while (/[\x20\t\r\n]/.test(xml[cursor] ?? ""))
487663
+ cursor++;
487664
+ if (xml[cursor] === ">" || xml[cursor] === "/")
487665
+ break;
487666
+ const nameStart = cursor;
487667
+ while (cursor < range.openEnd && !/[\x20\t\r\n=]/.test(xml[cursor]))
487668
+ cursor++;
487669
+ const name = xml.slice(nameStart, cursor);
487670
+ while (/[\x20\t\r\n]/.test(xml[cursor] ?? ""))
487671
+ cursor++;
487672
+ if (xml[cursor++] !== "=")
487673
+ break;
487674
+ while (/[\x20\t\r\n]/.test(xml[cursor] ?? ""))
487675
+ cursor++;
487676
+ const quote2 = xml[cursor++];
487677
+ if (quote2 !== '"' && quote2 !== "'")
487678
+ break;
487679
+ const close = xml.indexOf(quote2, cursor);
487680
+ if (close < 0 || close >= range.openEnd)
487681
+ break;
487682
+ cursor = close + 1;
487683
+ if (name === space.name) {
487684
+ removed.push({ start, end: cursor });
487685
+ break;
487686
+ }
487687
+ }
487688
+ }
487689
+ return removed;
487690
+ }
487588
487691
  function composeLiveTableBlockXml(tableXml, tableNodeId, tableBlockIds, storyBlocks, rowInsertions, columnInsertions, rowProperties, cellProperties, gridChangeXml, inherited) {
487589
487692
  const nestedParagraphIds = nestedTableParagraphIds(tableXml, inherited);
487590
487693
  const liveTableBlocks = storyBlocks.filter((block) => block.structuralRefs.tableNodeId === tableNodeId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc/mcp",
3
- "version": "1.10.0-next.6",
3
+ "version": "1.10.0-next.8",
4
4
  "description": "Model Context Protocol server for SuperDoc, giving an AI agent tools to read and edit .docx files.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
@@ -24,13 +24,13 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@modelcontextprotocol/sdk": "^1.26.0",
27
- "@superdoc/sdk": "2.23.0-next.6",
27
+ "@superdoc/sdk": "2.23.0-next.8",
28
28
  "debug": "^4.4.3",
29
29
  "zod": "^4.3.6"
30
30
  },
31
31
  "devDependencies": {
32
- "superdoc": "2.26.0-next.7",
33
- "@superdoc/docx-engine": "0.25.0-next.7",
32
+ "superdoc": "2.26.0-next.8",
33
+ "@superdoc/docx-engine": "0.25.0-next.8",
34
34
  "@superdoc/document-api": "0.1.0-alpha.0",
35
35
  "@types/bun": "^1.3.8",
36
36
  "@types/node": "22.19.2",