@causyne/agent 1.20.29 → 1.20.31
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/package.json +1 -1
- package/src/acp/client.js +20 -6
- package/src/acp/client.ts +20 -6
- package/src/appChannel.js +52 -74
- package/src/appChannel.ts +106 -0
- package/src/creative/apps.js +206 -11
- package/src/creative/apps.ts +198 -6
- package/src/creative/liveBridge.js +1481 -0
- package/src/creative/liveBridge.ts +1829 -0
- package/src/creative/pipeline.js +31 -3
- package/src/creative/pipeline.ts +36 -7
- package/src/decideTools.js +3 -1
- package/src/decideTools.ts +3 -1
- package/src/decisionPolicy.js +5 -2
- package/src/decisionPolicy.ts +7 -1
- package/src/historyPruner.js +4 -1
- package/src/historyPruner.ts +4 -1
- package/src/memory/episodicStore.js +17 -5
- package/src/memory/episodicStore.ts +16 -5
- package/src/memory/symbolFolder.js +146 -22
- package/src/memory/symbolFolder.ts +144 -22
- package/src/sandbox.js +5 -1
- package/src/smartToolsUse.js +2 -1
- package/src/smartToolsUse.ts +2 -1
- package/src/tool-scripts/resolve_automator.py +167 -34
- package/src/toolPacks.js +5 -3
- package/src/toolPacks.ts +5 -3
- package/src/tools/creativeApps.js +226 -7
- package/src/tools/creativeApps.ts +233 -7
- package/src/tools/memoryRecall.js +1 -1
- package/src/tools/memoryRecall.ts +1 -1
- package/src/tools/resolveAutomator.js +356 -89
- package/src/tools/resolveAutomator.ts +403 -0
- package/src/toolsList.js +1 -1
- package/src/toolsList.ts +1 -1
package/src/creative/apps.ts
CHANGED
|
@@ -26,22 +26,178 @@ export async function findBlender(): Promise<{ executable: string; version: stri
|
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
export function unrealCandidates(platform = process.platform): string[] {
|
|
30
|
+
const candidates: string[] = [];
|
|
31
|
+
if (platform === 'darwin') {
|
|
32
|
+
for (const root of ['/Users/Shared/Epic Games', '/Applications']) {
|
|
33
|
+
try {
|
|
34
|
+
const dirs = fs.readdirSync(root).filter(n => /^UE_\d/i.test(n)).sort().reverse();
|
|
35
|
+
for (const dir of dirs) {
|
|
36
|
+
candidates.push(path.join(root, dir, 'Engine/Binaries/Mac/UnrealEditor-Cmd'));
|
|
37
|
+
candidates.push(path.join(root, dir, 'Engine/Binaries/Mac/UnrealEditor.app/Contents/MacOS/UnrealEditor-Cmd'));
|
|
38
|
+
}
|
|
39
|
+
} catch { /* ignore */ }
|
|
40
|
+
}
|
|
41
|
+
} else if (platform === 'win32') {
|
|
42
|
+
const root = path.join(process.env.ProgramFiles || 'C:\\Program Files', 'Epic Games');
|
|
43
|
+
try {
|
|
44
|
+
const dirs = fs.readdirSync(root).filter(n => /^UE_\d/i.test(n)).sort().reverse();
|
|
45
|
+
for (const dir of dirs) {
|
|
46
|
+
candidates.push(path.join(root, dir, 'Engine\\Binaries\\Win64\\UnrealEditor-Cmd.exe'));
|
|
47
|
+
}
|
|
48
|
+
} catch { /* ignore */ }
|
|
49
|
+
} else {
|
|
50
|
+
candidates.push(
|
|
51
|
+
path.join(os.homedir(), 'UnrealEngine/Engine/Binaries/Linux/UnrealEditor-Cmd'),
|
|
52
|
+
'/opt/unreal-engine/Engine/Binaries/Linux/UnrealEditor-Cmd'
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return candidates;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function findUnrealEngine(platform = process.platform): { executable: string; version: string } | null {
|
|
59
|
+
for (const executable of unrealCandidates(platform)) {
|
|
60
|
+
if (!fs.existsSync(executable)) continue;
|
|
61
|
+
const match = executable.match(/UE_(\d+(?:\.\d+)*)/i);
|
|
62
|
+
return { executable, version: match?.[1] ? `Unreal Engine ${match[1]}` : 'Unreal Engine 5' };
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function unityCandidates(platform = process.platform): string[] {
|
|
68
|
+
const candidates: string[] = [];
|
|
69
|
+
if (platform === 'darwin') {
|
|
70
|
+
const hubRoot = '/Applications/Unity/Hub/Editor';
|
|
71
|
+
try {
|
|
72
|
+
const versions = fs.readdirSync(hubRoot).sort().reverse();
|
|
73
|
+
for (const v of versions) {
|
|
74
|
+
candidates.push(path.join(hubRoot, v, 'Unity.app/Contents/MacOS/Unity'));
|
|
75
|
+
}
|
|
76
|
+
} catch { /* ignore */ }
|
|
77
|
+
candidates.push('/Applications/Unity/Unity.app/Contents/MacOS/Unity');
|
|
78
|
+
} else if (platform === 'win32') {
|
|
79
|
+
const hubRoot = path.join(process.env.ProgramFiles || 'C:\\Program Files', 'Unity\\Hub\\Editor');
|
|
80
|
+
try {
|
|
81
|
+
const versions = fs.readdirSync(hubRoot).sort().reverse();
|
|
82
|
+
for (const v of versions) {
|
|
83
|
+
candidates.push(path.join(hubRoot, v, 'Editor\\Unity.exe'));
|
|
84
|
+
}
|
|
85
|
+
} catch { /* ignore */ }
|
|
86
|
+
candidates.push(path.join(process.env.ProgramFiles || 'C:\\Program Files', 'Unity\\Editor\\Unity.exe'));
|
|
87
|
+
} else {
|
|
88
|
+
const hubRoot = path.join(os.homedir(), 'Unity/Hub/Editor');
|
|
89
|
+
try {
|
|
90
|
+
const versions = fs.readdirSync(hubRoot).sort().reverse();
|
|
91
|
+
for (const v of versions) {
|
|
92
|
+
candidates.push(path.join(hubRoot, v, 'Editor/Unity'));
|
|
93
|
+
}
|
|
94
|
+
} catch { /* ignore */ }
|
|
95
|
+
candidates.push('/opt/unity/Editor/Unity');
|
|
96
|
+
}
|
|
97
|
+
return candidates;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function findUnityEditor(platform = process.platform): { executable: string; version: string } | null {
|
|
101
|
+
for (const executable of unityCandidates(platform)) {
|
|
102
|
+
if (!fs.existsSync(executable)) continue;
|
|
103
|
+
const match = executable.match(/Editor[\\/]([^\\/]+)[\\/](?:Unity\.app|Editor)/i);
|
|
104
|
+
return { executable, version: match?.[1] ? `Unity ${match[1]}` : 'Unity Editor' };
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function godotCandidates(platform = process.platform): string[] {
|
|
110
|
+
const homeDir = os.homedir();
|
|
111
|
+
const causyneGodotDir = path.join(homeDir, '.causyne', 'engines', 'godot');
|
|
112
|
+
if (platform === 'darwin') {
|
|
113
|
+
return [
|
|
114
|
+
path.join(causyneGodotDir, 'godot'),
|
|
115
|
+
'/Applications/Godot.app/Contents/MacOS/Godot',
|
|
116
|
+
'/Applications/Godot_4.app/Contents/MacOS/Godot',
|
|
117
|
+
'/opt/homebrew/bin/godot',
|
|
118
|
+
'/usr/local/bin/godot'
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
if (platform === 'win32') {
|
|
122
|
+
return [
|
|
123
|
+
path.join(causyneGodotDir, 'Godot.exe'),
|
|
124
|
+
path.join(causyneGodotDir, 'godot.exe'),
|
|
125
|
+
'C:\\Program Files\\Godot\\Godot_v4.exe',
|
|
126
|
+
'C:\\Program Files\\Godot\\godot.exe'
|
|
127
|
+
];
|
|
128
|
+
}
|
|
129
|
+
return [
|
|
130
|
+
path.join(causyneGodotDir, 'godot'),
|
|
131
|
+
'/usr/bin/godot',
|
|
132
|
+
'/usr/local/bin/godot'
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function findGodotEngine(platform = process.platform): { executable: string; version: string } | null {
|
|
137
|
+
for (const executable of godotCandidates(platform)) {
|
|
138
|
+
if (fs.existsSync(executable)) {
|
|
139
|
+
return { executable, version: 'Godot 4.x' };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function resolveCandidates(platform = process.platform): string[] {
|
|
146
|
+
if (platform === 'darwin') {
|
|
147
|
+
return [
|
|
148
|
+
'/Applications/DaVinci Resolve/DaVinci Resolve.app/Contents/MacOS/Resolve',
|
|
149
|
+
'/Applications/DaVinci Resolve/DaVinci Resolve.app'
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
if (platform === 'win32') {
|
|
153
|
+
const programFiles = process.env.ProgramFiles || 'C:\\Program Files';
|
|
154
|
+
return [
|
|
155
|
+
path.join(programFiles, 'Blackmagic Design\\DaVinci Resolve\\Resolve.exe')
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
return ['/opt/resolve/bin/resolve'];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function findDaVinciResolve(platform = process.platform): { executable: string; version: string } | null {
|
|
162
|
+
for (const executable of resolveCandidates(platform)) {
|
|
163
|
+
if (fs.existsSync(executable)) {
|
|
164
|
+
return { executable, version: 'DaVinci Resolve Studio' };
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
|
|
29
170
|
/** Probes local creative application installations and native automation adapter readiness. */
|
|
30
171
|
export async function creativeAppStatus() {
|
|
31
172
|
const blender = await findBlender();
|
|
173
|
+
const resolve = findDaVinciResolve();
|
|
174
|
+
const unreal = findUnrealEngine();
|
|
175
|
+
const unity = findUnityEditor();
|
|
176
|
+
const godot = findGodotEngine();
|
|
32
177
|
const roots = process.platform === 'darwin'
|
|
33
178
|
? ['/Applications', path.join(os.homedir(), 'Applications')]
|
|
34
179
|
: process.platform === 'win32'
|
|
35
180
|
? [process.env.ProgramFiles || 'C:\\Program Files', process.env['ProgramFiles(x86)'] || 'C:\\Program Files (x86)']
|
|
36
181
|
: [];
|
|
37
|
-
const installedNames = roots.flatMap(root => {
|
|
182
|
+
const installedNames = roots.flatMap(root => {
|
|
183
|
+
try {
|
|
184
|
+
const top = fs.readdirSync(root);
|
|
185
|
+
const adobeSub = top.filter(n => /Adobe/i.test(n)).flatMap(sub => {
|
|
186
|
+
try { return fs.readdirSync(path.join(root, sub)); } catch { return []; }
|
|
187
|
+
});
|
|
188
|
+
return [...top, ...adobeSub];
|
|
189
|
+
} catch { return []; }
|
|
190
|
+
});
|
|
38
191
|
return [
|
|
39
192
|
{ id: 'blender', label: '3D Studio (Blender)', installed: Boolean(blender), available: Boolean(blender),
|
|
40
193
|
detail: blender ? `${blender.version} · native batch engine (geometry, materials, lighting, render)` : 'Install Blender to enable 3D batch modeling and rendering.' },
|
|
41
194
|
...[
|
|
42
|
-
['photoshop', 'Photo Studio', /Photoshop/i, '.psd/.png/.jpg', 'layer edits, transforms,
|
|
43
|
-
['premiere', 'Video Studio', /Premiere/i, '.prproj', '
|
|
44
|
-
['after-effects', 'Motion Studio', /After\s*Effects/i, '.aep', '
|
|
195
|
+
['photoshop', 'Photo Studio', /Photoshop/i, '.psd/.png/.jpg', 'live canvas/selection mask bridge, layer edits, transforms, UXP'],
|
|
196
|
+
['premiere', 'Video Studio', /Premiere/i, '.prproj', 'live active sequence insertion, timeline media imports, cuts, markers, UXP'],
|
|
197
|
+
['after-effects', 'Motion Studio', /After\s*Effects/i, '.aep', 'live active composition bridge, footage import, typography, motion'],
|
|
198
|
+
['illustrator', 'Vector Studio', /Illustrator/i, '.ai/.svg/.pdf', 'live artboard placement, vector paths, typography, SVG/PDF export'],
|
|
199
|
+
['indesign', 'Layout Studio', /InDesign/i, '.indd/.idml/.pdf', 'live spread/frame placement, multi-page editorial layout'],
|
|
200
|
+
['media-encoder', 'Encoder Studio', /Media\s*Encoder/i, '.mp4/.mov/.wav', 'render queue dispatch and hardware codec transcode']
|
|
45
201
|
].map(([id, label, pattern, ext, capabilities]) => {
|
|
46
202
|
const installed = installedNames.some(n => (pattern as RegExp).test(n));
|
|
47
203
|
return {
|
|
@@ -50,9 +206,45 @@ export async function creativeAppStatus() {
|
|
|
50
206
|
installed,
|
|
51
207
|
available: installed,
|
|
52
208
|
detail: installed
|
|
53
|
-
? `Connected · native automation
|
|
209
|
+
? `Connected · native automation & live session bridge ready (${ext} · ${capabilities})`
|
|
54
210
|
: `Not installed · install ${label} host engine to enable native creative automation`
|
|
55
211
|
};
|
|
56
|
-
})
|
|
212
|
+
}),
|
|
213
|
+
{
|
|
214
|
+
id: 'resolve',
|
|
215
|
+
label: 'Cinema Studio (DaVinci Resolve)',
|
|
216
|
+
installed: Boolean(resolve),
|
|
217
|
+
available: true,
|
|
218
|
+
detail: resolve
|
|
219
|
+
? `${resolve.version} (${resolve.executable}) · DaVinciResolveScript Python API (timeline assembly, RCM color management, LUT/CDL grading, render queue)`
|
|
220
|
+
: 'DaVinciResolveScript Python bridge & simulator ready (macOS/Windows/Linux) · install DaVinci Resolve for live NLE/grading execution'
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: 'unreal',
|
|
224
|
+
label: 'Unreal Engine (UE5)',
|
|
225
|
+
installed: Boolean(unreal),
|
|
226
|
+
available: true,
|
|
227
|
+
detail: unreal
|
|
228
|
+
? `${unreal.version} (${unreal.executable}) · Remote Control HTTP/WS API (30010) & Python Editor automation ready`
|
|
229
|
+
: 'Staged Python & Remote Control HTTP (30010) bridge ready · install Unreal Engine 5 for local CLI execution'
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: 'unity',
|
|
233
|
+
label: 'Unity Engine',
|
|
234
|
+
installed: Boolean(unity),
|
|
235
|
+
available: true,
|
|
236
|
+
detail: unity
|
|
237
|
+
? `${unity.version} (${unity.executable}) · C# Editor batchmode & AssetDatabase bridge ready`
|
|
238
|
+
: 'Staged C# Editor & AssetDatabase bridge ready · install Unity Editor for local batchmode execution'
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: 'godot',
|
|
242
|
+
label: 'Godot Engine',
|
|
243
|
+
installed: Boolean(godot),
|
|
244
|
+
available: true,
|
|
245
|
+
detail: godot
|
|
246
|
+
? `${godot.version} (${godot.executable}) · headless SceneTree GDScript & resource import bridge ready`
|
|
247
|
+
: 'Staged GDScript & scene resource bridge ready · install Godot 4 for local headless execution'
|
|
248
|
+
}
|
|
57
249
|
];
|
|
58
250
|
}
|