indesign-cli 0.2.0__py3-none-any.whl
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.
- cli_anything/indesign/README.md +32 -0
- cli_anything/indesign/__init__.py +1 -0
- cli_anything/indesign/__main__.py +5 -0
- cli_anything/indesign/core/artifacts.py +57 -0
- cli_anything/indesign/core/catalog.py +405 -0
- cli_anything/indesign/core/domains.py +178 -0
- cli_anything/indesign/core/envelope.py +65 -0
- cli_anything/indesign/core/errors.py +30 -0
- cli_anything/indesign/core/health.py +46 -0
- cli_anything/indesign/core/hidden_backend.py +116 -0
- cli_anything/indesign/core/hidden_handler_schemas.py +223 -0
- cli_anything/indesign/core/mcp_backend.py +152 -0
- cli_anything/indesign/core/node_setup.py +35 -0
- cli_anything/indesign/core/paths.py +41 -0
- cli_anything/indesign/core/plugins/__init__.py +2 -0
- cli_anything/indesign/core/plugins/backend.py +90 -0
- cli_anything/indesign/core/plugins/discovery.py +69 -0
- cli_anything/indesign/core/plugins/host_actions.py +76 -0
- cli_anything/indesign/core/plugins/install.py +38 -0
- cli_anything/indesign/core/plugins/manifest.py +279 -0
- cli_anything/indesign/core/plugins/validate.py +181 -0
- cli_anything/indesign/core/router.py +217 -0
- cli_anything/indesign/core/runtime.py +59 -0
- cli_anything/indesign/core/scripts.py +44 -0
- cli_anything/indesign/core/session.py +68 -0
- cli_anything/indesign/indesign_cli.py +320 -0
- cli_anything/indesign/node/hidden_handler_bridge.mjs +111 -0
- cli_anything/indesign/server/package-lock.json +168 -0
- cli_anything/indesign/server/package.json +45 -0
- cli_anything/indesign/server/src/advanced/index.js +76 -0
- cli_anything/indesign/server/src/core/InDesignMCPServer.js +273 -0
- cli_anything/indesign/server/src/core/scriptExecutor.js +271 -0
- cli_anything/indesign/server/src/core/sessionManager.js +545 -0
- cli_anything/indesign/server/src/handlers/advancedTemplateHandlers.js +1072 -0
- cli_anything/indesign/server/src/handlers/bookHandlers.js +490 -0
- cli_anything/indesign/server/src/handlers/documentHandlers.js +1472 -0
- cli_anything/indesign/server/src/handlers/exportHandlers.js +208 -0
- cli_anything/indesign/server/src/handlers/graphicsHandlers.js +605 -0
- cli_anything/indesign/server/src/handlers/groupHandlers.js +358 -0
- cli_anything/indesign/server/src/handlers/helpHandlers.js +347 -0
- cli_anything/indesign/server/src/handlers/index.js +77 -0
- cli_anything/indesign/server/src/handlers/layerHandlers.js +75 -0
- cli_anything/indesign/server/src/handlers/masterSpreadHandlers.js +451 -0
- cli_anything/indesign/server/src/handlers/pageHandlers.js +698 -0
- cli_anything/indesign/server/src/handlers/pageItemHandlers.js +704 -0
- cli_anything/indesign/server/src/handlers/presentationHandlers.js +220 -0
- cli_anything/indesign/server/src/handlers/spreadHandlers.js +348 -0
- cli_anything/indesign/server/src/handlers/styleHandlers.js +458 -0
- cli_anything/indesign/server/src/handlers/textHandlers.js +431 -0
- cli_anything/indesign/server/src/handlers/utilityHandlers.js +83 -0
- cli_anything/indesign/server/src/index.js +17 -0
- cli_anything/indesign/server/src/types/index.js +106 -0
- cli_anything/indesign/server/src/types/toolDefinitionsAdvancedTemplates.js +144 -0
- cli_anything/indesign/server/src/types/toolDefinitionsBook.js +224 -0
- cli_anything/indesign/server/src/types/toolDefinitionsContent.js +353 -0
- cli_anything/indesign/server/src/types/toolDefinitionsDocument.js +409 -0
- cli_anything/indesign/server/src/types/toolDefinitionsExport.js +65 -0
- cli_anything/indesign/server/src/types/toolDefinitionsLayer.js +40 -0
- cli_anything/indesign/server/src/types/toolDefinitionsMasterSpread.js +160 -0
- cli_anything/indesign/server/src/types/toolDefinitionsPage.js +271 -0
- cli_anything/indesign/server/src/types/toolDefinitionsPageItemGroup.js +437 -0
- cli_anything/indesign/server/src/types/toolDefinitionsPresentation.js +83 -0
- cli_anything/indesign/server/src/types/toolDefinitionsSpread.js +158 -0
- cli_anything/indesign/server/src/types/toolDefinitionsUtility.js +40 -0
- cli_anything/indesign/server/src/utils/stringUtils.js +107 -0
- cli_anything/indesign/skills/SKILL.md +198 -0
- indesign_cli-0.2.0.dist-info/METADATA +267 -0
- indesign_cli-0.2.0.dist-info/RECORD +72 -0
- indesign_cli-0.2.0.dist-info/WHEEL +5 -0
- indesign_cli-0.2.0.dist-info/entry_points.txt +3 -0
- indesign_cli-0.2.0.dist-info/licenses/LICENSE +21 -0
- indesign_cli-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page tool definitions for InDesign MCP Server
|
|
3
|
+
* Page management and advanced page properties
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const pageToolDefinitions = [
|
|
7
|
+
// =================== BASIC PAGE MANAGEMENT ===================
|
|
8
|
+
{
|
|
9
|
+
name: 'add_page',
|
|
10
|
+
description: 'Add a new page to the document',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
position: { type: 'string', enum: ['AT_END', 'AT_BEGINNING', 'BEFORE', 'AFTER'], default: 'AT_END' },
|
|
15
|
+
referencePage: { type: 'number', description: 'Reference page index (for BEFORE/AFTER positioning)' },
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'delete_page',
|
|
21
|
+
description: 'Delete a page from the document',
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
pageIndex: { type: 'number', description: 'Index of the page to delete' },
|
|
26
|
+
},
|
|
27
|
+
required: ['pageIndex'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'duplicate_page',
|
|
32
|
+
description: 'Duplicate a page',
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: {
|
|
36
|
+
pageIndex: { type: 'number', description: 'Page index to duplicate' },
|
|
37
|
+
position: { type: 'string', enum: ['AT_END', 'AT_BEGINNING', 'BEFORE', 'AFTER'], default: 'AT_END' },
|
|
38
|
+
referencePageIndex: { type: 'number', description: 'Reference page index (for BEFORE/AFTER positioning)' },
|
|
39
|
+
},
|
|
40
|
+
required: ['pageIndex'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'navigate_to_page',
|
|
45
|
+
description: 'Navigate to a specific page',
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
pageIndex: { type: 'number', description: 'Page index to navigate to' },
|
|
50
|
+
},
|
|
51
|
+
required: ['pageIndex'],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'get_page_info',
|
|
56
|
+
description: 'Get detailed information about a specific page',
|
|
57
|
+
inputSchema: {
|
|
58
|
+
type: 'object',
|
|
59
|
+
properties: {
|
|
60
|
+
pageIndex: { type: 'number', description: 'Page index (0-based)' },
|
|
61
|
+
},
|
|
62
|
+
required: ['pageIndex'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'move_page',
|
|
67
|
+
description: 'Move a page to a different position',
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
pageIndex: { type: 'number', description: 'Page index to move' },
|
|
72
|
+
position: { type: 'string', enum: ['AT_END', 'AT_BEGINNING', 'BEFORE', 'AFTER'], default: 'AT_END' },
|
|
73
|
+
referencePageIndex: { type: 'number', description: 'Reference page index (for BEFORE/AFTER positioning)' },
|
|
74
|
+
binding: { type: 'string', enum: ['DEFAULT_VALUE', 'LEFT_ALIGN', 'RIGHT_ALIGN'], default: 'DEFAULT_VALUE' },
|
|
75
|
+
},
|
|
76
|
+
required: ['pageIndex'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
// =================== ADVANCED PAGE PROPERTIES ===================
|
|
81
|
+
{
|
|
82
|
+
name: 'set_page_properties',
|
|
83
|
+
description: 'Set properties for a page',
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: 'object',
|
|
86
|
+
properties: {
|
|
87
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
88
|
+
label: { type: 'string', description: 'Page label' },
|
|
89
|
+
pageColor: { type: 'string', description: 'Page color (RGB values as comma-separated string or UI color name)' },
|
|
90
|
+
optionalPage: { type: 'boolean', description: 'Optional page for HTML5 pagination' },
|
|
91
|
+
layoutRule: { type: 'string', enum: ['GUIDE_BASED', 'OBJECT_BASED', 'OFF', 'PRESERVE_EXISTING', 'RECENTER', 'SCALE', 'USE_MASTER'], description: 'Layout rule' },
|
|
92
|
+
snapshotBlendingMode: { type: 'string', enum: ['FULL_SNAPSHOT_BLENDING', 'IGNORE_LAYOUT_SNAPSHOTS', 'LIMITED_SNAPSHOT_BLENDING', 'USE_NEAREST_SNAPSHOT'], description: 'Snapshot blending mode' },
|
|
93
|
+
appliedTrapPreset: { type: 'string', description: 'Trap preset name to apply' },
|
|
94
|
+
},
|
|
95
|
+
required: ['pageIndex'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'adjust_page_layout',
|
|
100
|
+
description: 'Adjust page layout with new dimensions and margins',
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: 'object',
|
|
103
|
+
properties: {
|
|
104
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
105
|
+
width: { type: 'string', description: 'Page width (e.g., "600px", "8.5in")' },
|
|
106
|
+
height: { type: 'string', description: 'Page height (e.g., "800px", "11in")' },
|
|
107
|
+
bleedInside: { type: 'string', description: 'Inside bleed (e.g., "3mm")' },
|
|
108
|
+
bleedTop: { type: 'string', description: 'Top bleed (e.g., "3mm")' },
|
|
109
|
+
bleedOutside: { type: 'string', description: 'Outside bleed (e.g., "3mm")' },
|
|
110
|
+
bleedBottom: { type: 'string', description: 'Bottom bleed (e.g., "3mm")' },
|
|
111
|
+
leftMargin: { type: 'string', description: 'Left margin (e.g., "20mm")' },
|
|
112
|
+
topMargin: { type: 'string', description: 'Top margin (e.g., "20mm")' },
|
|
113
|
+
rightMargin: { type: 'string', description: 'Right margin (e.g., "20mm")' },
|
|
114
|
+
bottomMargin: { type: 'string', description: 'Bottom margin (e.g., "20mm")' },
|
|
115
|
+
},
|
|
116
|
+
required: ['pageIndex'],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'resize_page',
|
|
121
|
+
description: 'Resize a page',
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties: {
|
|
125
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
126
|
+
width: { type: 'number', description: 'New width in mm' },
|
|
127
|
+
height: { type: 'number', description: 'New height in mm' },
|
|
128
|
+
resizeMethod: { type: 'string', enum: ['REPLACING_CURRENT_DIMENSIONS_WITH', 'MULTIPLYING_CURRENT_DIMENSIONS_BY', 'ADDING_CURRENT_DIMENSIONS_TO', 'RESHAPING_AREA_TO_RATIO', 'RESHAPING_BORDER_TO_RATIO'], default: 'REPLACING_CURRENT_DIMENSIONS_WITH' },
|
|
129
|
+
anchorPoint: { type: 'string', enum: ['TOP_LEFT_ANCHOR', 'TOP_CENTER_ANCHOR', 'TOP_RIGHT_ANCHOR', 'LEFT_CENTER_ANCHOR', 'CENTER_ANCHOR', 'RIGHT_CENTER_ANCHOR', 'BOTTOM_LEFT_ANCHOR', 'BOTTOM_CENTER_ANCHOR', 'BOTTOM_RIGHT_ANCHOR'], default: 'CENTER_ANCHOR' },
|
|
130
|
+
coordinateSpace: { type: 'string', enum: ['PAGE_COORDINATES', 'SPREAD_COORDINATES', 'PASTEBOARD_COORDINATES'], default: 'PAGE_COORDINATES' },
|
|
131
|
+
},
|
|
132
|
+
required: ['pageIndex'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'place_file_on_page',
|
|
137
|
+
description: 'Place a file on a page',
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: {
|
|
141
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
142
|
+
filePath: { type: 'string', description: 'Path to file to place' },
|
|
143
|
+
x: { type: 'number', description: 'X position in mm', default: 10 },
|
|
144
|
+
y: { type: 'number', description: 'Y position in mm', default: 10 },
|
|
145
|
+
layerName: { type: 'string', description: 'Layer name to place on' },
|
|
146
|
+
showingOptions: { type: 'boolean', description: 'Show import options dialog', default: false },
|
|
147
|
+
autoflowing: { type: 'boolean', description: 'Autoflow placed text', default: false },
|
|
148
|
+
},
|
|
149
|
+
required: ['pageIndex', 'filePath'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'place_xml_on_page',
|
|
154
|
+
description: 'Place XML content on a page',
|
|
155
|
+
inputSchema: {
|
|
156
|
+
type: 'object',
|
|
157
|
+
properties: {
|
|
158
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
159
|
+
xmlElementName: { type: 'string', description: 'XML element name to place' },
|
|
160
|
+
x: { type: 'number', description: 'X position in mm', default: 10 },
|
|
161
|
+
y: { type: 'number', description: 'Y position in mm', default: 10 },
|
|
162
|
+
autoflowing: { type: 'boolean', description: 'Autoflow placed text', default: false },
|
|
163
|
+
},
|
|
164
|
+
required: ['pageIndex', 'xmlElementName'],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: 'snapshot_page_layout',
|
|
169
|
+
description: 'Create a snapshot of the current page layout',
|
|
170
|
+
inputSchema: {
|
|
171
|
+
type: 'object',
|
|
172
|
+
properties: {
|
|
173
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
174
|
+
},
|
|
175
|
+
required: ['pageIndex'],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: 'delete_page_layout_snapshot',
|
|
180
|
+
description: 'Delete the layout snapshot for a page',
|
|
181
|
+
inputSchema: {
|
|
182
|
+
type: 'object',
|
|
183
|
+
properties: {
|
|
184
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
185
|
+
},
|
|
186
|
+
required: ['pageIndex'],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'delete_all_page_layout_snapshots',
|
|
191
|
+
description: 'Delete all layout snapshots for a page',
|
|
192
|
+
inputSchema: {
|
|
193
|
+
type: 'object',
|
|
194
|
+
properties: {
|
|
195
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
196
|
+
},
|
|
197
|
+
required: ['pageIndex'],
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'reframe_page',
|
|
202
|
+
description: 'Reframe (resize) a page',
|
|
203
|
+
inputSchema: {
|
|
204
|
+
type: 'object',
|
|
205
|
+
properties: {
|
|
206
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
207
|
+
x1: { type: 'number', description: 'Top-left X coordinate in mm' },
|
|
208
|
+
y1: { type: 'number', description: 'Top-left Y coordinate in mm' },
|
|
209
|
+
x2: { type: 'number', description: 'Bottom-right X coordinate in mm' },
|
|
210
|
+
y2: { type: 'number', description: 'Bottom-right Y coordinate in mm' },
|
|
211
|
+
coordinateSpace: { type: 'string', enum: ['PAGE_COORDINATES', 'SPREAD_COORDINATES', 'PASTEBOARD_COORDINATES'], default: 'PAGE_COORDINATES' },
|
|
212
|
+
},
|
|
213
|
+
required: ['pageIndex', 'x1', 'y1', 'x2', 'y2'],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'create_page_guides',
|
|
218
|
+
description: 'Create guides on a page',
|
|
219
|
+
inputSchema: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
properties: {
|
|
222
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
223
|
+
numberOfRows: { type: 'number', description: 'Number of rows', default: 0 },
|
|
224
|
+
numberOfColumns: { type: 'number', description: 'Number of columns', default: 0 },
|
|
225
|
+
rowGutter: { type: 'number', description: 'Row gutter in mm', default: 5 },
|
|
226
|
+
columnGutter: { type: 'number', description: 'Column gutter in mm', default: 5 },
|
|
227
|
+
guideColor: { type: 'string', description: 'Guide color (RGB values as comma-separated string or UI color name)', default: 'BLUE' },
|
|
228
|
+
fitMargins: { type: 'boolean', description: 'Fit guides to margins', default: true },
|
|
229
|
+
removeExisting: { type: 'boolean', description: 'Remove existing guides', default: false },
|
|
230
|
+
layerName: { type: 'string', description: 'Layer name to create guides on' },
|
|
231
|
+
},
|
|
232
|
+
required: ['pageIndex'],
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'select_page',
|
|
237
|
+
description: 'Select a page',
|
|
238
|
+
inputSchema: {
|
|
239
|
+
type: 'object',
|
|
240
|
+
properties: {
|
|
241
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
242
|
+
selectionMode: { type: 'string', enum: ['REPLACE_WITH', 'ADD_TO', 'REMOVE_FROM'], default: 'REPLACE_WITH' },
|
|
243
|
+
},
|
|
244
|
+
required: ['pageIndex'],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: 'get_page_content_summary',
|
|
249
|
+
description: 'Get a summary of content on a page',
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
pageIndex: { type: 'number', description: 'Page index' },
|
|
254
|
+
},
|
|
255
|
+
required: ['pageIndex'],
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: 'set_page_background',
|
|
260
|
+
description: 'Set page background by creating a full-page rectangle with specified color',
|
|
261
|
+
inputSchema: {
|
|
262
|
+
type: 'object',
|
|
263
|
+
properties: {
|
|
264
|
+
pageIndex: { type: 'number', description: 'Page index', default: 0 },
|
|
265
|
+
backgroundColor: { type: 'string', description: 'Background color name (must be a color swatch in the document)', default: 'White' },
|
|
266
|
+
opacity: { type: 'number', description: 'Background opacity percentage (0-100)', default: 100 },
|
|
267
|
+
},
|
|
268
|
+
required: [],
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
];
|