@alisaitteke/photoshop-mcp 0.1.0
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/.prettierrc +9 -0
- package/README.md +1300 -0
- package/dist/api/batch-play.d.ts +62 -0
- package/dist/api/batch-play.d.ts.map +1 -0
- package/dist/api/batch-play.js +131 -0
- package/dist/api/batch-play.js.map +1 -0
- package/dist/api/extendscript.d.ts +258 -0
- package/dist/api/extendscript.d.ts.map +1 -0
- package/dist/api/extendscript.js +1437 -0
- package/dist/api/extendscript.js.map +1 -0
- package/dist/api/photoshop-api.d.ts +20 -0
- package/dist/api/photoshop-api.d.ts.map +1 -0
- package/dist/api/photoshop-api.js +88 -0
- package/dist/api/photoshop-api.js.map +1 -0
- package/dist/core/server.d.ts +14 -0
- package/dist/core/server.d.ts.map +1 -0
- package/dist/core/server.js +191 -0
- package/dist/core/server.js.map +1 -0
- package/dist/core/session.d.ts +24 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +83 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/tool-registry.d.ts +23 -0
- package/dist/core/tool-registry.d.ts.map +1 -0
- package/dist/core/tool-registry.js +55 -0
- package/dist/core/tool-registry.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/platform/connection.d.ts +20 -0
- package/dist/platform/connection.d.ts.map +1 -0
- package/dist/platform/connection.js +94 -0
- package/dist/platform/connection.js.map +1 -0
- package/dist/platform/detector.d.ts +19 -0
- package/dist/platform/detector.d.ts.map +1 -0
- package/dist/platform/detector.js +63 -0
- package/dist/platform/detector.js.map +1 -0
- package/dist/platform/macos-detector.d.ts +13 -0
- package/dist/platform/macos-detector.d.ts.map +1 -0
- package/dist/platform/macos-detector.js +145 -0
- package/dist/platform/macos-detector.js.map +1 -0
- package/dist/platform/macos-executor.d.ts +22 -0
- package/dist/platform/macos-executor.d.ts.map +1 -0
- package/dist/platform/macos-executor.js +161 -0
- package/dist/platform/macos-executor.js.map +1 -0
- package/dist/platform/script-executor.d.ts +23 -0
- package/dist/platform/script-executor.d.ts.map +1 -0
- package/dist/platform/script-executor.js +2 -0
- package/dist/platform/script-executor.js.map +1 -0
- package/dist/platform/windows-detector.d.ts +14 -0
- package/dist/platform/windows-detector.d.ts.map +1 -0
- package/dist/platform/windows-detector.js +173 -0
- package/dist/platform/windows-detector.js.map +1 -0
- package/dist/platform/windows-executor.d.ts +15 -0
- package/dist/platform/windows-executor.d.ts.map +1 -0
- package/dist/platform/windows-executor.js +148 -0
- package/dist/platform/windows-executor.js.map +1 -0
- package/dist/tools/action-tools.d.ts +4 -0
- package/dist/tools/action-tools.d.ts.map +1 -0
- package/dist/tools/action-tools.js +102 -0
- package/dist/tools/action-tools.js.map +1 -0
- package/dist/tools/adjustment-tools.d.ts +4 -0
- package/dist/tools/adjustment-tools.d.ts.map +1 -0
- package/dist/tools/adjustment-tools.js +274 -0
- package/dist/tools/adjustment-tools.js.map +1 -0
- package/dist/tools/document-tools.d.ts +4 -0
- package/dist/tools/document-tools.d.ts.map +1 -0
- package/dist/tools/document-tools.js +230 -0
- package/dist/tools/document-tools.js.map +1 -0
- package/dist/tools/filter-tools.d.ts +4 -0
- package/dist/tools/filter-tools.d.ts.map +1 -0
- package/dist/tools/filter-tools.js +230 -0
- package/dist/tools/filter-tools.js.map +1 -0
- package/dist/tools/history-tools.d.ts +4 -0
- package/dist/tools/history-tools.d.ts.map +1 -0
- package/dist/tools/history-tools.js +137 -0
- package/dist/tools/history-tools.js.map +1 -0
- package/dist/tools/image-placement-tools.d.ts +4 -0
- package/dist/tools/image-placement-tools.d.ts.map +1 -0
- package/dist/tools/image-placement-tools.js +109 -0
- package/dist/tools/image-placement-tools.js.map +1 -0
- package/dist/tools/image-tools.d.ts +4 -0
- package/dist/tools/image-tools.d.ts.map +1 -0
- package/dist/tools/image-tools.js +123 -0
- package/dist/tools/image-tools.js.map +1 -0
- package/dist/tools/layer-ordering-tools.d.ts +4 -0
- package/dist/tools/layer-ordering-tools.d.ts.map +1 -0
- package/dist/tools/layer-ordering-tools.js +210 -0
- package/dist/tools/layer-ordering-tools.js.map +1 -0
- package/dist/tools/layer-properties-tools.d.ts +4 -0
- package/dist/tools/layer-properties-tools.d.ts.map +1 -0
- package/dist/tools/layer-properties-tools.js +421 -0
- package/dist/tools/layer-properties-tools.js.map +1 -0
- package/dist/tools/layer-tools.d.ts +4 -0
- package/dist/tools/layer-tools.d.ts.map +1 -0
- package/dist/tools/layer-tools.js +251 -0
- package/dist/tools/layer-tools.js.map +1 -0
- package/dist/tools/layer-transform-tools.d.ts +4 -0
- package/dist/tools/layer-transform-tools.d.ts.map +1 -0
- package/dist/tools/layer-transform-tools.js +199 -0
- package/dist/tools/layer-transform-tools.js.map +1 -0
- package/dist/tools/selection-tools.d.ts +4 -0
- package/dist/tools/selection-tools.d.ts.map +1 -0
- package/dist/tools/selection-tools.js +295 -0
- package/dist/tools/selection-tools.js.map +1 -0
- package/dist/tools/text-tools.d.ts +4 -0
- package/dist/tools/text-tools.d.ts.map +1 -0
- package/dist/tools/text-tools.js +210 -0
- package/dist/tools/text-tools.js.map +1 -0
- package/dist/utils/logger.d.ts +17 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +43 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { PhotoshopAPIFactory } from '../api/photoshop-api.js';
|
|
2
|
+
import { ExtendScriptSnippets } from '../api/extendscript.js';
|
|
3
|
+
export function createLayerOrderingTools(connection) {
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
tool: {
|
|
7
|
+
name: 'photoshop_move_layer_to_position',
|
|
8
|
+
description: 'Move the active layer relative to another layer',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
targetLayerName: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Name of the layer to move relative to',
|
|
15
|
+
},
|
|
16
|
+
position: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Position relative to target layer',
|
|
19
|
+
enum: ['ABOVE', 'BELOW', 'TOP', 'BOTTOM'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
required: ['targetLayerName', 'position'],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
handler: async (args) => moveLayerToPosition(connection, args),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
tool: {
|
|
29
|
+
name: 'photoshop_move_layer_to_top',
|
|
30
|
+
description: 'Move the active layer to the top of the layer stack',
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
handler: async () => moveLayerToTop(connection),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
tool: {
|
|
40
|
+
name: 'photoshop_move_layer_to_bottom',
|
|
41
|
+
description: 'Move the active layer to the bottom of the layer stack',
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
handler: async () => moveLayerToBottom(connection),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
tool: {
|
|
51
|
+
name: 'photoshop_move_layer_up',
|
|
52
|
+
description: 'Move the active layer up one position in the layer stack',
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
handler: async () => moveLayerUp(connection),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
tool: {
|
|
62
|
+
name: 'photoshop_move_layer_down',
|
|
63
|
+
description: 'Move the active layer down one position in the layer stack',
|
|
64
|
+
inputSchema: {
|
|
65
|
+
type: 'object',
|
|
66
|
+
properties: {},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
handler: async () => moveLayerDown(connection),
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
async function moveLayerToPosition(connection, args) {
|
|
74
|
+
const targetLayerName = args.targetLayerName;
|
|
75
|
+
const position = args.position;
|
|
76
|
+
try {
|
|
77
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
78
|
+
const api = await apiFactory.createAPI();
|
|
79
|
+
const script = ExtendScriptSnippets.moveLayerToPosition(targetLayerName, position);
|
|
80
|
+
const result = await api.executeScript(script);
|
|
81
|
+
return {
|
|
82
|
+
content: [
|
|
83
|
+
{
|
|
84
|
+
type: 'text',
|
|
85
|
+
text: `Layer moved ${position} "${targetLayerName}"\nResult: ${JSON.stringify(result)}`,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
return {
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: 'text',
|
|
95
|
+
text: `Error moving layer: ${error instanceof Error ? error.message : String(error)}`,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
isError: true,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async function moveLayerToTop(connection) {
|
|
103
|
+
try {
|
|
104
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
105
|
+
const api = await apiFactory.createAPI();
|
|
106
|
+
const script = ExtendScriptSnippets.moveLayerToTop();
|
|
107
|
+
const result = await api.executeScript(script);
|
|
108
|
+
return {
|
|
109
|
+
content: [
|
|
110
|
+
{
|
|
111
|
+
type: 'text',
|
|
112
|
+
text: `Layer moved to top\nResult: ${JSON.stringify(result)}`,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
return {
|
|
119
|
+
content: [
|
|
120
|
+
{
|
|
121
|
+
type: 'text',
|
|
122
|
+
text: `Error moving layer to top: ${error instanceof Error ? error.message : String(error)}`,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
isError: true,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async function moveLayerToBottom(connection) {
|
|
130
|
+
try {
|
|
131
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
132
|
+
const api = await apiFactory.createAPI();
|
|
133
|
+
const script = ExtendScriptSnippets.moveLayerToBottom();
|
|
134
|
+
const result = await api.executeScript(script);
|
|
135
|
+
return {
|
|
136
|
+
content: [
|
|
137
|
+
{
|
|
138
|
+
type: 'text',
|
|
139
|
+
text: `Layer moved to bottom\nResult: ${JSON.stringify(result)}`,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
return {
|
|
146
|
+
content: [
|
|
147
|
+
{
|
|
148
|
+
type: 'text',
|
|
149
|
+
text: `Error moving layer to bottom: ${error instanceof Error ? error.message : String(error)}`,
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
isError: true,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
async function moveLayerUp(connection) {
|
|
157
|
+
try {
|
|
158
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
159
|
+
const api = await apiFactory.createAPI();
|
|
160
|
+
const script = ExtendScriptSnippets.moveLayerUp();
|
|
161
|
+
const result = await api.executeScript(script);
|
|
162
|
+
return {
|
|
163
|
+
content: [
|
|
164
|
+
{
|
|
165
|
+
type: 'text',
|
|
166
|
+
text: `Layer moved up\nResult: ${JSON.stringify(result)}`,
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
return {
|
|
173
|
+
content: [
|
|
174
|
+
{
|
|
175
|
+
type: 'text',
|
|
176
|
+
text: `Error moving layer up: ${error instanceof Error ? error.message : String(error)}`,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
isError: true,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
async function moveLayerDown(connection) {
|
|
184
|
+
try {
|
|
185
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
186
|
+
const api = await apiFactory.createAPI();
|
|
187
|
+
const script = ExtendScriptSnippets.moveLayerDown();
|
|
188
|
+
const result = await api.executeScript(script);
|
|
189
|
+
return {
|
|
190
|
+
content: [
|
|
191
|
+
{
|
|
192
|
+
type: 'text',
|
|
193
|
+
text: `Layer moved down\nResult: ${JSON.stringify(result)}`,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
return {
|
|
200
|
+
content: [
|
|
201
|
+
{
|
|
202
|
+
type: 'text',
|
|
203
|
+
text: `Error moving layer down: ${error instanceof Error ? error.message : String(error)}`,
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
isError: true,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=layer-ordering-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-ordering-tools.js","sourceRoot":"","sources":["../../src/tools/layer-ordering-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,UAAU,wBAAwB,CAAC,UAA+B;IACtE,OAAO;QACL;YACE,IAAI,EAAE;gBACJ,IAAI,EAAE,kCAAkC;gBACxC,WAAW,EAAE,iDAAiD;gBAC9D,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,eAAe,EAAE;4BACf,IAAI,EAAE,QAAQ;4BACd,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EAAE;iBAC5D;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,4BAA4B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;iBAC3F;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ToolDefinition } from '../core/tool-registry.js';
|
|
2
|
+
import { PhotoshopConnection } from '../platform/connection.js';
|
|
3
|
+
export declare function createLayerPropertiesTools(connection: PhotoshopConnection): ToolDefinition[];
|
|
4
|
+
//# sourceMappingURL=layer-properties-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-properties-tools.d.ts","sourceRoot":"","sources":["../../src/tools/layer-properties-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,mBAAmB,GAAG,cAAc,EAAE,CAwK5F"}
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { PhotoshopAPIFactory } from '../api/photoshop-api.js';
|
|
2
|
+
import { ExtendScriptSnippets } from '../api/extendscript.js';
|
|
3
|
+
export function createLayerPropertiesTools(connection) {
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
tool: {
|
|
7
|
+
name: 'photoshop_rasterize_layer',
|
|
8
|
+
description: 'Rasterize the active layer (convert text/smart object to normal layer)',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
handler: async () => rasterizeLayer(connection),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
tool: {
|
|
18
|
+
name: 'photoshop_set_layer_opacity',
|
|
19
|
+
description: 'Set the opacity of the active layer',
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
opacity: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
description: 'Opacity value (0-100)',
|
|
26
|
+
minimum: 0,
|
|
27
|
+
maximum: 100,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
required: ['opacity'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
handler: async (args) => setLayerOpacity(connection, args),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
tool: {
|
|
37
|
+
name: 'photoshop_set_layer_blend_mode',
|
|
38
|
+
description: 'Set the blend mode of the active layer',
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: {
|
|
42
|
+
blendMode: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Blend mode name',
|
|
45
|
+
enum: [
|
|
46
|
+
'NORMAL',
|
|
47
|
+
'DISSOLVE',
|
|
48
|
+
'DARKEN',
|
|
49
|
+
'MULTIPLY',
|
|
50
|
+
'COLORBURN',
|
|
51
|
+
'LINEARBURN',
|
|
52
|
+
'DARKERCOLOR',
|
|
53
|
+
'LIGHTEN',
|
|
54
|
+
'SCREEN',
|
|
55
|
+
'COLORDODGE',
|
|
56
|
+
'LINEARDODGE',
|
|
57
|
+
'LIGHTERCOLOR',
|
|
58
|
+
'OVERLAY',
|
|
59
|
+
'SOFTLIGHT',
|
|
60
|
+
'HARDLIGHT',
|
|
61
|
+
'VIVIDLIGHT',
|
|
62
|
+
'LINEARLIGHT',
|
|
63
|
+
'PINLIGHT',
|
|
64
|
+
'HARDMIX',
|
|
65
|
+
'DIFFERENCE',
|
|
66
|
+
'EXCLUSION',
|
|
67
|
+
'SUBTRACT',
|
|
68
|
+
'DIVIDE',
|
|
69
|
+
'HUE',
|
|
70
|
+
'SATURATION',
|
|
71
|
+
'COLOR',
|
|
72
|
+
'LUMINOSITY',
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
required: ['blendMode'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
handler: async (args) => setLayerBlendMode(connection, args),
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
tool: {
|
|
83
|
+
name: 'photoshop_set_layer_visibility',
|
|
84
|
+
description: 'Show or hide the active layer',
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
visible: {
|
|
89
|
+
type: 'boolean',
|
|
90
|
+
description: 'Whether the layer should be visible',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
required: ['visible'],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
handler: async (args) => setLayerVisibility(connection, args),
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
tool: {
|
|
100
|
+
name: 'photoshop_set_layer_locked',
|
|
101
|
+
description: 'Lock or unlock the active layer',
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: 'object',
|
|
104
|
+
properties: {
|
|
105
|
+
locked: {
|
|
106
|
+
type: 'boolean',
|
|
107
|
+
description: 'Whether the layer should be locked',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
required: ['locked'],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
handler: async (args) => setLayerLocked(connection, args),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
tool: {
|
|
117
|
+
name: 'photoshop_rename_layer',
|
|
118
|
+
description: 'Rename the active layer',
|
|
119
|
+
inputSchema: {
|
|
120
|
+
type: 'object',
|
|
121
|
+
properties: {
|
|
122
|
+
name: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'New name for the layer',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
required: ['name'],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
handler: async (args) => renameLayer(connection, args),
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
tool: {
|
|
134
|
+
name: 'photoshop_duplicate_layer',
|
|
135
|
+
description: 'Duplicate the active layer',
|
|
136
|
+
inputSchema: {
|
|
137
|
+
type: 'object',
|
|
138
|
+
properties: {
|
|
139
|
+
newName: {
|
|
140
|
+
type: 'string',
|
|
141
|
+
description: 'Name for the duplicated layer (optional)',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
handler: async (args) => duplicateLayer(connection, args),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
tool: {
|
|
150
|
+
name: 'photoshop_merge_visible_layers',
|
|
151
|
+
description: 'Merge all visible layers into one',
|
|
152
|
+
inputSchema: {
|
|
153
|
+
type: 'object',
|
|
154
|
+
properties: {},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
handler: async () => mergeVisibleLayers(connection),
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
tool: {
|
|
161
|
+
name: 'photoshop_flatten_image',
|
|
162
|
+
description: 'Flatten all layers into a single background layer',
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: 'object',
|
|
165
|
+
properties: {},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
handler: async () => flattenImage(connection),
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
}
|
|
172
|
+
async function setLayerOpacity(connection, args) {
|
|
173
|
+
const opacity = args.opacity;
|
|
174
|
+
try {
|
|
175
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
176
|
+
const api = await apiFactory.createAPI();
|
|
177
|
+
const script = ExtendScriptSnippets.setLayerOpacity(opacity);
|
|
178
|
+
await api.executeScript(script);
|
|
179
|
+
return {
|
|
180
|
+
content: [
|
|
181
|
+
{
|
|
182
|
+
type: 'text',
|
|
183
|
+
text: `Layer opacity set to ${opacity}%`,
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
return {
|
|
190
|
+
content: [
|
|
191
|
+
{
|
|
192
|
+
type: 'text',
|
|
193
|
+
text: `Error setting layer opacity: ${error instanceof Error ? error.message : String(error)}`,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
isError: true,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
async function setLayerBlendMode(connection, args) {
|
|
201
|
+
const blendMode = args.blendMode;
|
|
202
|
+
try {
|
|
203
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
204
|
+
const api = await apiFactory.createAPI();
|
|
205
|
+
const script = ExtendScriptSnippets.setLayerBlendMode(blendMode);
|
|
206
|
+
await api.executeScript(script);
|
|
207
|
+
return {
|
|
208
|
+
content: [
|
|
209
|
+
{
|
|
210
|
+
type: 'text',
|
|
211
|
+
text: `Layer blend mode set to ${blendMode}`,
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
return {
|
|
218
|
+
content: [
|
|
219
|
+
{
|
|
220
|
+
type: 'text',
|
|
221
|
+
text: `Error setting blend mode: ${error instanceof Error ? error.message : String(error)}`,
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
isError: true,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
async function setLayerVisibility(connection, args) {
|
|
229
|
+
const visible = args.visible;
|
|
230
|
+
try {
|
|
231
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
232
|
+
const api = await apiFactory.createAPI();
|
|
233
|
+
const script = ExtendScriptSnippets.setLayerVisibility(visible);
|
|
234
|
+
await api.executeScript(script);
|
|
235
|
+
return {
|
|
236
|
+
content: [
|
|
237
|
+
{
|
|
238
|
+
type: 'text',
|
|
239
|
+
text: `Layer ${visible ? 'shown' : 'hidden'}`,
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
catch (error) {
|
|
245
|
+
return {
|
|
246
|
+
content: [
|
|
247
|
+
{
|
|
248
|
+
type: 'text',
|
|
249
|
+
text: `Error setting layer visibility: ${error instanceof Error ? error.message : String(error)}`,
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
isError: true,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
async function setLayerLocked(connection, args) {
|
|
257
|
+
const locked = args.locked;
|
|
258
|
+
try {
|
|
259
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
260
|
+
const api = await apiFactory.createAPI();
|
|
261
|
+
const script = ExtendScriptSnippets.setLayerLocked(locked);
|
|
262
|
+
await api.executeScript(script);
|
|
263
|
+
return {
|
|
264
|
+
content: [
|
|
265
|
+
{
|
|
266
|
+
type: 'text',
|
|
267
|
+
text: `Layer ${locked ? 'locked' : 'unlocked'}`,
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
return {
|
|
274
|
+
content: [
|
|
275
|
+
{
|
|
276
|
+
type: 'text',
|
|
277
|
+
text: `Error locking/unlocking layer: ${error instanceof Error ? error.message : String(error)}`,
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
isError: true,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async function renameLayer(connection, args) {
|
|
285
|
+
const name = args.name;
|
|
286
|
+
try {
|
|
287
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
288
|
+
const api = await apiFactory.createAPI();
|
|
289
|
+
const script = ExtendScriptSnippets.renameLayer(name);
|
|
290
|
+
const result = await api.executeScript(script);
|
|
291
|
+
return {
|
|
292
|
+
content: [
|
|
293
|
+
{
|
|
294
|
+
type: 'text',
|
|
295
|
+
text: `Layer renamed to: ${name}\nResult: ${JSON.stringify(result)}`,
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
catch (error) {
|
|
301
|
+
return {
|
|
302
|
+
content: [
|
|
303
|
+
{
|
|
304
|
+
type: 'text',
|
|
305
|
+
text: `Error renaming layer: ${error instanceof Error ? error.message : String(error)}`,
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
isError: true,
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
async function duplicateLayer(connection, args) {
|
|
313
|
+
const newName = args.newName;
|
|
314
|
+
try {
|
|
315
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
316
|
+
const api = await apiFactory.createAPI();
|
|
317
|
+
const script = ExtendScriptSnippets.duplicateLayer(newName);
|
|
318
|
+
const result = await api.executeScript(script);
|
|
319
|
+
return {
|
|
320
|
+
content: [
|
|
321
|
+
{
|
|
322
|
+
type: 'text',
|
|
323
|
+
text: `Layer duplicated\nResult: ${JSON.stringify(result)}`,
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
catch (error) {
|
|
329
|
+
return {
|
|
330
|
+
content: [
|
|
331
|
+
{
|
|
332
|
+
type: 'text',
|
|
333
|
+
text: `Error duplicating layer: ${error instanceof Error ? error.message : String(error)}`,
|
|
334
|
+
},
|
|
335
|
+
],
|
|
336
|
+
isError: true,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
async function mergeVisibleLayers(connection) {
|
|
341
|
+
try {
|
|
342
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
343
|
+
const api = await apiFactory.createAPI();
|
|
344
|
+
const script = ExtendScriptSnippets.mergeVisibleLayers();
|
|
345
|
+
await api.executeScript(script);
|
|
346
|
+
return {
|
|
347
|
+
content: [
|
|
348
|
+
{
|
|
349
|
+
type: 'text',
|
|
350
|
+
text: 'All visible layers merged',
|
|
351
|
+
},
|
|
352
|
+
],
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
return {
|
|
357
|
+
content: [
|
|
358
|
+
{
|
|
359
|
+
type: 'text',
|
|
360
|
+
text: `Error merging visible layers: ${error instanceof Error ? error.message : String(error)}`,
|
|
361
|
+
},
|
|
362
|
+
],
|
|
363
|
+
isError: true,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
async function flattenImage(connection) {
|
|
368
|
+
try {
|
|
369
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
370
|
+
const api = await apiFactory.createAPI();
|
|
371
|
+
const script = ExtendScriptSnippets.flattenImage();
|
|
372
|
+
await api.executeScript(script);
|
|
373
|
+
return {
|
|
374
|
+
content: [
|
|
375
|
+
{
|
|
376
|
+
type: 'text',
|
|
377
|
+
text: 'Image flattened (all layers merged to background)',
|
|
378
|
+
},
|
|
379
|
+
],
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
catch (error) {
|
|
383
|
+
return {
|
|
384
|
+
content: [
|
|
385
|
+
{
|
|
386
|
+
type: 'text',
|
|
387
|
+
text: `Error flattening image: ${error instanceof Error ? error.message : String(error)}`,
|
|
388
|
+
},
|
|
389
|
+
],
|
|
390
|
+
isError: true,
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
async function rasterizeLayer(connection) {
|
|
395
|
+
try {
|
|
396
|
+
const apiFactory = new PhotoshopAPIFactory(connection);
|
|
397
|
+
const api = await apiFactory.createAPI();
|
|
398
|
+
const script = ExtendScriptSnippets.rasterizeLayer();
|
|
399
|
+
const result = await api.executeScript(script);
|
|
400
|
+
return {
|
|
401
|
+
content: [
|
|
402
|
+
{
|
|
403
|
+
type: 'text',
|
|
404
|
+
text: `Layer rasterized\nResult: ${JSON.stringify(result)}`,
|
|
405
|
+
},
|
|
406
|
+
],
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
catch (error) {
|
|
410
|
+
return {
|
|
411
|
+
content: [
|
|
412
|
+
{
|
|
413
|
+
type: 'text',
|
|
414
|
+
text: `Error rasterizing layer: ${error instanceof Error ? error.message : String(error)}`,
|
|
415
|
+
},
|
|
416
|
+
],
|
|
417
|
+
isError: true,
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
//# sourceMappingURL=layer-properties-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-properties-tools.js","sourceRoot":"","sources":["../../src/tools/layer-properties-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,UAAU,0BAA0B,CAAC,UAA+B;IACxE,OAAO;QACL;YACE,IAAI,EAAE;gBACJ,IAAI,EAAE,2BAA2B;gBACjC,WAAW,EAAE,wEAAwE;gBACrF,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE,EAAE;iBACf;aACF;YACD,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;SAChD;QACD;YACE,IAAI,EAAE;gBACJ,IAAI,EAAE,6BAA6B;gBACnC,WAAW,EAAE,qCAAqC;gBAClD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,OAAO,EAAE;4BACP,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,uBAAuB;4BACpC,OAAO,EAAE,CAAC;4BACV,OAAO,EAAE,GAAG;yBACb;qBACF;oBACD,QAAQ,EAAE,CAAC,SAAS,CAAC;iBACtB;aACF;YACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAA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