@alisaitteke/photoshop-mcp 1.3.13 → 1.5.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.
Files changed (141) hide show
  1. package/README.de.md +766 -0
  2. package/README.es.md +717 -0
  3. package/README.ja.md +712 -0
  4. package/README.md +135 -40
  5. package/README.tr.md +773 -0
  6. package/README.zh-CN.md +710 -0
  7. package/dist/api/extendscript.d.ts +17 -1
  8. package/dist/api/extendscript.d.ts.map +1 -1
  9. package/dist/api/extendscript.js +301 -3
  10. package/dist/api/extendscript.js.map +1 -1
  11. package/dist/api/photoshop-api.d.ts +1 -1
  12. package/dist/api/photoshop-api.d.ts.map +1 -1
  13. package/dist/api/photoshop-api.js +4 -4
  14. package/dist/api/photoshop-api.js.map +1 -1
  15. package/dist/core/server.d.ts.map +1 -1
  16. package/dist/core/server.js +8 -0
  17. package/dist/core/server.js.map +1 -1
  18. package/dist/errors/envelope.d.ts +1 -1
  19. package/dist/errors/envelope.d.ts.map +1 -1
  20. package/dist/errors/envelope.js +4 -0
  21. package/dist/errors/envelope.js.map +1 -1
  22. package/dist/platform/capabilities.d.ts +7 -0
  23. package/dist/platform/capabilities.d.ts.map +1 -1
  24. package/dist/platform/capabilities.js +23 -1
  25. package/dist/platform/capabilities.js.map +1 -1
  26. package/dist/platform/uxp-bridge-client.d.ts +13 -0
  27. package/dist/platform/uxp-bridge-client.d.ts.map +1 -0
  28. package/dist/platform/uxp-bridge-client.js +31 -0
  29. package/dist/platform/uxp-bridge-client.js.map +1 -0
  30. package/dist/platform/uxp-bridge-server.d.ts +16 -0
  31. package/dist/platform/uxp-bridge-server.d.ts.map +1 -0
  32. package/dist/platform/uxp-bridge-server.js +105 -0
  33. package/dist/platform/uxp-bridge-server.js.map +1 -0
  34. package/dist/prompts/instructions.d.ts.map +1 -1
  35. package/dist/prompts/instructions.js +21 -12
  36. package/dist/prompts/instructions.js.map +1 -1
  37. package/dist/prompts/registry.d.ts +2 -2
  38. package/dist/prompts/registry.d.ts.map +1 -1
  39. package/dist/prompts/registry.js +15 -0
  40. package/dist/prompts/registry.js.map +1 -1
  41. package/dist/prompts/templates/batch-watermark.d.ts +3 -0
  42. package/dist/prompts/templates/batch-watermark.d.ts.map +1 -0
  43. package/dist/prompts/templates/batch-watermark.js +67 -0
  44. package/dist/prompts/templates/batch-watermark.js.map +1 -0
  45. package/dist/prompts/templates/generative-expand.d.ts +3 -0
  46. package/dist/prompts/templates/generative-expand.d.ts.map +1 -0
  47. package/dist/prompts/templates/generative-expand.js +34 -0
  48. package/dist/prompts/templates/generative-expand.js.map +1 -0
  49. package/dist/prompts/templates/generative-fill.d.ts +3 -0
  50. package/dist/prompts/templates/generative-fill.d.ts.map +1 -0
  51. package/dist/prompts/templates/generative-fill.js +29 -0
  52. package/dist/prompts/templates/generative-fill.js.map +1 -0
  53. package/dist/prompts/templates/generative-remove.d.ts +3 -0
  54. package/dist/prompts/templates/generative-remove.d.ts.map +1 -0
  55. package/dist/prompts/templates/generative-remove.js +36 -0
  56. package/dist/prompts/templates/generative-remove.js.map +1 -0
  57. package/dist/prompts/templates/passport-photo.d.ts +3 -0
  58. package/dist/prompts/templates/passport-photo.d.ts.map +1 -0
  59. package/dist/prompts/templates/passport-photo.js +36 -0
  60. package/dist/prompts/templates/passport-photo.js.map +1 -0
  61. package/dist/prompts/templates/remove-distraction.d.ts.map +1 -1
  62. package/dist/prompts/templates/remove-distraction.js +4 -5
  63. package/dist/prompts/templates/remove-distraction.js.map +1 -1
  64. package/dist/prompts/templates/split-carousel.d.ts +3 -0
  65. package/dist/prompts/templates/split-carousel.d.ts.map +1 -0
  66. package/dist/prompts/templates/split-carousel.js +49 -0
  67. package/dist/prompts/templates/split-carousel.js.map +1 -0
  68. package/dist/tools/generative/_shared.d.ts +14 -0
  69. package/dist/tools/generative/_shared.d.ts.map +1 -0
  70. package/dist/tools/generative/_shared.js +79 -0
  71. package/dist/tools/generative/_shared.js.map +1 -0
  72. package/dist/tools/generative-tools.d.ts +8 -0
  73. package/dist/tools/generative-tools.d.ts.map +1 -0
  74. package/dist/tools/generative-tools.js +221 -0
  75. package/dist/tools/generative-tools.js.map +1 -0
  76. package/dist/tools/layer-properties-tools.d.ts.map +1 -1
  77. package/dist/tools/layer-properties-tools.js +2 -1
  78. package/dist/tools/layer-properties-tools.js.map +1 -1
  79. package/dist/tools/neural-tools.d.ts +8 -0
  80. package/dist/tools/neural-tools.d.ts.map +1 -0
  81. package/dist/tools/neural-tools.js +99 -0
  82. package/dist/tools/neural-tools.js.map +1 -0
  83. package/dist/tools/recipes/_shared.d.ts +8 -0
  84. package/dist/tools/recipes/_shared.d.ts.map +1 -1
  85. package/dist/tools/recipes/_shared.js +45 -0
  86. package/dist/tools/recipes/_shared.js.map +1 -1
  87. package/dist/tools/recipes/batch-watermark.d.ts +4 -0
  88. package/dist/tools/recipes/batch-watermark.d.ts.map +1 -0
  89. package/dist/tools/recipes/batch-watermark.js +283 -0
  90. package/dist/tools/recipes/batch-watermark.js.map +1 -0
  91. package/dist/tools/recipes/enhance-portrait.d.ts.map +1 -1
  92. package/dist/tools/recipes/enhance-portrait.js +47 -0
  93. package/dist/tools/recipes/enhance-portrait.js.map +1 -1
  94. package/dist/tools/recipes/index.d.ts +1 -1
  95. package/dist/tools/recipes/index.d.ts.map +1 -1
  96. package/dist/tools/recipes/index.js +9 -0
  97. package/dist/tools/recipes/index.js.map +1 -1
  98. package/dist/tools/recipes/passport-photo.d.ts +4 -0
  99. package/dist/tools/recipes/passport-photo.d.ts.map +1 -0
  100. package/dist/tools/recipes/passport-photo.js +202 -0
  101. package/dist/tools/recipes/passport-photo.js.map +1 -0
  102. package/dist/tools/recipes/remove-background.d.ts.map +1 -1
  103. package/dist/tools/recipes/remove-background.js +5 -0
  104. package/dist/tools/recipes/remove-background.js.map +1 -1
  105. package/dist/tools/recipes/remove-distraction.d.ts.map +1 -1
  106. package/dist/tools/recipes/remove-distraction.js +48 -8
  107. package/dist/tools/recipes/remove-distraction.js.map +1 -1
  108. package/dist/tools/recipes/sky-blend.d.ts.map +1 -1
  109. package/dist/tools/recipes/sky-blend.js +43 -1
  110. package/dist/tools/recipes/sky-blend.js.map +1 -1
  111. package/dist/tools/recipes/split-carousel.d.ts +4 -0
  112. package/dist/tools/recipes/split-carousel.d.ts.map +1 -0
  113. package/dist/tools/recipes/split-carousel.js +163 -0
  114. package/dist/tools/recipes/split-carousel.js.map +1 -0
  115. package/dist/tools/state-tools.js +2 -2
  116. package/dist/tools/state-tools.js.map +1 -1
  117. package/package.json +3 -2
  118. package/uxp-plugin/index.html +20 -0
  119. package/uxp-plugin/main.js +139 -0
  120. package/uxp-plugin/manifest.json +26 -0
  121. package/web/dist/assets/index-BN7ku4VU.css +1 -0
  122. package/web/dist/assets/index-uXgjjmy3.js +346 -0
  123. package/web/dist/index.html +2 -2
  124. package/dist/analytics/client-ip.d.ts +0 -5
  125. package/dist/analytics/client-ip.d.ts.map +0 -1
  126. package/dist/analytics/client-ip.js +0 -39
  127. package/dist/analytics/client-ip.js.map +0 -1
  128. package/dist/analytics/debug-log.d.ts +0 -3
  129. package/dist/analytics/debug-log.d.ts.map +0 -1
  130. package/dist/analytics/debug-log.js +0 -21
  131. package/dist/analytics/debug-log.js.map +0 -1
  132. package/dist/prompts/templates.d.ts +0 -8
  133. package/dist/prompts/templates.d.ts.map +0 -1
  134. package/dist/prompts/templates.js +0 -162
  135. package/dist/prompts/templates.js.map +0 -1
  136. package/dist/tools/recipe-tools.d.ts +0 -4
  137. package/dist/tools/recipe-tools.d.ts.map +0 -1
  138. package/dist/tools/recipe-tools.js +0 -265
  139. package/dist/tools/recipe-tools.js.map +0 -1
  140. package/web/dist/assets/index-BgiXf1Jy.css +0 -1
  141. package/web/dist/assets/index-DvGX0LLy.js +0 -346
@@ -1,4 +1,5 @@
1
1
  import { PhotoshopDetector } from './detector.js';
2
+ import { isUxpBridgeReachable } from './uxp-bridge-client.js';
2
3
  export function parsePhotoshopVersion(version) {
3
4
  const numeric = version.match(/(\d+)\.?(\d*)/);
4
5
  if (numeric) {
@@ -27,17 +28,38 @@ export function getPhotoshopCapabilities(version) {
27
28
  const year = parsed.year ?? (major >= 13 ? 1990 + major : undefined);
28
29
  const selectSubjectV2 = major >= 23 || (year !== undefined && year >= 2020);
29
30
  const generativeFill = major >= 25 || (year !== undefined && year >= 2024);
31
+ const generativeRemove = generativeFill;
32
+ const generativeExpand = generativeFill;
30
33
  const generativeUpscale = major >= 27 || (year !== undefined && year >= 2025);
31
- const executeAsModal = major >= 25 || (year !== undefined && year >= 2024);
34
+ const skyReplacementNative = generativeFill;
35
+ const executeAsModal = generativeFill;
32
36
  return {
33
37
  version,
34
38
  features: {
35
39
  select_subject_v2: selectSubjectV2,
36
40
  generative_fill: generativeFill,
41
+ generative_remove: generativeRemove,
42
+ generative_expand: generativeExpand,
37
43
  generative_upscale: generativeUpscale,
44
+ sky_replacement_native: skyReplacementNative,
45
+ neural_filters: false,
46
+ uxp_bridge_reachable: false,
38
47
  execute_as_modal_timeout: executeAsModal,
39
48
  uxp_plugin_api: detector.supportsUXP(version),
40
49
  },
41
50
  };
42
51
  }
52
+ /** Merge runtime UXP bridge reachability into version-derived capabilities. */
53
+ export async function resolvePhotoshopCapabilities(version) {
54
+ const base = getPhotoshopCapabilities(version);
55
+ const bridgeUp = await isUxpBridgeReachable();
56
+ return {
57
+ ...base,
58
+ features: {
59
+ ...base.features,
60
+ uxp_bridge_reachable: bridgeUp,
61
+ neural_filters: bridgeUp && base.features.uxp_plugin_api,
62
+ },
63
+ };
64
+ }
43
65
  //# sourceMappingURL=capabilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/platform/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAoBlD,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,C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,iBAAiB,EAAE,gBAAgB;YACnC,iBAAiB,EAAE,gBAAgB;YACnC,kBAAkB,EAAE,iBAAiB;YACrC,sBAAsB,EAAE,oBAAoB;YAC5C,cAAc,EAAE,KAAK;YACrB,oBAAoB,EAAE,KAAK;YAC3B,wBAAwB,EAAE,cAAc;YACxC,cAAc,EAAE,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC;SAC9C;KACF,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,OAAe;IAChE,MAAM,IAAI,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,MAAM,oBAAoB,EAAE,CAAC;IAC9C,OAAO;QACL,GAAG,IAAI;QACP,QAAQ,EAAE;YACR,GAAG,IAAI,CAAC,QAAQ;YAChB,oBAAoB,EAAE,QAAQ;YAC9B,cAAc,EAAE,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc;SACzD;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare function isUxpBridgeReachable(): Promise<boolean>;
2
+ export type NeuralFilterKind = 'skin_smoothing' | 'harmonize' | 'depth_blur' | 'super_zoom' | 'colorize';
3
+ export interface NeuralFilterParams {
4
+ smoothness?: number;
5
+ blur?: number;
6
+ reference_layer_id?: number;
7
+ }
8
+ export declare function invokeNeuralFilter(filter: NeuralFilterKind, params?: NeuralFilterParams): Promise<{
9
+ ok: boolean;
10
+ data?: unknown;
11
+ error?: string;
12
+ }>;
13
+ //# sourceMappingURL=uxp-bridge-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uxp-bridge-client.d.ts","sourceRoot":"","sources":["../../src/platform/uxp-bridge-client.ts"],"names":[],"mappings":"AAOA,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAe7D;AAED,MAAM,MAAM,gBAAgB,GAC1B,gBAAgB,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,GAAG,UAAU,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,MAAM,GAAE,kBAAuB,GAC9B,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAM1D"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Client for the MCP-hosted UXP bridge (health check + neural filter invoke).
3
+ */
4
+ import { ensureUxpBridgeServer, invokeUxpBridge } from './uxp-bridge-server.js';
5
+ const HEALTH_TIMEOUT_MS = 800;
6
+ export async function isUxpBridgeReachable() {
7
+ try {
8
+ const port = await ensureUxpBridgeServer();
9
+ const controller = new AbortController();
10
+ const timer = setTimeout(() => controller.abort(), HEALTH_TIMEOUT_MS);
11
+ const res = await fetch(`http://127.0.0.1:${port}/health`, {
12
+ signal: controller.signal,
13
+ });
14
+ clearTimeout(timer);
15
+ if (!res.ok)
16
+ return false;
17
+ const body = (await res.json());
18
+ return body.ok === true;
19
+ }
20
+ catch {
21
+ return false;
22
+ }
23
+ }
24
+ export async function invokeNeuralFilter(filter, params = {}) {
25
+ const result = await invokeUxpBridge('neural_filter', { filter, ...params }, 90_000);
26
+ if (!result.ok) {
27
+ return { ok: false, error: result.error ?? 'neural_filter_failed' };
28
+ }
29
+ return { ok: true, data: result.data };
30
+ }
31
+ //# sourceMappingURL=uxp-bridge-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uxp-bridge-client.js","sourceRoot":"","sources":["../../src/platform/uxp-bridge-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,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
3
+ action: string;
4
+ params: Record<string, unknown>;
5
+ }
6
+ export interface UxpBridgeResult {
7
+ id: string;
8
+ ok: boolean;
9
+ data?: unknown;
10
+ error?: string;
11
+ }
12
+ export declare function getUxpBridgePort(): number;
13
+ export declare function ensureUxpBridgeServer(): Promise<number>;
14
+ export declare function invokeUxpBridge(action: string, params: Record<string, unknown>, timeoutMs?: number): Promise<UxpBridgeResult>;
15
+ export declare function shutdownUxpBridgeServer(): Promise<void>;
16
+ //# sourceMappingURL=uxp-bridge-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uxp-bridge-server.d.ts","sourceRoot":"","sources":["../../src/platform/uxp-bridge-server.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkBD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAgE7D;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,SAAS,SAAS,GACjB,OAAO,CAAC,eAAe,CAAC,CAgB1B;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAI7D"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * MCP-hosted UXP bridge server — companion Photoshop plugin polls for commands.
3
+ * See docs/plans/2026-07-03-1149-photoshop-ai-features/ and uxp-plugin/.
4
+ */
5
+ import { createServer } from 'node:http';
6
+ import { Logger } from '../utils/logger.js';
7
+ const logger = new Logger('UxpBridgeServer');
8
+ const DEFAULT_PORT = Number.parseInt(process.env.PHOTOSHOP_UXP_BRIDGE_PORT ?? '38452', 10);
9
+ let server = null;
10
+ let listenPort = DEFAULT_PORT;
11
+ const pendingCommands = [];
12
+ const results = new Map();
13
+ function json(res, status, body) {
14
+ const payload = JSON.stringify(body);
15
+ res.writeHead(status, {
16
+ 'Content-Type': 'application/json',
17
+ 'Content-Length': Buffer.byteLength(payload),
18
+ });
19
+ res.end(payload);
20
+ }
21
+ export function getUxpBridgePort() {
22
+ return listenPort;
23
+ }
24
+ export async function ensureUxpBridgeServer() {
25
+ if (server)
26
+ return listenPort;
27
+ return new Promise((resolve, reject) => {
28
+ const s = createServer((req, res) => {
29
+ const url = new URL(req.url ?? '/', `http://127.0.0.1:${listenPort}`);
30
+ if (req.method === 'GET' && url.pathname === '/health') {
31
+ json(res, 200, { ok: true, pending: pendingCommands.length });
32
+ return;
33
+ }
34
+ if (req.method === 'GET' && url.pathname === '/poll') {
35
+ const cmd = pendingCommands.shift();
36
+ if (!cmd) {
37
+ res.writeHead(204);
38
+ res.end();
39
+ return;
40
+ }
41
+ json(res, 200, cmd);
42
+ return;
43
+ }
44
+ if (req.method === 'POST' && url.pathname === '/result') {
45
+ let body = '';
46
+ req.on('data', (chunk) => {
47
+ body += chunk;
48
+ });
49
+ req.on('end', () => {
50
+ try {
51
+ const parsed = JSON.parse(body);
52
+ if (parsed?.id) {
53
+ results.set(parsed.id, parsed);
54
+ }
55
+ json(res, 200, { ok: true });
56
+ }
57
+ catch {
58
+ json(res, 400, { ok: false, error: 'invalid_json' });
59
+ }
60
+ });
61
+ return;
62
+ }
63
+ json(res, 404, { ok: false, error: 'not_found' });
64
+ });
65
+ s.listen(listenPort, '127.0.0.1', () => {
66
+ server = s;
67
+ const addr = s.address();
68
+ if (addr && typeof addr === 'object') {
69
+ listenPort = addr.port;
70
+ }
71
+ logger.info(`UXP bridge listening on 127.0.0.1:${listenPort}`);
72
+ resolve(listenPort);
73
+ });
74
+ s.on('error', (err) => {
75
+ if (err.code === 'EADDRINUSE') {
76
+ listenPort += 1;
77
+ s.listen(listenPort, '127.0.0.1');
78
+ return;
79
+ }
80
+ reject(err);
81
+ });
82
+ });
83
+ }
84
+ export async function invokeUxpBridge(action, params, timeoutMs = 60_000) {
85
+ await ensureUxpBridgeServer();
86
+ const id = `cmd-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
87
+ pendingCommands.push({ id, action, params });
88
+ const started = Date.now();
89
+ while (Date.now() - started < timeoutMs) {
90
+ const hit = results.get(id);
91
+ if (hit) {
92
+ results.delete(id);
93
+ return hit;
94
+ }
95
+ await new Promise((r) => setTimeout(r, 250));
96
+ }
97
+ return { id, ok: false, error: 'uxp_bridge_timeout' };
98
+ }
99
+ export async function shutdownUxpBridgeServer() {
100
+ if (!server)
101
+ return;
102
+ await new Promise((resolve) => server.close(() => resolve()));
103
+ server = null;
104
+ }
105
+ //# sourceMappingURL=uxp-bridge-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uxp-bridge-server.js","sourceRoot":"","sources":["../../src/platform/uxp-bridge-server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAe,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAe7C,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,EAAE,EAAE,CAAC,CAAC;AAE3F,IAAI,MAAM,GAAkB,IAAI,CAAC;AACjC,IAAI,UAAU,GAAG,YAAY,CAAC;AAC9B,MAAM,eAAe,GAAuB,EAAE,CAAC;AAC/C,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAC;AAEnD,SAAS,IAAI,CAAC,GAAuC,EAA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AAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAC3C,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,MAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACrE,MAAM,GAAG,IAAI,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/prompts/instructions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QA6H/B,CAAC;AAET,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/prompts/instructions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QAsI/B,CAAC;AAET,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD"}
@@ -73,11 +73,12 @@ User intent glossary
73
73
  - bg.remove — "remove background", "cut out", "isolate subject", "transparent
74
74
  background", "arka planı sil" → \`photoshop_recipe_remove_background\`
75
75
  - obj.remove — "remove that person", "erase distraction", "generative remove"
76
- → \`photoshop_recipe_remove_distraction\` (content-aware; select region first);
77
- fallback \`photoshop_content_aware_fill\` after manual selection
76
+ → \`photoshop_generative_remove\` first; fallback
77
+ \`photoshop_recipe_remove_distraction\` (content-aware) after manual selection
78
78
  - mask.gradient_fade — "fade into background", "gradient mask", "blend subject"
79
79
  → \`photoshop_recipe_gradient_fade\`; guide \`ps.gradient_blend\` for atomic chain
80
80
  - sky.replace — "replace sky", "fix blown sky", "better clouds" →
81
+ \`photoshop_sky_replacement\` when \`sky_replacement_native\`; else
81
82
  \`photoshop_recipe_sky_blend\`; guide \`ps.composite_blend\` for manual composite
82
83
  - portrait.enhance — "smooth skin", "retouch portrait", "fix blemishes" →
83
84
  \`photoshop_recipe_enhance_portrait\`
@@ -93,16 +94,22 @@ User intent glossary
93
94
  - export.social — "for Instagram", "web export" →
94
95
  \`photoshop_recipe_export_social_variants\` or \`photoshop_recipe_prepare_for_web\`
95
96
  - layers.organize — "organize layers", "rename mess" → \`photoshop_recipe_organize_layers\`
97
+ - carousel.split — "seamless carousel", "split panorama", "swipe post", "slayt"
98
+ → \`photoshop_recipe_split_carousel\`
99
+ - batch.watermark — "watermark these photos", "add logo to all", "toplu filigran"
100
+ → \`photoshop_recipe_batch_watermark\`
101
+ - id.passport — "passport photo", "visa photo", "ID photo", "vesikalık", "biyometrik"
102
+ → \`photoshop_recipe_passport_photo\`
96
103
 
97
104
  Degrade paths
98
- - Generative remove / distraction — ideal \`photoshop_generative_remove\` is not
99
- available via ExtendScript. Degrade: user selects region →
100
- \`photoshop_recipe_remove_distraction\` or \`photoshop_content_aware_fill\` →
101
- ask user to refine manually.
102
- - Sky replacement menu — ideal \`photoshop_sky_replacement\` is not scriptable.
103
- Degrade: \`photoshop_recipe_sky_blend\` when a sky file path is available;
104
- otherwise \`photoshop_place_image\` + \`photoshop_create_layer_mask\` +
105
- \`photoshop_apply_gradient_mask\` or guide \`ps.composite_blend\`.
105
+ - Generative remove / distraction — prefer \`photoshop_generative_remove\`; degrade to
106
+ \`photoshop_recipe_remove_distraction\` or \`photoshop_content_aware_fill\` when
107
+ \`generative_unavailable\` or \`generative_credits_exhausted\`.
108
+ - Sky replacement — prefer \`photoshop_sky_replacement\`; degrade:
109
+ \`photoshop_recipe_sky_blend\` when a sky file path is available;
110
+ otherwise \`photoshop_place_image\` + mask workflow or guide \`ps.composite_blend\`.
111
+ - Neural skin / harmonize — \`photoshop_neural_filter\` when \`neural_filters\` is true;
112
+ else frequency separation / manual recipes.
106
113
  - Select Subject v2 missing — \`photoshop_recipe_remove_background\` returns
107
114
  \`version_unsupported\` → manual selection tools + \`photoshop_create_layer_mask\`.
108
115
  - Curves unavailable — use \`photoshop_auto_levels\` then
@@ -123,10 +130,12 @@ Guide prompts (MCP prompts/get)
123
130
  \`ps.enhance_portrait\`, \`ps.prepare_for_web\`, \`ps.export_social_variants\`,
124
131
  \`ps.apply_color_grade\`, \`ps.frequency_separation\`, \`ps.batch_mockup_replace\`,
125
132
  \`ps.organize_layers\`, \`ps.gradient_fade\`, \`ps.sky_blend\`, \`ps.dodge_burn\`,
126
- \`ps.remove_distraction\`
133
+ \`ps.remove_distraction\`, \`ps.split_carousel\`, \`ps.batch_watermark\`,
134
+ \`ps.passport_photo\`
127
135
  - Guide prompts (no recipe pair): \`ps.gradient_blend\` — fade via mask gradient;
128
136
  \`ps.color_correct\` — tone / contrast fix chain; \`ps.dodge_burn_guide\` — 50% gray
129
- overlay setup; \`ps.composite_blend\` — place asset + mask + blend mode
137
+ overlay setup; \`ps.composite_blend\` — place asset + mask + blend mode;
138
+ \`ps.generative_fill\`, \`ps.generative_remove\`, \`ps.generative_expand\` — Firefly workflows
130
139
  `.trim();
131
140
  export function buildPhotoshopInstructions() {
132
141
  return PHOTOSHOP_MCP_INSTRUCTIONS;
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/prompts/instructions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HzC,CAAC,IAAI,EAAE,CAAC;AAET,MAAM,UAAU,0BAA0B;IACxC,OAAO,0BAA0B,CAAC;AACpC,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/prompts/instructions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsIzC,CAAC,IAAI,EAAE,CAAC;AAET,MAAM,UAAU,0BAA0B;IACxC,OAAO,0BAA0B,CAAC;AACpC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { PromptRegistry } from '../core/prompt-registry.js';
2
- export declare const PHOTOSHOP_GUIDE_PROMPT_NAMES: readonly ["ps.gradient_blend", "ps.color_correct", "ps.dodge_burn_guide", "ps.composite_blend"];
3
- export declare const PHOTOSHOP_PROMPT_TEMPLATES: readonly [import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate];
2
+ export declare const PHOTOSHOP_GUIDE_PROMPT_NAMES: readonly ["ps.gradient_blend", "ps.color_correct", "ps.dodge_burn_guide", "ps.composite_blend", "ps.generative_fill", "ps.generative_remove", "ps.generative_expand"];
3
+ export declare const PHOTOSHOP_PROMPT_TEMPLATES: readonly [import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate, import("./_shared.js").PhotoshopPromptTemplate];
4
4
  export declare function registerPhotoshopPrompts(registry: PromptRegistry): void;
5
5
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/prompts/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAmBjE,eAAO,MAAM,4BAA4B,iGAK/B,CAAC;AAEX,eAAO,MAAM,0BAA0B,2wBAiB7B,CAAC;AAEX,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAIvE"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/prompts/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAyBjE,eAAO,MAAM,4BAA4B,uKAQ/B,CAAC;AAEX,eAAO,MAAM,0BAA0B,2iCAuB7B,CAAC;AAEX,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAIvE"}
@@ -15,11 +15,20 @@ import { gradientBlendTemplate } from './templates/gradient-blend.js';
15
15
  import { colorCorrectTemplate } from './templates/color-correct.js';
16
16
  import { dodgeBurnGuideTemplate } from './templates/dodge-burn-guide.js';
17
17
  import { compositeBlendTemplate } from './templates/composite-blend.js';
18
+ import { generativeFillTemplate } from './templates/generative-fill.js';
19
+ import { generativeRemoveTemplate } from './templates/generative-remove.js';
20
+ import { generativeExpandTemplate } from './templates/generative-expand.js';
21
+ import { splitCarouselTemplate } from './templates/split-carousel.js';
22
+ import { batchWatermarkTemplate } from './templates/batch-watermark.js';
23
+ import { passportPhotoTemplate } from './templates/passport-photo.js';
18
24
  export const PHOTOSHOP_GUIDE_PROMPT_NAMES = [
19
25
  'ps.gradient_blend',
20
26
  'ps.color_correct',
21
27
  'ps.dodge_burn_guide',
22
28
  'ps.composite_blend',
29
+ 'ps.generative_fill',
30
+ 'ps.generative_remove',
31
+ 'ps.generative_expand',
23
32
  ];
24
33
  export const PHOTOSHOP_PROMPT_TEMPLATES = [
25
34
  enhancePortraitTemplate,
@@ -38,6 +47,12 @@ export const PHOTOSHOP_PROMPT_TEMPLATES = [
38
47
  colorCorrectTemplate,
39
48
  compositeBlendTemplate,
40
49
  dodgeBurnGuideTemplate,
50
+ generativeFillTemplate,
51
+ generativeRemoveTemplate,
52
+ generativeExpandTemplate,
53
+ splitCarouselTemplate,
54
+ batchWatermarkTemplate,
55
+ passportPhotoTemplate,
41
56
  ];
42
57
  export function registerPhotoshopPrompts(registry) {
43
58
  for (const template of PHOTOSHOP_PROMPT_TEMPLATES) {
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/prompts/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OA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M,+BAA+B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,oBAAoB;IACpB,sBAAsB;IACtB,sBAAsB;CACd,CAAC;AAEX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,uBAAuB;IACvB,wBAAwB;IACxB,qBAAqB;IACrB,4BAA4B;IAC5B,uBAAuB;IACvB,2BAA2B;IAC3B,0BAA0B;IAC1B,sBAAsB;IACtB,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,yBAAyB;IACzB,qBAAqB;IACrB,oBAAoB;IACpB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,wBAAwB;IACxB,wBAAwB;IACxB,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;CACb,CAAC;AAEX,MAAM,UAAU,wBAAwB,CAAC,QAAwB;IAC/D,KAAK,MAAM,QAAQ,IAAI,0BAA0B,EAAE,CAAC;QAClD,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type PhotoshopPromptTemplate } from '../_shared.js';
2
+ export declare const batchWatermarkTemplate: PhotoshopPromptTemplate;
3
+ //# sourceMappingURL=batch-watermark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-watermark.d.ts","sourceRoot":"","sources":["../../../src/prompts/templates/batch-watermark.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,eAAe,CAAC;AAIvB,eAAO,MAAM,sBAAsB,EAAE,uBAkEpC,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { argEnum, argInt, argString, userPrompt, } from '../_shared.js';
2
+ const POSITIONS = ['bottom_right', 'bottom_left', 'top_right', 'top_left', 'center'];
3
+ export const batchWatermarkTemplate = {
4
+ name: 'ps.batch_watermark',
5
+ description: 'Apply a text or logo watermark to every image in a folder and export watermarked JPEGs. Users often say: watermark these photos, add my logo to all, toplu filigran.',
6
+ arguments: [
7
+ {
8
+ name: 'assets_dir',
9
+ description: 'Absolute path to the folder of images to watermark.',
10
+ required: true,
11
+ },
12
+ {
13
+ name: 'text',
14
+ description: 'Watermark text (e.g. "© Jane Doe 2026"). Required unless logo_path is given.',
15
+ required: false,
16
+ },
17
+ {
18
+ name: 'logo_path',
19
+ description: 'Absolute path to a logo image (transparent PNG recommended).',
20
+ required: false,
21
+ },
22
+ {
23
+ name: 'position',
24
+ description: `One of: ${POSITIONS.join(', ')}. Default bottom_right.`,
25
+ required: false,
26
+ },
27
+ {
28
+ name: 'opacity',
29
+ description: 'Watermark opacity 0-100. Default 40.',
30
+ required: false,
31
+ },
32
+ ],
33
+ handler: (args) => {
34
+ const assetsDir = argString(args, 'assets_dir', '');
35
+ const wmText = argString(args, 'text', '');
36
+ const logoPath = argString(args, 'logo_path', '');
37
+ const position = argEnum(args, 'position', POSITIONS, 'bottom_right');
38
+ const opacity = Math.max(0, Math.min(100, argInt(args, 'opacity', 40)));
39
+ const toolArgs = {
40
+ assets_dir: assetsDir,
41
+ position,
42
+ opacity,
43
+ };
44
+ let modeNote;
45
+ if (wmText) {
46
+ toolArgs.text = wmText;
47
+ modeNote = `White text watermark "${wmText}" at ${opacity}% opacity, ${position}.`;
48
+ }
49
+ else {
50
+ toolArgs.logo_path = logoPath;
51
+ modeNote = `Logo watermark from ${logoPath} at ${opacity}% opacity, ${position}, scaled to 15% of image width.`;
52
+ }
53
+ const text = [
54
+ `Goal: Watermark every image in ${assetsDir}.`,
55
+ ``,
56
+ `Plan:`,
57
+ `1. Call \`photoshop_recipe_batch_watermark\` with ${JSON.stringify(toolArgs)}.`,
58
+ ` - ${modeNote}`,
59
+ ` - The recipe opens each supported image (jpg/png/tif/webp) in turn, applies the watermark, saves a JPEG copy, and closes the original untouched. Files that fail are skipped and reported, not fatal.`,
60
+ `2. Report how many images were watermarked and list any failures from details.failed.`,
61
+ ``,
62
+ `End state: one watermarked JPEG per source image under ~/.photoshop-mcp/exports[/<chat-id>]; source files unmodified.`,
63
+ ].join('\n');
64
+ return userPrompt(`Batch watermark the images in ${assetsDir}.`, text);
65
+ },
66
+ };
67
+ //# sourceMappingURL=batch-watermark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-watermark.js","sourceRoot":"","sources":["../../../src/prompts/templates/batch-watermark.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,GAEX,MAAM,eAAe,CAAC;AAEvB,MAAM,SAAS,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAE9F,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,sKAAsK;IACxK,SAAS,EAAE;QACT;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,IAAI;SACf;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,8EAA8E;YAC3F,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,8DAA8D;YAC3E,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,WAAW,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB;YACrE,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,CAAC,I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CAAC;IACzE,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type PhotoshopPromptTemplate } from '../_shared.js';
2
+ export declare const generativeExpandTemplate: PhotoshopPromptTemplate;
3
+ //# sourceMappingURL=generative-expand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-expand.d.ts","sourceRoot":"","sources":["../../../src/prompts/templates/generative-expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI7F,eAAO,MAAM,wBAAwB,EAAE,uBA+BtC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { argEnum, argString, userPrompt } from '../_shared.js';
2
+ const DIRECTIONS = ['left', 'right', 'top', 'bottom', 'all'];
3
+ export const generativeExpandTemplate = {
4
+ name: 'ps.generative_expand',
5
+ description: 'Generative Expand beyond canvas edges. Users often say: extend canvas, outpainting, expand background, generative expand.',
6
+ arguments: [
7
+ {
8
+ name: 'prompt',
9
+ description: 'How to extend the image (default: extend the background naturally)',
10
+ required: false,
11
+ },
12
+ {
13
+ name: 'direction',
14
+ description: 'left | right | top | bottom | all (default all)',
15
+ required: false,
16
+ },
17
+ ],
18
+ handler: (args) => {
19
+ const prompt = argString(args, 'prompt', 'extend the background naturally');
20
+ const direction = argEnum(args, 'direction', DIRECTIONS, 'all');
21
+ const text = [
22
+ `Goal: Extend the canvas with Generative Expand.`,
23
+ ``,
24
+ `Plan:`,
25
+ `1. Verify \`generative_expand\` via \`photoshop_get_capabilities\`.`,
26
+ `2. Call \`photoshop_generative_expand\` with { prompt: "${prompt.replace(/"/g, '\\"')}", direction: "${direction}" }.`,
27
+ `3. Call \`photoshop_get_preview\` to confirm expanded canvas.`,
28
+ ``,
29
+ `End state: document enlarged with generated border content.`,
30
+ ].join('\n');
31
+ return userPrompt(`Generative expand (${direction})`, text);
32
+ },
33
+ };
34
+ //# sourceMappingURL=generative-expand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-expand.js","sourceRoot":"","sources":["../../../src/prompts/templates/generative-expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAgC,MAAM,eAAe,CAAC;AAE7F,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAEtE,MAAM,CAAC,MAAM,wBAAwB,GAA4B;IAC/D,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,2HAA2H;IAC7H,SAAS,EAAE;QACT;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oEAAoE;YACjF,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,iCAAiC,CAAC,CAAC;QAC5E,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QAChE,MAAM,IAAI,GAAG;YACX,iDAAiD;YACjD,EAAE;YACF,OAAO;YACP,qEAAqE;YACrE,2DAA2D,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,kBAAkB,SAAS,MAAM;YACvH,+DAA+D;YAC/D,EAAE;YACF,6DAA6D;SAC9D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,UAAU,CAAC,sBAAsB,SAAS,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type PhotoshopPromptTemplate } from '../_shared.js';
2
+ export declare const generativeFillTemplate: PhotoshopPromptTemplate;
3
+ //# sourceMappingURL=generative-fill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-fill.d.ts","sourceRoot":"","sources":["../../../src/prompts/templates/generative-fill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAEpF,eAAO,MAAM,sBAAsB,EAAE,uBA2BpC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { argString, userPrompt } from '../_shared.js';
2
+ export const generativeFillTemplate = {
3
+ name: 'ps.generative_fill',
4
+ description: 'Generative Fill inside the current selection with a text prompt. Users often say: add object, replace selection, generative fill, firefly fill.',
5
+ arguments: [
6
+ {
7
+ name: 'prompt',
8
+ description: 'What to generate inside the selection',
9
+ required: true,
10
+ },
11
+ ],
12
+ handler: (args) => {
13
+ const prompt = argString(args, 'prompt', 'seamless background extension');
14
+ const text = [
15
+ `Goal: Fill the current selection using Generative Fill (Firefly).`,
16
+ ``,
17
+ `Plan:`,
18
+ `1. Call \`photoshop_get_capabilities\` once if not done this session; verify \`generative_fill\`.`,
19
+ `2. Call \`photoshop_get_state\` — ensure a pixel selection exists.`,
20
+ `3. If no selection: \`photoshop_select_subject\` or \`photoshop_select_rectangle\`, then retry.`,
21
+ `4. Call \`photoshop_generative_fill\` with { prompt: "${prompt.replace(/"/g, '\\"')}" }.`,
22
+ `5. Call \`photoshop_get_preview\` to verify the result.`,
23
+ ``,
24
+ `End state: selection filled with generative content; one undo per generative layer.`,
25
+ ].join('\n');
26
+ return userPrompt(`Generative fill: ${prompt}`, text);
27
+ },
28
+ };
29
+ //# sourceMappingURL=generative-fill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-fill.js","sourceRoot":"","sources":["../../../src/prompts/templates/generative-fill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAgC,MAAM,eAAe,CAAC;AAEpF,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,iJAAiJ;IACnJ,SAAS,EAAE;QACT;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,+BAA+B,CAAC,CAAC;QAC1E,MAAM,IAAI,GAAG;YACX,mEAAmE;YACnE,EAAE;YACF,OAAO;YACP,mGAAmG;YACnG,oEAAoE;YACpE,iGAAiG;YACjG,yDAAyD,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM;YAC1F,yDAAyD;YACzD,EAAE;YACF,qFAAqF;SACtF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,UAAU,CAAC,oBAAoB,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type PhotoshopPromptTemplate } from '../_shared.js';
2
+ export declare const generativeRemoveTemplate: PhotoshopPromptTemplate;
3
+ //# sourceMappingURL=generative-remove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-remove.d.ts","sourceRoot":"","sources":["../../../src/prompts/templates/generative-remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE1F,eAAO,MAAM,wBAAwB,EAAE,uBAkCtC,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { argBool, argInt, userPrompt } from '../_shared.js';
2
+ export const generativeRemoveTemplate = {
3
+ name: 'ps.generative_remove',
4
+ description: 'AI Remove tool on the current selection. Users often say: remove person, erase distraction, generative remove, delete object.',
5
+ arguments: [
6
+ {
7
+ name: 'feather_px',
8
+ description: 'Edge feather 0-20 before remove (default 0)',
9
+ required: false,
10
+ },
11
+ {
12
+ name: 'auto_select_subject',
13
+ description: 'Run Select Subject when no selection (true/false, default false)',
14
+ required: false,
15
+ },
16
+ ],
17
+ handler: (args) => {
18
+ const feather = Math.max(0, Math.min(20, argInt(args, 'feather_px', 0)));
19
+ const autoSelect = argBool(args, 'auto_select_subject', false);
20
+ const text = [
21
+ `Goal: Remove selected content using generative AI (Remove tool).`,
22
+ ``,
23
+ `Plan:`,
24
+ `1. Call \`photoshop_get_capabilities\` — verify \`generative_remove\`.`,
25
+ `2. Call \`photoshop_get_state\` for selection bounds.`,
26
+ `3. Call \`photoshop_generative_remove\` with { feather_px: ${feather}, auto_select_subject: ${autoSelect} }.`,
27
+ `4. On \`generative_no_selection\`, define selection then retry.`,
28
+ `5. On \`generative_unavailable\`, fallback \`photoshop_recipe_remove_distraction\`.`,
29
+ `6. Call \`photoshop_get_preview\`.`,
30
+ ``,
31
+ `End state: distraction removed; selection cleared.`,
32
+ ].join('\n');
33
+ return userPrompt(`Generative remove (feather ${feather}px)`, text);
34
+ },
35
+ };
36
+ //# sourceMappingURL=generative-remove.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-remove.js","sourceRoot":"","sources":["../../../src/prompts/templates/generative-remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAgC,MAAM,eAAe,CAAC;AAE1F,MAAM,CAAC,MAAM,wBAAwB,GAA4B;IAC/D,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,+HAA+H;IACjI,SAAS,EAAE;QACT;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG;YACX,kEAAkE;YAClE,EAAE;YACF,OAAO;YACP,wEAAwE;YACxE,uDAAuD;YACvD,8DAA8D,OAAO,0BAA0B,UAAU,KAAK;YAC9G,iEAAiE;YACjE,qFAAqF;YACrF,oCAAoC;YACpC,EAAE;YACF,oDAAoD;SACrD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,UAAU,CAAC,8BAA8B,OAAO,KAAK,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type PhotoshopPromptTemplate } from '../_shared.js';
2
+ export declare const passportPhotoTemplate: PhotoshopPromptTemplate;
3
+ //# sourceMappingURL=passport-photo.d.ts.map