@hybridlabor-api/aos 4.0.2 → 4.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.
Files changed (79) hide show
  1. package/.claude/agents/database-reviewer.md +109 -0
  2. package/.claude/agents/go-build-resolver.md +112 -0
  3. package/.claude/agents/opensource-forker.md +216 -0
  4. package/.claude/agents/opensource-sanitizer.md +206 -0
  5. package/.claude/agents/security-reviewer.md +126 -0
  6. package/.claude/agents/silent-failure-hunter.md +68 -0
  7. package/CLAUDE.md +15 -0
  8. package/README.md +0 -13
  9. package/THIRD_PARTY_NOTICES.md +133 -0
  10. package/package.json +4 -2
  11. package/skills/basic/bdbmediastorm/SKILL.md +7 -1
  12. package/skills/basic/startcycle/SKILL.md +2 -0
  13. package/skills/bdbrainstorm/SKILL.md +1 -0
  14. package/skills/global_config/plan-canvas/SKILL.md +233 -0
  15. package/skills/global_config/plan-canvas/scripts/lib/loopback-guard.js +59 -0
  16. package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/markdown.js +301 -0
  17. package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/sdk.js +239 -0
  18. package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/server.js +636 -0
  19. package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/sessions.js +271 -0
  20. package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/ui.js +630 -0
  21. package/skills/global_config/plan-canvas/scripts/plan-canvas.js +419 -0
  22. package/.agents/skills/firecrawl/SKILL.md +0 -149
  23. package/.agents/skills/firecrawl/rules/install.md +0 -82
  24. package/.agents/skills/firecrawl/rules/security.md +0 -26
  25. package/.agents/skills/firecrawl-agent/SKILL.md +0 -58
  26. package/.agents/skills/firecrawl-build/SKILL.md +0 -39
  27. package/.agents/skills/firecrawl-build-interact/SKILL.md +0 -68
  28. package/.agents/skills/firecrawl-build-onboarding/SKILL.md +0 -103
  29. package/.agents/skills/firecrawl-build-onboarding/references/auth-flow.md +0 -39
  30. package/.agents/skills/firecrawl-build-onboarding/references/project-setup.md +0 -20
  31. package/.agents/skills/firecrawl-build-onboarding/references/sdk-installation.md +0 -17
  32. package/.agents/skills/firecrawl-build-scrape/SKILL.md +0 -69
  33. package/.agents/skills/firecrawl-build-search/SKILL.md +0 -69
  34. package/.agents/skills/firecrawl-crawl/SKILL.md +0 -59
  35. package/.agents/skills/firecrawl-download/SKILL.md +0 -70
  36. package/.agents/skills/firecrawl-interact/SKILL.md +0 -84
  37. package/.agents/skills/firecrawl-map/SKILL.md +0 -51
  38. package/.agents/skills/firecrawl-scrape/SKILL.md +0 -69
  39. package/.agents/skills/firecrawl-search/SKILL.md +0 -60
  40. package/docs/sessions/AUDIT-HANDOVER-2026-08-28.md +0 -169
  41. package/docs/sessions/BDB_REMOTEOS_MCP_HANDOVER.md +0 -130
  42. package/docs/sessions/SESSION-HANDOVER-v3.13.md +0 -249
  43. package/mcps/RhinoMCP/cc-plugin/.claude/settings.json +0 -10
  44. package/mcps/after-effects-mcp/build/index.js +0 -840
  45. package/mcps/after-effects-mcp/build/scripts/applyEffect.jsx +0 -153
  46. package/mcps/after-effects-mcp/build/scripts/applyEffectTemplate.jsx +0 -218
  47. package/mcps/after-effects-mcp/build/scripts/createComposition.jsx +0 -71
  48. package/mcps/after-effects-mcp/build/scripts/createShapeLayer.jsx +0 -147
  49. package/mcps/after-effects-mcp/build/scripts/createSolidLayer.jsx +0 -114
  50. package/mcps/after-effects-mcp/build/scripts/createTextLayer.jsx +0 -115
  51. package/mcps/after-effects-mcp/build/scripts/getLayerInfo.jsx +0 -192
  52. package/mcps/after-effects-mcp/build/scripts/getProjectInfo.jsx +0 -90
  53. package/mcps/after-effects-mcp/build/scripts/listCompositions.jsx +0 -50
  54. package/mcps/after-effects-mcp/build/scripts/mcp-bridge-auto.jsx +0 -1773
  55. package/mcps/after-effects-mcp/build/scripts/setLayerProperties.jsx +0 -160
  56. package/mcps/bdb-remoteos-mcp/queue.db +0 -0
  57. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/__init__.cpython-312.pyc +0 -0
  58. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/incus_client.cpython-312.pyc +0 -0
  59. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/main.cpython-312.pyc +0 -0
  60. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/queue.cpython-312.pyc +0 -0
  61. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/schemas.cpython-312.pyc +0 -0
  62. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/server.cpython-312.pyc +0 -0
  63. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/webhook.cpython-312.pyc +0 -0
  64. package/mcps/bdb-remoteos-mcp/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  65. package/mcps/bdb-remoteos-mcp/tests/__pycache__/mock_incus.cpython-312.pyc +0 -0
  66. package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_mcp_server.cpython-312-pytest-9.1.1.pyc +0 -0
  67. package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_security_redteam.cpython-312-pytest-9.1.1.pyc +0 -0
  68. package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_webhook.cpython-312-pytest-9.1.1.pyc +0 -0
  69. package/mcps/computer-use-mcp/dist/client.d.ts +0 -150
  70. package/mcps/computer-use-mcp/dist/client.js +0 -136
  71. package/mcps/computer-use-mcp/dist/entrypoint.d.ts +0 -16
  72. package/mcps/computer-use-mcp/dist/entrypoint.js +0 -26
  73. package/mcps/computer-use-mcp/dist/native.d.ts +0 -212
  74. package/mcps/computer-use-mcp/dist/native.js +0 -50
  75. package/mcps/computer-use-mcp/dist/server.d.ts +0 -32
  76. package/mcps/computer-use-mcp/dist/server.js +0 -342
  77. package/mcps/computer-use-mcp/dist/session.d.ts +0 -101
  78. package/mcps/computer-use-mcp/dist/session.js +0 -2372
  79. package/skills/bdbsaastraining/scripts/__pycache__/build_profile.cpython-314.pyc +0 -0
@@ -1,153 +0,0 @@
1
- // applyEffect.jsx
2
- // Applies an effect to a specified layer in a composition
3
-
4
- function applyEffect(args) {
5
- try {
6
- // Extract parameters
7
- var compIndex = args.compIndex || 1; // Default to first comp
8
- var layerIndex = args.layerIndex || 1; // Default to first layer
9
- var effectName = args.effectName; // Name of the effect to apply
10
- var effectMatchName = args.effectMatchName; // After Effects internal name (more reliable)
11
- var effectCategory = args.effectCategory || ""; // Optional category for filtering
12
- var presetPath = args.presetPath; // Optional path to an effect preset
13
- var effectSettings = args.effectSettings || {}; // Optional effect parameters
14
-
15
- if (!effectName && !effectMatchName && !presetPath) {
16
- throw new Error("You must specify either effectName, effectMatchName, or presetPath");
17
- }
18
-
19
- // Find the composition by index
20
- var comp = app.project.item(compIndex);
21
- if (!comp || !(comp instanceof CompItem)) {
22
- throw new Error("Composition not found at index " + compIndex);
23
- }
24
-
25
- // Find the layer by index
26
- var layer = comp.layer(layerIndex);
27
- if (!layer) {
28
- throw new Error("Layer not found at index " + layerIndex + " in composition '" + comp.name + "'");
29
- }
30
-
31
- var effectResult;
32
-
33
- // Apply preset if a path is provided
34
- if (presetPath) {
35
- var presetFile = new File(presetPath);
36
- if (!presetFile.exists) {
37
- throw new Error("Effect preset file not found: " + presetPath);
38
- }
39
-
40
- // Apply the preset to the layer
41
- layer.applyPreset(presetFile);
42
- effectResult = {
43
- type: "preset",
44
- name: presetPath.split('/').pop().split('\\').pop(),
45
- applied: true
46
- };
47
- }
48
- // Apply effect by match name (more reliable method)
49
- else if (effectMatchName) {
50
- var effect = layer.Effects.addProperty(effectMatchName);
51
- effectResult = {
52
- type: "effect",
53
- name: effect.name,
54
- matchName: effect.matchName,
55
- index: effect.propertyIndex
56
- };
57
-
58
- // Apply settings if provided
59
- applyEffectSettings(effect, effectSettings);
60
- }
61
- // Apply effect by display name
62
- else {
63
- // Get the effect from the Effect menu
64
- var effect = layer.Effects.addProperty(effectName);
65
- effectResult = {
66
- type: "effect",
67
- name: effect.name,
68
- matchName: effect.matchName,
69
- index: effect.propertyIndex
70
- };
71
-
72
- // Apply settings if provided
73
- applyEffectSettings(effect, effectSettings);
74
- }
75
-
76
- return JSON.stringify({
77
- status: "success",
78
- message: "Effect applied successfully",
79
- effect: effectResult,
80
- layer: {
81
- name: layer.name,
82
- index: layerIndex
83
- },
84
- composition: {
85
- name: comp.name,
86
- index: compIndex
87
- }
88
- }, null, 2);
89
- } catch (error) {
90
- return JSON.stringify({
91
- status: "error",
92
- message: error.toString()
93
- }, null, 2);
94
- }
95
- }
96
-
97
- // Helper function to apply effect settings
98
- function applyEffectSettings(effect, settings) {
99
- // Skip if no settings are provided
100
- if (!settings || Object.keys(settings).length === 0) {
101
- return;
102
- }
103
-
104
- // Iterate through all provided settings
105
- for (var propName in settings) {
106
- if (settings.hasOwnProperty(propName)) {
107
- try {
108
- // Find the property in the effect
109
- var property = null;
110
-
111
- // Try direct property access first
112
- try {
113
- property = effect.property(propName);
114
- } catch (e) {
115
- // If direct access fails, search through all properties
116
- for (var i = 1; i <= effect.numProperties; i++) {
117
- var prop = effect.property(i);
118
- if (prop.name === propName) {
119
- property = prop;
120
- break;
121
- }
122
- }
123
- }
124
-
125
- // Set the property value if found
126
- if (property && property.setValue) {
127
- property.setValue(settings[propName]);
128
- }
129
- } catch (e) {
130
- // Log error but continue with other properties
131
- $.writeln("Error setting effect property '" + propName + "': " + e.toString());
132
- }
133
- }
134
- }
135
- }
136
-
137
- // Read arguments from the temp args file written by the launcher
138
- var argsFile = new File($.fileName.replace(/[^\\\/]*$/, '') + "../temp/args.json");
139
- var args = {};
140
- if (argsFile.exists) {
141
- argsFile.open("r");
142
- var _content = argsFile.read();
143
- argsFile.close();
144
- if (_content) {
145
- try { args = JSON.parse(_content); } catch (_e) { args = {}; }
146
- }
147
- }
148
-
149
- // Run the function and write the result
150
- var result = applyEffect(args);
151
-
152
- // Write the result so it can be captured by the Node.js process
153
- $.write(result);
@@ -1,218 +0,0 @@
1
- // applyEffectTemplate.jsx
2
- // Applies predefined effect templates to layers
3
-
4
- function applyEffectTemplate(args) {
5
- try {
6
- // Extract parameters
7
- var compIndex = args.compIndex || 1; // Default to first comp
8
- var layerIndex = args.layerIndex || 1; // Default to first layer
9
- var templateName = args.templateName; // Name of the template to apply
10
- var customSettings = args.customSettings || {}; // Optional customizations
11
-
12
- if (!templateName) {
13
- throw new Error("You must specify a templateName");
14
- }
15
-
16
- // Find the composition by index
17
- var comp = app.project.item(compIndex);
18
- if (!comp || !(comp instanceof CompItem)) {
19
- throw new Error("Composition not found at index " + compIndex);
20
- }
21
-
22
- // Find the layer by index
23
- var layer = comp.layer(layerIndex);
24
- if (!layer) {
25
- throw new Error("Layer not found at index " + layerIndex + " in composition '" + comp.name + "'");
26
- }
27
-
28
- // Template definitions
29
- var templates = {
30
- // Blur effects
31
- "gaussian-blur": {
32
- effectMatchName: "ADBE Gaussian Blur 2",
33
- settings: {
34
- "Blurriness": customSettings.blurriness || 20
35
- }
36
- },
37
- "directional-blur": {
38
- effectMatchName: "ADBE Directional Blur",
39
- settings: {
40
- "Direction": customSettings.direction || 0,
41
- "Blur Length": customSettings.length || 10
42
- }
43
- },
44
-
45
- // Color correction effects
46
- "color-balance": {
47
- effectMatchName: "ADBE Color Balance (HLS)",
48
- settings: {
49
- "Hue": customSettings.hue || 0,
50
- "Lightness": customSettings.lightness || 0,
51
- "Saturation": customSettings.saturation || 0
52
- }
53
- },
54
- "brightness-contrast": {
55
- effectMatchName: "ADBE Brightness & Contrast 2",
56
- settings: {
57
- "Brightness": customSettings.brightness || 0,
58
- "Contrast": customSettings.contrast || 0,
59
- "Use Legacy": false
60
- }
61
- },
62
- "curves": {
63
- effectMatchName: "ADBE CurvesCustom",
64
- // Curves are complex and would need special handling
65
- },
66
-
67
- // Stylistic effects
68
- "glow": {
69
- effectMatchName: "ADBE Glow",
70
- settings: {
71
- "Glow Threshold": customSettings.threshold || 50,
72
- "Glow Radius": customSettings.radius || 15,
73
- "Glow Intensity": customSettings.intensity || 1
74
- }
75
- },
76
- "drop-shadow": {
77
- effectMatchName: "ADBE Drop Shadow",
78
- settings: {
79
- "Shadow Color": customSettings.color || [0, 0, 0, 1],
80
- "Opacity": customSettings.opacity || 50,
81
- "Direction": customSettings.direction || 135,
82
- "Distance": customSettings.distance || 10,
83
- "Softness": customSettings.softness || 10
84
- }
85
- },
86
-
87
- // Common effect chains
88
- "cinematic-look": {
89
- effects: [
90
- {
91
- effectMatchName: "ADBE CurvesCustom",
92
- settings: {}
93
- },
94
- {
95
- effectMatchName: "ADBE Vibrance",
96
- settings: {
97
- "Vibrance": 15,
98
- "Saturation": -5
99
- }
100
- }
101
- ]
102
- },
103
- "text-pop": {
104
- effects: [
105
- {
106
- effectMatchName: "ADBE Drop Shadow",
107
- settings: {
108
- "Shadow Color": [0, 0, 0, 1],
109
- "Opacity": 75,
110
- "Distance": 5,
111
- "Softness": 10
112
- }
113
- },
114
- {
115
- effectMatchName: "ADBE Glow",
116
- settings: {
117
- "Glow Threshold": 50,
118
- "Glow Radius": 10,
119
- "Glow Intensity": 1.5
120
- }
121
- }
122
- ]
123
- }
124
- };
125
-
126
- // Check if the requested template exists
127
- var template = templates[templateName];
128
- if (!template) {
129
- var availableTemplates = Object.keys(templates).join(", ");
130
- throw new Error("Template '" + templateName + "' not found. Available templates: " + availableTemplates);
131
- }
132
-
133
- var appliedEffects = [];
134
-
135
- // Apply single effect or multiple effects based on template structure
136
- if (template.effectMatchName) {
137
- // Single effect template
138
- var effect = layer.Effects.addProperty(template.effectMatchName);
139
-
140
- // Apply settings
141
- for (var propName in template.settings) {
142
- try {
143
- var property = effect.property(propName);
144
- if (property) {
145
- property.setValue(template.settings[propName]);
146
- }
147
- } catch (e) {
148
- $.writeln("Warning: Could not set " + propName + " on effect " + effect.name + ": " + e);
149
- }
150
- }
151
-
152
- appliedEffects.push({
153
- name: effect.name,
154
- matchName: effect.matchName
155
- });
156
- } else if (template.effects) {
157
- // Multiple effects template
158
- for (var i = 0; i < template.effects.length; i++) {
159
- var effectData = template.effects[i];
160
- var effect = layer.Effects.addProperty(effectData.effectMatchName);
161
-
162
- // Apply settings
163
- for (var propName in effectData.settings) {
164
- try {
165
- var property = effect.property(propName);
166
- if (property) {
167
- property.setValue(effectData.settings[propName]);
168
- }
169
- } catch (e) {
170
- $.writeln("Warning: Could not set " + propName + " on effect " + effect.name + ": " + e);
171
- }
172
- }
173
-
174
- appliedEffects.push({
175
- name: effect.name,
176
- matchName: effect.matchName
177
- });
178
- }
179
- }
180
-
181
- return JSON.stringify({
182
- status: "success",
183
- message: "Effect template '" + templateName + "' applied successfully",
184
- appliedEffects: appliedEffects,
185
- layer: {
186
- name: layer.name,
187
- index: layerIndex
188
- },
189
- composition: {
190
- name: comp.name,
191
- index: compIndex
192
- }
193
- }, null, 2);
194
- } catch (error) {
195
- return JSON.stringify({
196
- status: "error",
197
- message: error.toString()
198
- }, null, 2);
199
- }
200
- }
201
-
202
- // Read arguments from the temp args file written by the launcher
203
- var argsFile = new File($.fileName.replace(/[^\\\/]*$/, '') + "../temp/args.json");
204
- var args = {};
205
- if (argsFile.exists) {
206
- argsFile.open("r");
207
- var _content = argsFile.read();
208
- argsFile.close();
209
- if (_content) {
210
- try { args = JSON.parse(_content); } catch (_e) { args = {}; }
211
- }
212
- }
213
-
214
- // Run the function and write the result
215
- var result = applyEffectTemplate(args);
216
-
217
- // Write the result so it can be captured by the Node.js process
218
- $.write(result);
@@ -1,71 +0,0 @@
1
- // createComposition.jsx
2
- // Creates a new composition with the specified settings
3
-
4
- function createComposition(args) {
5
- try {
6
- // Extract parameters from args
7
- var name = args.name || "New Composition";
8
- var width = parseInt(args.width) || 1920;
9
- var height = parseInt(args.height) || 1080;
10
- var pixelAspect = parseFloat(args.pixelAspect) || 1.0;
11
- var duration = parseFloat(args.duration) || 10.0;
12
- var frameRate = parseFloat(args.frameRate) || 30.0;
13
- var bgColor = args.backgroundColor ? [args.backgroundColor.r/255, args.backgroundColor.g/255, args.backgroundColor.b/255] : [0, 0, 0];
14
-
15
- // Create the composition
16
- var newComp = app.project.items.addComp(name, width, height, pixelAspect, duration, frameRate);
17
-
18
- // Set background color if provided
19
- if (args.backgroundColor) {
20
- newComp.bgColor = bgColor;
21
- }
22
-
23
- // Return success with composition details
24
- return JSON.stringify({
25
- status: "success",
26
- message: "Composition created successfully",
27
- composition: {
28
- name: newComp.name,
29
- id: newComp.id,
30
- width: newComp.width,
31
- height: newComp.height,
32
- pixelAspect: newComp.pixelAspect,
33
- duration: newComp.duration,
34
- frameRate: newComp.frameRate,
35
- bgColor: newComp.bgColor
36
- }
37
- }, null, 2);
38
- } catch (error) {
39
- // Return error message
40
- return JSON.stringify({
41
- status: "error",
42
- message: error.toString()
43
- }, null, 2);
44
- }
45
- }
46
-
47
- // Read arguments from the file (passed by the Node.js script)
48
- var argsFile = new File($.fileName.replace(/[^\\\/]*$/, '') + "../temp/args.json");
49
- var args = {};
50
- if (argsFile.exists) {
51
- argsFile.open("r");
52
- var content = argsFile.read();
53
- argsFile.close();
54
- if (content) {
55
- try {
56
- args = JSON.parse(content);
57
- } catch (e) {
58
- // Handle parsing error
59
- $.write(JSON.stringify({
60
- status: "error",
61
- message: "Failed to parse arguments: " + e.toString()
62
- }, null, 2));
63
- }
64
- }
65
- }
66
-
67
- // Run the function and write the result
68
- var result = createComposition(args);
69
-
70
- // Write the result so it can be captured by the Node.js process
71
- $.write(result);
@@ -1,147 +0,0 @@
1
- // createShapeLayer.jsx
2
- // Creates a new shape layer in the specified composition
3
-
4
- function createShapeLayer(args) {
5
- try {
6
- // Extract parameters from args
7
- var compName = args.compName || "";
8
- var shapeType = args.shapeType || "rectangle"; // rectangle, ellipse, polygon
9
- var position = args.position || [960, 540]; // Default to center
10
- var size = args.size || [200, 200]; // Width, Height
11
- var fillColor = args.fillColor || [1, 0, 0]; // Default to red
12
- var strokeColor = args.strokeColor || [0, 0, 0]; // Default to black
13
- var strokeWidth = args.strokeWidth || 0; // Default to no stroke
14
- var startTime = args.startTime || 0;
15
- var duration = args.duration || 5; // Default 5 seconds
16
- var name = args.name || "Shape Layer";
17
- var points = args.points || 5; // For polygon, number of points
18
-
19
- // Find the composition by name
20
- var comp = null;
21
- for (var i = 1; i <= app.project.numItems; i++) {
22
- var item = app.project.item(i);
23
- if (item instanceof CompItem && item.name === compName) {
24
- comp = item;
25
- break;
26
- }
27
- }
28
-
29
- // If no composition was found by name, use the active composition
30
- if (!comp) {
31
- if (app.project.activeItem instanceof CompItem) {
32
- comp = app.project.activeItem;
33
- } else {
34
- throw new Error("No composition found with name '" + compName + "' and no active composition");
35
- }
36
- }
37
-
38
- // Create a shape layer
39
- var shapeLayer = comp.layers.addShape();
40
- shapeLayer.name = name;
41
-
42
- // Get the root content property group
43
- var contents = shapeLayer.property("Contents"); // Changed from "ADBE Root Vectors Group" for simplicity
44
-
45
- // Add a shape group (e.g., "Group 1")
46
- var shapeGroup = contents.addProperty("ADBE Vector Group");
47
- // Get the Contents property group WITHIN the new shape group
48
- var groupContents = shapeGroup.property("Contents");
49
-
50
- // Add the appropriate shape path based on type TO THE GROUP'S CONTENTS
51
- var shapePathProperty;
52
- if (shapeType === "rectangle") {
53
- shapePathProperty = groupContents.addProperty("ADBE Vector Shape - Rect");
54
- var rectSizeProp = shapePathProperty.property("Size");
55
- rectSizeProp.setValue(size);
56
- } else if (shapeType === "ellipse") {
57
- shapePathProperty = groupContents.addProperty("ADBE Vector Shape - Ellipse");
58
- var ellipseSizeProp = shapePathProperty.property("Size");
59
- ellipseSizeProp.setValue(size);
60
- } else if (shapeType === "polygon" || shapeType === "star") { // Combine polygon/star logic
61
- shapePathProperty = groupContents.addProperty("ADBE Vector Shape - Star");
62
- shapePathProperty.property("Type").setValue(shapeType === "polygon" ? 1 : 2); // 1=Polygon, 2=Star
63
- shapePathProperty.property("Points").setValue(points);
64
- shapePathProperty.property("Outer Radius").setValue(size[0] / 2);
65
- // For stars, set inner radius; for polygons, maybe outer roundness if needed
66
- if (shapeType === "star") {
67
- shapePathProperty.property("Inner Radius").setValue(size[0] / 3);
68
- }
69
- }
70
-
71
- // Add fill TO THE GROUP'S CONTENTS
72
- var fill = groupContents.addProperty("ADBE Vector Graphic - Fill");
73
- fill.property("Color").setValue(fillColor);
74
- fill.property("Opacity").setValue(100);
75
-
76
- // Add stroke TO THE GROUP'S CONTENTS if width > 0
77
- if (strokeWidth > 0) {
78
- var stroke = groupContents.addProperty("ADBE Vector Graphic - Stroke");
79
- stroke.property("Color").setValue(strokeColor);
80
- stroke.property("Stroke Width").setValue(strokeWidth);
81
- stroke.property("Opacity").setValue(100);
82
- }
83
-
84
- // Add transform properties TO THE GROUP (not the layer's main transform initially)
85
- var groupTransform = shapeGroup.property("Transform");
86
- // Note: Position is relative to the layer anchor point,
87
- // Layer position sets the anchor point relative to the comp.
88
- // Setting group position might be more intuitive for simple shapes.
89
- // groupTransform.property("Position").setValue([0,0]); // Keep group centered initially
90
-
91
- // Set layer's main transform properties
92
- shapeLayer.property("Position").setValue(position);
93
-
94
- // Set timing
95
- shapeLayer.startTime = startTime;
96
- if (duration > 0) {
97
- shapeLayer.outPoint = startTime + duration;
98
- }
99
-
100
- // Return success with layer details
101
- return JSON.stringify({
102
- status: "success",
103
- message: "Shape layer created successfully",
104
- layer: {
105
- name: shapeLayer.name,
106
- index: shapeLayer.index,
107
- type: "shape",
108
- shapeType: shapeType,
109
- inPoint: shapeLayer.inPoint,
110
- outPoint: shapeLayer.outPoint,
111
- position: shapeLayer.property("Position").value
112
- }
113
- }, null, 2);
114
- } catch (error) {
115
- // Return error message
116
- return JSON.stringify({
117
- status: "error",
118
- message: error.toString()
119
- }, null, 2);
120
- }
121
- }
122
-
123
- // Read arguments from the file (passed by the Node.js script)
124
- var argsFile = new File($.fileName.replace(/[^\\\/]*$/, '') + "../temp/args.json");
125
- var args = {};
126
- if (argsFile.exists) {
127
- argsFile.open("r");
128
- var content = argsFile.read();
129
- argsFile.close();
130
- if (content) {
131
- try {
132
- args = JSON.parse(content);
133
- } catch (e) {
134
- // Handle parsing error
135
- $.write(JSON.stringify({
136
- status: "error",
137
- message: "Failed to parse arguments: " + e.toString()
138
- }, null, 2));
139
- }
140
- }
141
- }
142
-
143
- // Run the function and write the result
144
- var result = createShapeLayer(args);
145
-
146
- // Write the result so it can be captured by the Node.js process
147
- $.write(result);