zilmate 1.7.2 → 1.7.6
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/.env.example +36 -36
- package/README.md +503 -503
- package/SDK.md +320 -320
- package/agent-docs.md +276 -276
- package/dist/agents/automation-planner.agent.d.ts.map +1 -1
- package/dist/agents/coding.agent.d.ts +18 -0
- package/dist/agents/coding.agent.d.ts.map +1 -1
- package/dist/agents/finance.agent.d.ts +60 -0
- package/dist/agents/finance.agent.d.ts.map +1 -0
- package/dist/agents/finance.agent.js +30 -0
- package/dist/agents/finance.agent.js.map +1 -0
- package/dist/agents/manager.d.ts +94 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +102 -36
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/swarm/engineering/qa.d.ts +3 -0
- package/dist/agents/swarm/engineering/qa.d.ts.map +1 -0
- package/dist/agents/swarm/engineering/qa.js +19 -0
- package/dist/agents/swarm/engineering/qa.js.map +1 -0
- package/dist/agents/swarm/growth/seo.d.ts +3 -0
- package/dist/agents/swarm/growth/seo.d.ts.map +1 -0
- package/dist/agents/swarm/growth/seo.js +19 -0
- package/dist/agents/swarm/growth/seo.js.map +1 -0
- package/dist/agents/swarm/main.d.ts +22 -0
- package/dist/agents/swarm/main.d.ts.map +1 -0
- package/dist/agents/swarm/main.js +65 -0
- package/dist/agents/swarm/main.js.map +1 -0
- package/dist/agents/swarm/operations/finance.d.ts +3 -0
- package/dist/agents/swarm/operations/finance.d.ts.map +1 -0
- package/dist/agents/swarm/operations/finance.js +19 -0
- package/dist/agents/swarm/operations/finance.js.map +1 -0
- package/dist/agents/swarm/registry.d.ts +4 -0
- package/dist/agents/swarm/registry.d.ts.map +1 -0
- package/dist/agents/swarm/registry.js +361 -0
- package/dist/agents/swarm/registry.js.map +1 -0
- package/dist/cli/chat.d.ts +2 -0
- package/dist/cli/chat.d.ts.map +1 -0
- package/dist/cli/chat.js +61 -0
- package/dist/cli/chat.js.map +1 -0
- package/dist/cli/composer.d.ts.map +1 -1
- package/dist/cli/composer.js +54 -4
- package/dist/cli/composer.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +13 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +46 -53
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/interactive.d.ts.map +1 -1
- package/dist/cli/interactive.js +51 -6
- package/dist/cli/interactive.js.map +1 -1
- package/dist/cli/models.d.ts +1 -1
- package/dist/cli/models.d.ts.map +1 -1
- package/dist/cli/models.js +21 -21
- package/dist/cli/models.js.map +1 -1
- package/dist/cli/prompt.d.ts +2 -2
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +58 -14
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/render.d.ts.map +1 -1
- package/dist/cli/render.js +25 -17
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +74 -2
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/swarm.d.ts +4 -0
- package/dist/cli/swarm.d.ts.map +1 -0
- package/dist/cli/swarm.js +21 -0
- package/dist/cli/swarm.js.map +1 -0
- package/dist/cli/theme.d.ts +67 -1
- package/dist/cli/theme.d.ts.map +1 -1
- package/dist/cli/theme.js +66 -4
- package/dist/cli/theme.js.map +1 -1
- package/dist/cli/tunnel.d.ts.map +1 -1
- package/dist/cli/tunnel.js +2 -1
- package/dist/cli/tunnel.js.map +1 -1
- package/dist/cli/voice.js +11 -11
- package/dist/cli/welcome.d.ts.map +1 -1
- package/dist/cli/welcome.js +2 -0
- package/dist/cli/welcome.js.map +1 -1
- package/dist/config/model-store.d.ts +1 -1
- package/dist/config/model-store.d.ts.map +1 -1
- package/dist/config/model-store.js +14 -1
- package/dist/config/model-store.js.map +1 -1
- package/dist/config/models.d.ts +7 -0
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +30 -6
- package/dist/config/models.js.map +1 -1
- package/dist/documents/pdf.d.ts.map +1 -1
- package/dist/documents/pdf.js +143 -41
- package/dist/documents/pdf.js.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/jobs/anomaly.js +5 -5
- package/dist/memory/heal.js +43 -43
- package/dist/observability/doctor.d.ts +3 -0
- package/dist/observability/doctor.d.ts.map +1 -0
- package/dist/observability/doctor.js +33 -0
- package/dist/observability/doctor.js.map +1 -0
- package/dist/observability/usage.d.ts +13 -0
- package/dist/observability/usage.d.ts.map +1 -0
- package/dist/observability/usage.js +34 -0
- package/dist/observability/usage.js.map +1 -0
- package/dist/runtime/chat-bridge.d.ts +32 -0
- package/dist/runtime/chat-bridge.d.ts.map +1 -0
- package/dist/runtime/chat-bridge.js +92 -0
- package/dist/runtime/chat-bridge.js.map +1 -0
- package/dist/runtime/confirm.d.ts.map +1 -1
- package/dist/runtime/confirm.js +12 -2
- package/dist/runtime/confirm.js.map +1 -1
- package/dist/runtime/progress.d.ts.map +1 -1
- package/dist/runtime/progress.js +3 -1
- package/dist/runtime/progress.js.map +1 -1
- package/dist/runtime/prompts/builder.d.ts +11 -0
- package/dist/runtime/prompts/builder.d.ts.map +1 -0
- package/dist/runtime/prompts/builder.js +29 -0
- package/dist/runtime/prompts/builder.js.map +1 -0
- package/dist/runtime/registry.d.ts +14 -0
- package/dist/runtime/registry.d.ts.map +1 -0
- package/dist/runtime/registry.js +39 -0
- package/dist/runtime/registry.js.map +1 -0
- package/dist/runtime/storage/interface.d.ts +16 -0
- package/dist/runtime/storage/interface.d.ts.map +1 -0
- package/dist/runtime/storage/interface.js +19 -0
- package/dist/runtime/storage/interface.js.map +1 -0
- package/dist/runtime/storage/local.d.ts +12 -0
- package/dist/runtime/storage/local.d.ts.map +1 -0
- package/dist/runtime/storage/local.js +48 -0
- package/dist/runtime/storage/local.js.map +1 -0
- package/dist/runtime/storage/redis.d.ts +11 -0
- package/dist/runtime/storage/redis.d.ts.map +1 -0
- package/dist/runtime/storage/redis.js +21 -0
- package/dist/runtime/storage/redis.js.map +1 -0
- package/dist/runtime/swarm/reports.d.ts +9 -0
- package/dist/runtime/swarm/reports.d.ts.map +1 -0
- package/dist/runtime/swarm/reports.js +43 -0
- package/dist/runtime/swarm/reports.js.map +1 -0
- package/dist/runtime/swarm.d.ts +38 -0
- package/dist/runtime/swarm.d.ts.map +1 -0
- package/dist/runtime/swarm.js +110 -0
- package/dist/runtime/swarm.js.map +1 -0
- package/dist/runtime/telemetry.d.ts +15 -0
- package/dist/runtime/telemetry.d.ts.map +1 -0
- package/dist/runtime/telemetry.js +25 -0
- package/dist/runtime/telemetry.js.map +1 -0
- package/dist/runtime/tool-utils.d.ts +12 -0
- package/dist/runtime/tool-utils.d.ts.map +1 -0
- package/dist/runtime/tool-utils.js +31 -0
- package/dist/runtime/tool-utils.js.map +1 -0
- package/dist/tools/browser.tool.d.ts +54 -0
- package/dist/tools/browser.tool.d.ts.map +1 -0
- package/dist/tools/browser.tool.js +193 -0
- package/dist/tools/browser.tool.js.map +1 -0
- package/dist/tools/business-apps.tool.d.ts +18 -0
- package/dist/tools/business-apps.tool.d.ts.map +1 -0
- package/dist/tools/business-apps.tool.js +43 -0
- package/dist/tools/business-apps.tool.js.map +1 -0
- package/dist/tools/computer-use.tool.js +66 -66
- package/dist/tools/cross-app-ledger.tool.d.ts +7 -0
- package/dist/tools/cross-app-ledger.tool.d.ts.map +1 -0
- package/dist/tools/cross-app-ledger.tool.js +70 -0
- package/dist/tools/cross-app-ledger.tool.js.map +1 -0
- package/dist/tools/daytona-browser.tool.d.ts +113 -0
- package/dist/tools/daytona-browser.tool.d.ts.map +1 -0
- package/dist/tools/daytona-browser.tool.js +348 -0
- package/dist/tools/daytona-browser.tool.js.map +1 -0
- package/dist/tools/desktop.tool.js +10 -10
- package/dist/tools/documents.tool.js +5 -5
- package/dist/tools/finance.tool.d.ts +18 -0
- package/dist/tools/finance.tool.d.ts.map +1 -0
- package/dist/tools/finance.tool.js +88 -0
- package/dist/tools/finance.tool.js.map +1 -0
- package/dist/tools/image-intelligence.tool.d.ts +12 -0
- package/dist/tools/image-intelligence.tool.d.ts.map +1 -0
- package/dist/tools/image-intelligence.tool.js +62 -0
- package/dist/tools/image-intelligence.tool.js.map +1 -0
- package/dist/tools/notify.tool.js +8 -8
- package/dist/tools/osint-install.tool.js +8 -8
- package/dist/tools/pentest-install.tool.js +6 -6
- package/dist/tools/setup-assistant.tool.d.ts +1 -1
- package/dist/tools/shell.tool.d.ts +18 -0
- package/dist/tools/shell.tool.d.ts.map +1 -1
- package/dist/tools/shell.tool.js +34 -0
- package/dist/tools/shell.tool.js.map +1 -1
- package/dist/tools/swarm-collaboration.tool.d.ts +29 -0
- package/dist/tools/swarm-collaboration.tool.d.ts.map +1 -0
- package/dist/tools/swarm-collaboration.tool.js +88 -0
- package/dist/tools/swarm-collaboration.tool.js.map +1 -0
- package/dist/tools/swarm-memory.tool.d.ts +16 -0
- package/dist/tools/swarm-memory.tool.d.ts.map +1 -0
- package/dist/tools/swarm-memory.tool.js +31 -0
- package/dist/tools/swarm-memory.tool.js.map +1 -0
- package/dist/tools/swarm-ops.tool.d.ts +20 -0
- package/dist/tools/swarm-ops.tool.d.ts.map +1 -0
- package/dist/tools/swarm-ops.tool.js +55 -0
- package/dist/tools/swarm-ops.tool.js.map +1 -0
- package/dist/tools/triggers.tool.d.ts.map +1 -1
- package/dist/tools/visual-audit.tool.d.ts +24 -0
- package/dist/tools/visual-audit.tool.d.ts.map +1 -0
- package/dist/tools/visual-audit.tool.js +48 -0
- package/dist/tools/visual-audit.tool.js.map +1 -0
- package/dist/tools/web-intelligence.tool.d.ts +12 -0
- package/dist/tools/web-intelligence.tool.d.ts.map +1 -0
- package/dist/tools/web-intelligence.tool.js +27 -0
- package/dist/tools/web-intelligence.tool.js.map +1 -0
- package/dist/workspace/init.js +18 -18
- package/dist/workspace/output-paths.d.ts +1 -1
- package/dist/workspace/output-paths.d.ts.map +1 -1
- package/dist/workspace/output-paths.js +1 -0
- package/dist/workspace/output-paths.js.map +1 -1
- package/dist/workspace/paths.d.ts +1 -0
- package/dist/workspace/paths.d.ts.map +1 -1
- package/dist/workspace/paths.js +1 -0
- package/dist/workspace/paths.js.map +1 -1
- package/install.ps1 +62 -62
- package/package.json +107 -103
- package/scripts/postinstall.mjs +42 -42
- package/scripts/release-github.mjs +91 -91
- package/src/doc/README.md +49 -49
- package/src/doc/admin-tools-and-sms-campaigns.md +99 -99
- package/src/doc/escalation-checklist.md +97 -97
- package/src/doc/payments-and-payouts.md +82 -82
- package/src/doc/shift-lifecycle-and-disputes.md +95 -95
- package/src/doc/support-macros.md +40 -40
- package/src/doc/venue-support-playbook.md +145 -145
- package/src/doc/verification-and-trust.md +88 -88
- package/src/doc/worker-support-playbook.md +159 -159
|
@@ -82,18 +82,18 @@ export const mouseTool = {
|
|
|
82
82
|
if (!approved)
|
|
83
83
|
throw new Error('Blocked mouse action.');
|
|
84
84
|
emitProgress({ type: 'tool:start', label: `Mouse ${action}`, detail: `(${x}, ${y})` });
|
|
85
|
-
const script = `
|
|
86
|
-
import pyautogui
|
|
87
|
-
import time
|
|
88
|
-
pyautogui.FAILSAFE = True
|
|
89
|
-
pyautogui.PAUSE = 0.05
|
|
90
|
-
|
|
91
|
-
${action === 'move' ? `pyautogui.moveTo(${x}, ${y}, duration=${duration})` : ''}
|
|
92
|
-
${action === 'click' ? `pyautogui.click(${x}, ${y}, duration=${duration})` : ''}
|
|
93
|
-
${action === 'doubleClick' ? `pyautogui.doubleClick(${x}, ${y}, duration=${duration})` : ''}
|
|
94
|
-
${action === 'rightClick' ? `pyautogui.rightClick(${x}, ${y}, duration=${duration})` : ''}
|
|
95
|
-
${action === 'scroll' ? `pyautogui.moveTo(${x}, ${y})\npyautogui.scroll(${scrollDirection === 'down' ? -(scrollAmount ?? 3) : (scrollAmount ?? 3)})` : ''}
|
|
96
|
-
print("done")
|
|
85
|
+
const script = `
|
|
86
|
+
import pyautogui
|
|
87
|
+
import time
|
|
88
|
+
pyautogui.FAILSAFE = True
|
|
89
|
+
pyautogui.PAUSE = 0.05
|
|
90
|
+
|
|
91
|
+
${action === 'move' ? `pyautogui.moveTo(${x}, ${y}, duration=${duration})` : ''}
|
|
92
|
+
${action === 'click' ? `pyautogui.click(${x}, ${y}, duration=${duration})` : ''}
|
|
93
|
+
${action === 'doubleClick' ? `pyautogui.doubleClick(${x}, ${y}, duration=${duration})` : ''}
|
|
94
|
+
${action === 'rightClick' ? `pyautogui.rightClick(${x}, ${y}, duration=${duration})` : ''}
|
|
95
|
+
${action === 'scroll' ? `pyautogui.moveTo(${x}, ${y})\npyautogui.scroll(${scrollDirection === 'down' ? -(scrollAmount ?? 3) : (scrollAmount ?? 3)})` : ''}
|
|
96
|
+
print("done")
|
|
97
97
|
`.trim();
|
|
98
98
|
const out = await runPython(script);
|
|
99
99
|
emitProgress({ type: 'tool:end', label: `Mouse ${action} complete` });
|
|
@@ -129,15 +129,15 @@ export const keyboardTool = {
|
|
|
129
129
|
emitProgress({ type: 'tool:start', label: `Keyboard ${action}` });
|
|
130
130
|
// Escape backslashes and quotes for safe embedding in Python string
|
|
131
131
|
const escapedText = (text ?? '').replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
132
|
-
const script = `
|
|
133
|
-
import pyautogui
|
|
134
|
-
pyautogui.FAILSAFE = True
|
|
135
|
-
pyautogui.PAUSE = 0.05
|
|
136
|
-
|
|
137
|
-
${action === 'type' ? `pyautogui.typewrite('${escapedText}', interval=${interval})` : ''}
|
|
138
|
-
${action === 'press' ? `pyautogui.press('${key}')` : ''}
|
|
139
|
-
${action === 'hotkey' ? `pyautogui.hotkey(${hotkey.map((k) => `'${k}'`).join(', ')})` : ''}
|
|
140
|
-
print("done")
|
|
132
|
+
const script = `
|
|
133
|
+
import pyautogui
|
|
134
|
+
pyautogui.FAILSAFE = True
|
|
135
|
+
pyautogui.PAUSE = 0.05
|
|
136
|
+
|
|
137
|
+
${action === 'type' ? `pyautogui.typewrite('${escapedText}', interval=${interval})` : ''}
|
|
138
|
+
${action === 'press' ? `pyautogui.press('${key}')` : ''}
|
|
139
|
+
${action === 'hotkey' ? `pyautogui.hotkey(${hotkey.map((k) => `'${k}'`).join(', ')})` : ''}
|
|
140
|
+
print("done")
|
|
141
141
|
`.trim();
|
|
142
142
|
const out = await runPython(script);
|
|
143
143
|
emitProgress({ type: 'tool:end', label: `Keyboard ${action} complete` });
|
|
@@ -165,11 +165,11 @@ export const screenReadTool = {
|
|
|
165
165
|
const regionArg = region
|
|
166
166
|
? `region=(${region.x}, ${region.y}, ${region.width}, ${region.height})`
|
|
167
167
|
: '';
|
|
168
|
-
const script = `
|
|
169
|
-
import pyautogui
|
|
170
|
-
img = pyautogui.screenshot(${regionArg})
|
|
171
|
-
img.save('${outFile.replace(/\\/g, '\\\\')}')
|
|
172
|
-
print(f"{img.width}x{img.height}")
|
|
168
|
+
const script = `
|
|
169
|
+
import pyautogui
|
|
170
|
+
img = pyautogui.screenshot(${regionArg})
|
|
171
|
+
img.save('${outFile.replace(/\\/g, '\\\\')}')
|
|
172
|
+
print(f"{img.width}x{img.height}")
|
|
173
173
|
`.trim();
|
|
174
174
|
const out = await runPython(script);
|
|
175
175
|
const [w, h] = out.trim().split('x').map(Number);
|
|
@@ -200,28 +200,28 @@ export const windowTool = {
|
|
|
200
200
|
if (!approved)
|
|
201
201
|
throw new Error('Blocked window action.');
|
|
202
202
|
emitProgress({ type: 'tool:start', label: `Window ${action}`, detail: title ?? '' });
|
|
203
|
-
const script = `
|
|
204
|
-
import pygetwindow as gw
|
|
205
|
-
import json
|
|
206
|
-
|
|
207
|
-
${action === 'list' ? `
|
|
208
|
-
wins = gw.getAllWindows()
|
|
209
|
-
print(json.dumps([{"title": w.title, "width": w.width, "height": w.height, "x": w.left, "y": w.top, "visible": w.visible} for w in wins if w.title.strip()]))
|
|
210
|
-
` : ''}
|
|
211
|
-
${action !== 'list' ? `
|
|
212
|
-
wins = gw.getWindowsWithTitle('${title}')
|
|
213
|
-
if not wins:
|
|
214
|
-
print(json.dumps({"error": "Window not found: ${title}"}))
|
|
215
|
-
else:
|
|
216
|
-
w = wins[0]
|
|
217
|
-
${action === 'focus' ? 'w.activate()' : ''}
|
|
218
|
-
${action === 'minimize' ? 'w.minimize()' : ''}
|
|
219
|
-
${action === 'maximize' ? 'w.maximize()' : ''}
|
|
220
|
-
${action === 'close' ? 'w.close()' : ''}
|
|
221
|
-
${action === 'resize' && width && height ? `w.resizeTo(${width}, ${height})` : ''}
|
|
222
|
-
${action === 'resize' && x !== undefined && y !== undefined ? `w.moveTo(${x}, ${y})` : ''}
|
|
223
|
-
print(json.dumps({"title": w.title, "action": "${action}", "done": True}))
|
|
224
|
-
` : ''}
|
|
203
|
+
const script = `
|
|
204
|
+
import pygetwindow as gw
|
|
205
|
+
import json
|
|
206
|
+
|
|
207
|
+
${action === 'list' ? `
|
|
208
|
+
wins = gw.getAllWindows()
|
|
209
|
+
print(json.dumps([{"title": w.title, "width": w.width, "height": w.height, "x": w.left, "y": w.top, "visible": w.visible} for w in wins if w.title.strip()]))
|
|
210
|
+
` : ''}
|
|
211
|
+
${action !== 'list' ? `
|
|
212
|
+
wins = gw.getWindowsWithTitle('${title}')
|
|
213
|
+
if not wins:
|
|
214
|
+
print(json.dumps({"error": "Window not found: ${title}"}))
|
|
215
|
+
else:
|
|
216
|
+
w = wins[0]
|
|
217
|
+
${action === 'focus' ? 'w.activate()' : ''}
|
|
218
|
+
${action === 'minimize' ? 'w.minimize()' : ''}
|
|
219
|
+
${action === 'maximize' ? 'w.maximize()' : ''}
|
|
220
|
+
${action === 'close' ? 'w.close()' : ''}
|
|
221
|
+
${action === 'resize' && width && height ? `w.resizeTo(${width}, ${height})` : ''}
|
|
222
|
+
${action === 'resize' && x !== undefined && y !== undefined ? `w.moveTo(${x}, ${y})` : ''}
|
|
223
|
+
print(json.dumps({"title": w.title, "action": "${action}", "done": True}))
|
|
224
|
+
` : ''}
|
|
225
225
|
`.trim();
|
|
226
226
|
const out = await runPython(script);
|
|
227
227
|
try {
|
|
@@ -258,19 +258,19 @@ export const findElementTool = {
|
|
|
258
258
|
throw new Error('Blocked findOnScreen.');
|
|
259
259
|
emitProgress({ type: 'tool:start', label: 'Locating element on screen' });
|
|
260
260
|
const regionArg = region ? `region=(${region.x}, ${region.y}, ${region.width}, ${region.height})` : '';
|
|
261
|
-
const script = `
|
|
262
|
-
import pyautogui
|
|
263
|
-
import json
|
|
264
|
-
|
|
265
|
-
try:
|
|
266
|
-
loc = pyautogui.locateOnScreen('${referenceImagePath.replace(/\\/g, '\\\\')}', confidence=${confidence}${regionArg ? ', ' + regionArg : ''})
|
|
267
|
-
if loc:
|
|
268
|
-
center = pyautogui.center(loc)
|
|
269
|
-
print(json.dumps({"found": True, "x": center.x, "y": center.y, "box": {"left": loc.left, "top": loc.top, "width": loc.width, "height": loc.height}}))
|
|
270
|
-
else:
|
|
271
|
-
print(json.dumps({"found": False}))
|
|
272
|
-
except Exception as e:
|
|
273
|
-
print(json.dumps({"found": False, "error": str(e)}))
|
|
261
|
+
const script = `
|
|
262
|
+
import pyautogui
|
|
263
|
+
import json
|
|
264
|
+
|
|
265
|
+
try:
|
|
266
|
+
loc = pyautogui.locateOnScreen('${referenceImagePath.replace(/\\/g, '\\\\')}', confidence=${confidence}${regionArg ? ', ' + regionArg : ''})
|
|
267
|
+
if loc:
|
|
268
|
+
center = pyautogui.center(loc)
|
|
269
|
+
print(json.dumps({"found": True, "x": center.x, "y": center.y, "box": {"left": loc.left, "top": loc.top, "width": loc.width, "height": loc.height}}))
|
|
270
|
+
else:
|
|
271
|
+
print(json.dumps({"found": False}))
|
|
272
|
+
except Exception as e:
|
|
273
|
+
print(json.dumps({"found": False, "error": str(e)}))
|
|
274
274
|
`.trim();
|
|
275
275
|
const out = await runPython(script);
|
|
276
276
|
const result = JSON.parse(out.trim());
|
|
@@ -296,11 +296,11 @@ export const dragTool = {
|
|
|
296
296
|
if (!approved)
|
|
297
297
|
throw new Error('Blocked drag action.');
|
|
298
298
|
emitProgress({ type: 'tool:start', label: 'Dragging', detail: `(${fromX},${fromY}) → (${toX},${toY})` });
|
|
299
|
-
const script = `
|
|
300
|
-
import pyautogui
|
|
301
|
-
pyautogui.FAILSAFE = True
|
|
302
|
-
pyautogui.dragTo(${toX}, ${toY}, duration=${duration}, startX=${fromX}, startY=${fromY}, button='${button}')
|
|
303
|
-
print("done")
|
|
299
|
+
const script = `
|
|
300
|
+
import pyautogui
|
|
301
|
+
pyautogui.FAILSAFE = True
|
|
302
|
+
pyautogui.dragTo(${toX}, ${toY}, duration=${duration}, startX=${fromX}, startY=${fromY}, button='${button}')
|
|
303
|
+
print("done")
|
|
304
304
|
`.trim();
|
|
305
305
|
const out = await runPython(script);
|
|
306
306
|
emitProgress({ type: 'tool:end', label: 'Drag complete' });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-app-ledger.tool.d.ts","sourceRoot":"","sources":["../../src/tools/cross-app-ledger.tool.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,mBAAmB;;;;;CA2D/B,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { tool } from 'ai';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { emitProgress } from '../runtime/progress.js';
|
|
4
|
+
import { Composio } from '@composio/core';
|
|
5
|
+
import { VercelProvider } from '@composio/vercel';
|
|
6
|
+
import { env } from '../config/env.js';
|
|
7
|
+
import { loadComposioSession } from '../memory/composio-session.js';
|
|
8
|
+
async function getComposioSession(chatSessionId) {
|
|
9
|
+
const composio = new Composio({
|
|
10
|
+
provider: new VercelProvider(),
|
|
11
|
+
apiKey: env.composioApiKey ?? null,
|
|
12
|
+
});
|
|
13
|
+
const saved = await loadComposioSession(chatSessionId);
|
|
14
|
+
if (!saved?.sessionId)
|
|
15
|
+
return null;
|
|
16
|
+
return composio.use(saved.sessionId);
|
|
17
|
+
}
|
|
18
|
+
export const crossAppLedgerTools = {
|
|
19
|
+
correlateBusinessData: tool({
|
|
20
|
+
description: 'Correlate data across Stripe (Revenue), HubSpot (Deals), and GitHub (PRs) to provide a single source of truth for business ROI.',
|
|
21
|
+
inputSchema: z.object({
|
|
22
|
+
query: z.string().describe('The search query to match (e.g., customer email, name, or project keyword).'),
|
|
23
|
+
sessionId: z.string().optional().default('default').describe('The chat session ID to reuse Composio credentials.'),
|
|
24
|
+
}),
|
|
25
|
+
execute: async ({ query, sessionId }) => {
|
|
26
|
+
emitProgress({ type: 'tool:start', label: 'Correlating business data', detail: query });
|
|
27
|
+
const session = await getComposioSession(sessionId);
|
|
28
|
+
if (!session) {
|
|
29
|
+
return { error: 'Composio session not found. Please ensure Composio is setup and a session is active.' };
|
|
30
|
+
}
|
|
31
|
+
const results = {
|
|
32
|
+
query,
|
|
33
|
+
hubspot: null,
|
|
34
|
+
stripe: null,
|
|
35
|
+
github: null,
|
|
36
|
+
summary: '',
|
|
37
|
+
};
|
|
38
|
+
try {
|
|
39
|
+
// 1. Search HubSpot Contacts
|
|
40
|
+
emitProgress({ type: 'step', label: 'Searching HubSpot CRM', detail: query });
|
|
41
|
+
const hubspotResult = await session.execute('HUBSPOT_SEARCH_CONTACTS', { query }).catch(() => null);
|
|
42
|
+
results.hubspot = hubspotResult;
|
|
43
|
+
// 2. Search Stripe Customers
|
|
44
|
+
emitProgress({ type: 'step', label: 'Searching Stripe Payments', detail: query });
|
|
45
|
+
// Stripe query usually needs a field, if it's an email we use email~
|
|
46
|
+
const stripeQuery = query.includes('@') ? `email~'${query}'` : `name~'${query}'`;
|
|
47
|
+
const stripeResult = await session.execute('STRIPE_SEARCH_CUSTOMERS', { query: stripeQuery }).catch(() => null);
|
|
48
|
+
results.stripe = stripeResult;
|
|
49
|
+
// 3. Search GitHub Issues/PRs
|
|
50
|
+
emitProgress({ type: 'step', label: 'Searching GitHub Engineering', detail: query });
|
|
51
|
+
const githubResult = await session.execute('GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS', { q: query }).catch(() => null);
|
|
52
|
+
results.github = githubResult;
|
|
53
|
+
// Aggregate Summary
|
|
54
|
+
const contact = hubspotResult?.data?.[0] || {};
|
|
55
|
+
const customer = stripeResult?.data?.[0] || {};
|
|
56
|
+
const prs = githubResult?.data?.total_count || 0;
|
|
57
|
+
const name = contact.firstname || 'unknown';
|
|
58
|
+
const customerId = customer.id || 'none';
|
|
59
|
+
results.summary = `Found ${name} in HubSpot, linked to Stripe customer ${customerId}. Engineering activity: ${prs} related issues/PRs found.`;
|
|
60
|
+
emitProgress({ type: 'tool:end', label: 'Correlation complete' });
|
|
61
|
+
return results;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
emitProgress({ type: 'tool:error', label: 'Correlation failed', detail: String(error) });
|
|
65
|
+
return { ...results, error: String(error) };
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=cross-app-ledger.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-app-ledger.tool.js","sourceRoot":"","sources":["../../src/tools/cross-app-ledger.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,KAAK,UAAU,kBAAkB,CAAC,aAAqB;IACrD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC;QAC5B,Q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,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBAC/C,MAAM,GAAG,GAAG,YAAY,EAAE,IAAI,EAAE,WAAW,IAAI,CAAC,CAAC;gBAEjD,MAAM,IAAI,GAAI,OAAe,CAAC,SAAS,IAAI,SAAS,CAAC;gBACrD,MAAM,UAAU,GAAI,QAAgB,CAAC,EAAE,IAAI,MAAM,CAAC;gBAElD,OAAO,CAAC,OAAO,GAAG,SAAS,IAAI,0CAA0C,UAAU,2BAA2B,GAAG,4BAA4B,CAAC;gBAE9I,YAAY,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC;gBAClE,OAAO,OAAO,CAAC;YACjB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACzF,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9C,CAAC;QACH,CAAC;KACF,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export declare const sandboxLifecycleTools: {
|
|
2
|
+
getOrCreateBrowserSandbox: import("ai").Tool<{
|
|
3
|
+
ephemeral: boolean;
|
|
4
|
+
}, {
|
|
5
|
+
sandboxId: string;
|
|
6
|
+
reused: boolean;
|
|
7
|
+
ephemeral?: never;
|
|
8
|
+
} | {
|
|
9
|
+
sandboxId: string;
|
|
10
|
+
reused: boolean;
|
|
11
|
+
ephemeral: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
closeBrowserSandbox: import("ai").Tool<Record<string, never>, {
|
|
14
|
+
closed: boolean;
|
|
15
|
+
message: string;
|
|
16
|
+
sandboxId?: never;
|
|
17
|
+
} | {
|
|
18
|
+
closed: boolean;
|
|
19
|
+
sandboxId: string | null;
|
|
20
|
+
message?: never;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
export declare const browsingTools: {
|
|
24
|
+
browserNavigate: import("ai").Tool<{
|
|
25
|
+
url: string;
|
|
26
|
+
timeoutMs: number;
|
|
27
|
+
waitForSelector?: string | undefined;
|
|
28
|
+
}, Record<string, unknown>>;
|
|
29
|
+
browserAction: import("ai").Tool<{
|
|
30
|
+
action: "fill" | "check" | "click" | "scroll" | "press" | "select" | "uncheck" | "waitFor";
|
|
31
|
+
selector: string;
|
|
32
|
+
timeoutMs: number;
|
|
33
|
+
value?: string | undefined;
|
|
34
|
+
}, Record<string, unknown>>;
|
|
35
|
+
browserRunScript: import("ai").Tool<{
|
|
36
|
+
startUrl: string;
|
|
37
|
+
scriptBody: string;
|
|
38
|
+
timeoutMs: number;
|
|
39
|
+
headless: boolean;
|
|
40
|
+
}, Record<string, unknown>>;
|
|
41
|
+
browserExtract: import("ai").Tool<{
|
|
42
|
+
url: string;
|
|
43
|
+
fields: {
|
|
44
|
+
name: string;
|
|
45
|
+
selector: string;
|
|
46
|
+
multiple: boolean;
|
|
47
|
+
attribute?: string | undefined;
|
|
48
|
+
}[];
|
|
49
|
+
timeoutMs: number;
|
|
50
|
+
}, Record<string, unknown>>;
|
|
51
|
+
browserScreenshot: import("ai").Tool<{
|
|
52
|
+
fullPage: boolean;
|
|
53
|
+
url?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
localPath: string;
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
58
|
+
export declare const daytonaBrowserTools: {
|
|
59
|
+
browserNavigate: import("ai").Tool<{
|
|
60
|
+
url: string;
|
|
61
|
+
timeoutMs: number;
|
|
62
|
+
waitForSelector?: string | undefined;
|
|
63
|
+
}, Record<string, unknown>>;
|
|
64
|
+
browserAction: import("ai").Tool<{
|
|
65
|
+
action: "fill" | "check" | "click" | "scroll" | "press" | "select" | "uncheck" | "waitFor";
|
|
66
|
+
selector: string;
|
|
67
|
+
timeoutMs: number;
|
|
68
|
+
value?: string | undefined;
|
|
69
|
+
}, Record<string, unknown>>;
|
|
70
|
+
browserRunScript: import("ai").Tool<{
|
|
71
|
+
startUrl: string;
|
|
72
|
+
scriptBody: string;
|
|
73
|
+
timeoutMs: number;
|
|
74
|
+
headless: boolean;
|
|
75
|
+
}, Record<string, unknown>>;
|
|
76
|
+
browserExtract: import("ai").Tool<{
|
|
77
|
+
url: string;
|
|
78
|
+
fields: {
|
|
79
|
+
name: string;
|
|
80
|
+
selector: string;
|
|
81
|
+
multiple: boolean;
|
|
82
|
+
attribute?: string | undefined;
|
|
83
|
+
}[];
|
|
84
|
+
timeoutMs: number;
|
|
85
|
+
}, Record<string, unknown>>;
|
|
86
|
+
browserScreenshot: import("ai").Tool<{
|
|
87
|
+
fullPage: boolean;
|
|
88
|
+
url?: string | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
localPath: string;
|
|
91
|
+
}>;
|
|
92
|
+
getOrCreateBrowserSandbox: import("ai").Tool<{
|
|
93
|
+
ephemeral: boolean;
|
|
94
|
+
}, {
|
|
95
|
+
sandboxId: string;
|
|
96
|
+
reused: boolean;
|
|
97
|
+
ephemeral?: never;
|
|
98
|
+
} | {
|
|
99
|
+
sandboxId: string;
|
|
100
|
+
reused: boolean;
|
|
101
|
+
ephemeral: boolean;
|
|
102
|
+
}>;
|
|
103
|
+
closeBrowserSandbox: import("ai").Tool<Record<string, never>, {
|
|
104
|
+
closed: boolean;
|
|
105
|
+
message: string;
|
|
106
|
+
sandboxId?: never;
|
|
107
|
+
} | {
|
|
108
|
+
closed: boolean;
|
|
109
|
+
sandboxId: string | null;
|
|
110
|
+
message?: never;
|
|
111
|
+
}>;
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=daytona-browser.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daytona-browser.tool.d.ts","sourceRoot":"","sources":["../../src/tools/daytona-browser.tool.ts"],"names":[],"mappings":"AAyHA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;CAuEjC,CAAC;AAWF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwMzB,CAAC;AAIF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG/B,CAAC"}
|