machinaos 0.0.12 → 0.0.13

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 (41) hide show
  1. package/client/package.json +1 -1
  2. package/client/src/components/OutputPanel.tsx +3 -2
  3. package/client/src/components/parameterPanel/InputSection.tsx +4 -3
  4. package/package.json +1 -1
  5. package/server/routers/websocket.py +5 -5
  6. package/server/services/ai.py +38 -13
  7. package/server/services/deployment/manager.py +14 -0
  8. package/server/services/execution/executor.py +2 -0
  9. package/server/services/execution/models.py +8 -0
  10. package/server/services/handlers/ai.py +71 -23
  11. package/server/services/handlers/tools.py +103 -6
  12. package/server/skills/android_agent/app-launcher-skill/SKILL.md +137 -0
  13. package/server/skills/android_agent/app-list-skill/SKILL.md +148 -0
  14. package/server/skills/android_agent/audio-skill/SKILL.md +169 -0
  15. package/server/skills/android_agent/battery-skill/SKILL.md +114 -0
  16. package/server/skills/android_agent/bluetooth-skill/SKILL.md +151 -0
  17. package/server/skills/android_agent/camera-skill/SKILL.md +148 -0
  18. package/server/skills/android_agent/environmental-skill/SKILL.md +140 -0
  19. package/server/skills/android_agent/location-skill/SKILL.md +163 -0
  20. package/server/skills/android_agent/motion-skill/SKILL.md +141 -0
  21. package/server/skills/android_agent/screen-control-skill/SKILL.md +164 -0
  22. package/server/skills/android_agent/wifi-skill/SKILL.md +182 -0
  23. package/server/skills/assistant/subagent-skill/SKILL.md +62 -30
  24. package/server/skills/coding_agent/javascript-skill/SKILL.md +196 -0
  25. package/server/skills/coding_agent/python-skill/SKILL.md +165 -0
  26. package/server/skills/social_agent/whatsapp-db-skill/SKILL.md +284 -0
  27. package/server/skills/social_agent/whatsapp-send-skill/SKILL.md +180 -0
  28. package/server/skills/task_agent/cron-scheduler-skill/SKILL.md +215 -0
  29. package/server/skills/task_agent/task-manager-skill/SKILL.md +251 -0
  30. package/server/skills/task_agent/timer-skill/SKILL.md +168 -0
  31. package/server/skills/travel_agent/geocoding-skill/SKILL.md +186 -0
  32. package/server/skills/travel_agent/nearby-places-skill/SKILL.md +234 -0
  33. package/server/skills/web_agent/http-request-skill/SKILL.md +211 -0
  34. package/server/skills/android/skill/SKILL.md +0 -84
  35. package/server/skills/assistant/code-skill/SKILL.md +0 -176
  36. package/server/skills/assistant/http-skill/SKILL.md +0 -163
  37. package/server/skills/assistant/maps-skill/SKILL.md +0 -172
  38. package/server/skills/assistant/scheduler-skill/SKILL.md +0 -86
  39. package/server/skills/assistant/whatsapp-skill/SKILL.md +0 -285
  40. /package/server/skills/{android → android_agent}/personality/SKILL.md +0 -0
  41. /package/server/skills/{assistant → web_agent}/web-search-skill/SKILL.md +0 -0
@@ -1,176 +0,0 @@
1
- ---
2
- name: code-skill
3
- description: Execute Python or JavaScript code for calculations, data processing, and automation. Use when user needs to run code, do calculations, or process data.
4
- allowed-tools: python_code javascript_code
5
- metadata:
6
- author: machina
7
- version: "3.0"
8
- category: code
9
- icon: "💻"
10
- color: "#F59E0B"
11
- ---
12
-
13
- # Code Execution
14
-
15
- This skill enables you to execute Python and JavaScript code for various tasks using the `python_code` and `javascript_code` tools.
16
-
17
- ## Tool: python_code
18
-
19
- Execute Python code for calculations, data processing, and automation.
20
-
21
- ### Parameters
22
-
23
- | Parameter | Type | Required | Description |
24
- |-----------|------|----------|-------------|
25
- | `code` | string | Yes | Python code to execute. Set `output` variable with result. Use `print()` for console output. |
26
-
27
- ### Available Libraries
28
- - Standard library: `math`, `json`, `datetime`, `timedelta`, `re`, `random`
29
- - Collections: `Counter`, `defaultdict`
30
- - All built-in functions
31
-
32
- ### Variables Available
33
- - `input_data` - Data from connected workflow nodes (dict)
34
- - `output` - Set this variable to return a result
35
-
36
- ### Returns
37
-
38
- | Field | Type | Description |
39
- |-------|------|-------------|
40
- | `success` | boolean | Whether execution succeeded |
41
- | `result` | any | Value of `output` variable if set |
42
- | `output` | string | Captured print() statements |
43
- | `error` | string | Error message if execution failed |
44
-
45
- ### Example Usage
46
- ```python
47
- # Calculate with data
48
- data = input_data.get("numbers", [1, 2, 3])
49
- total = sum(data)
50
- average = total / len(data)
51
- print(f"Total: {total}, Average: {average}")
52
- output = {"total": total, "average": average}
53
- ```
54
-
55
- ---
56
-
57
- ## Tool: javascript_code
58
-
59
- Execute JavaScript code for calculations, data processing, and JSON manipulation.
60
-
61
- ### Parameters
62
-
63
- | Parameter | Type | Required | Description |
64
- |-----------|------|----------|-------------|
65
- | `code` | string | Yes | JavaScript code to execute. Set `output` variable with result. Use `console.log()` for output. |
66
-
67
- ### Variables Available
68
- - `input_data` - Data from connected workflow nodes (object)
69
- - `output` - Set this variable to return a result
70
-
71
- ### Returns
72
-
73
- | Field | Type | Description |
74
- |-------|------|-------------|
75
- | `success` | boolean | Whether execution succeeded |
76
- | `result` | any | Value of `output` variable if set |
77
- | `output` | string | Captured console.log() statements |
78
- | `error` | string | Error message if execution failed |
79
-
80
- ### Example Usage
81
- ```javascript
82
- // Process JSON data
83
- const data = input_data.numbers || [1, 2, 3];
84
- const total = data.reduce((a, b) => a + b, 0);
85
- const average = total / data.length;
86
- console.log(`Total: ${total}, Average: ${average}`);
87
- output = { total, average };
88
- ```
89
-
90
- ---
91
-
92
- ## Examples
93
-
94
- ### Calculate a tip (Python)
95
- **User**: "Calculate 15% tip on $85.50"
96
-
97
- **Tool Call** (python_code):
98
- ```json
99
- {
100
- "code": "bill = 85.50\ntip_percent = 15\ntip = bill * (tip_percent / 100)\ntotal = bill + tip\nprint(f\"Tip: ${tip:.2f}\")\nprint(f\"Total: ${total:.2f}\")\noutput = {\"tip\": tip, \"total\": total}"
101
- }
102
- ```
103
-
104
- ### Generate random numbers (Python)
105
- **User**: "Generate 5 random numbers between 1 and 100"
106
-
107
- **Tool Call** (python_code):
108
- ```json
109
- {
110
- "code": "import random\nnumbers = [random.randint(1, 100) for _ in range(5)]\nprint(f\"Random numbers: {numbers}\")\noutput = numbers"
111
- }
112
- ```
113
-
114
- ### Process JSON data (JavaScript)
115
- **User**: "Sum all the values in this object"
116
-
117
- **Tool Call** (javascript_code):
118
- ```json
119
- {
120
- "code": "const values = Object.values(input_data);\nconst sum = values.reduce((a, b) => a + b, 0);\nconsole.log(`Sum: ${sum}`);\noutput = sum;"
121
- }
122
- ```
123
-
124
- ### Date calculations (Python)
125
- **User**: "What date is 30 days from now?"
126
-
127
- **Tool Call** (python_code):
128
- ```json
129
- {
130
- "code": "from datetime import datetime, timedelta\ntoday = datetime.now()\nfuture = today + timedelta(days=30)\nresult = future.strftime('%Y-%m-%d')\nprint(f\"30 days from now: {result}\")\noutput = result"
131
- }
132
- ```
133
-
134
- ### Array manipulation (JavaScript)
135
- **User**: "Filter this array to only even numbers"
136
-
137
- **Tool Call** (javascript_code):
138
- ```json
139
- {
140
- "code": "const numbers = input_data.numbers || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst evens = numbers.filter(n => n % 2 === 0);\nconsole.log(`Even numbers: ${evens}`);\noutput = evens;"
141
- }
142
- ```
143
-
144
- ---
145
-
146
- ## When to Use Each Tool
147
-
148
- | Use Case | Recommended Tool |
149
- |----------|------------------|
150
- | Math calculations | `python_code` |
151
- | Date/time operations | `python_code` |
152
- | Data analysis | `python_code` |
153
- | Random number generation | `python_code` |
154
- | JSON manipulation | `javascript_code` |
155
- | Array operations | Either |
156
- | String processing | Either |
157
-
158
- ---
159
-
160
- ## Security Guidelines
161
-
162
- 1. **No file system access** outside designated directories
163
- 2. **No network requests** from code (use http-skill instead)
164
- 3. **No system commands** or shell access
165
- 4. **Limited execution time** (timeout configurable, default 30 seconds)
166
- 5. **No sensitive data** in code outputs
167
-
168
- ## Best Practices
169
-
170
- 1. Keep code simple and focused on one task
171
- 2. Use descriptive variable names
172
- 3. Always set the `output` variable with your result
173
- 4. Use `print()` / `console.log()` for debugging
174
- 5. Handle potential errors gracefully
175
- 6. Prefer Python for math, dates, and data processing
176
- 7. Prefer JavaScript for JSON manipulation
@@ -1,163 +0,0 @@
1
- ---
2
- name: http-skill
3
- description: Make HTTP requests to external APIs and web services. Use when user needs to fetch data from URLs, call APIs, or interact with web services.
4
- allowed-tools: http-request
5
- metadata:
6
- author: machina
7
- version: "2.0"
8
- category: integration
9
- icon: "🌐"
10
- color: "#EF4444"
11
- ---
12
-
13
- # HTTP Requests
14
-
15
- This skill enables you to make HTTP requests to external APIs and web services.
16
-
17
- ## Capabilities
18
-
19
- - Make GET, POST, PUT, DELETE, PATCH requests
20
- - Send JSON payloads in request body
21
- - Set custom headers (authentication, content-type, etc.)
22
- - Handle API responses (JSON and text)
23
-
24
- ## Tool Reference
25
-
26
- ### http-request
27
-
28
- Make an HTTP request to a URL.
29
-
30
- **Parameters:**
31
- | Parameter | Type | Required | Default | Description |
32
- |-----------|------|----------|---------|-------------|
33
- | `url` | string | Yes | - | Full URL to request (e.g., `https://api.example.com/data`) |
34
- | `method` | string | No | `GET` | HTTP method: `GET`, `POST`, `PUT`, `DELETE`, `PATCH` |
35
- | `body` | object | No | null | Request body as JSON object (for POST/PUT/PATCH) |
36
- | `headers` | object | No | null | Custom headers as key-value pairs |
37
-
38
- **Returns:**
39
- | Field | Type | Description |
40
- |-------|------|-------------|
41
- | `status` | number | HTTP status code (200, 404, 500, etc.) |
42
- | `data` | any | Response body (parsed JSON or text) |
43
- | `headers` | object | Response headers |
44
- | `url` | string | Final URL (may differ if redirected) |
45
- | `method` | string | HTTP method used |
46
-
47
- ## Common Use Cases
48
-
49
- ### Fetching Data (GET)
50
- ```json
51
- {
52
- "url": "https://api.example.com/users/123",
53
- "method": "GET"
54
- }
55
- ```
56
-
57
- ### Creating Resources (POST)
58
- ```json
59
- {
60
- "url": "https://api.example.com/users",
61
- "method": "POST",
62
- "body": {"name": "John", "email": "john@example.com"},
63
- "headers": {"Content-Type": "application/json"}
64
- }
65
- ```
66
-
67
- ### Updating Resources (PUT/PATCH)
68
- ```json
69
- {
70
- "url": "https://api.example.com/users/123",
71
- "method": "PUT",
72
- "body": {"name": "John Updated"}
73
- }
74
- ```
75
-
76
- ### Deleting Resources (DELETE)
77
- ```json
78
- {
79
- "url": "https://api.example.com/users/123",
80
- "method": "DELETE"
81
- }
82
- ```
83
-
84
- ### With Authentication
85
- ```json
86
- {
87
- "url": "https://api.example.com/protected",
88
- "method": "GET",
89
- "headers": {
90
- "Authorization": "Bearer your-api-token",
91
- "X-API-Key": "your-api-key"
92
- }
93
- }
94
- ```
95
-
96
- ## Examples
97
-
98
- **User**: "Get the current Bitcoin price"
99
- **Action**: Use http-request with:
100
- ```json
101
- {
102
- "url": "https://api.coindesk.com/v1/bpi/currentprice.json",
103
- "method": "GET"
104
- }
105
- ```
106
-
107
- **User**: "Post this data to my webhook"
108
- **Action**: Use http-request with:
109
- ```json
110
- {
111
- "url": "https://webhook.example.com/endpoint",
112
- "method": "POST",
113
- "body": {"event": "user_action", "data": "..."},
114
- "headers": {"Content-Type": "application/json"}
115
- }
116
- ```
117
-
118
- **User**: "Check if example.com is up"
119
- **Action**: Use http-request with:
120
- ```json
121
- {
122
- "url": "https://example.com",
123
- "method": "GET"
124
- }
125
- ```
126
- Then check if status is 200.
127
-
128
- **User**: "Get weather for New York"
129
- **Action**: Use http-request with:
130
- ```json
131
- {
132
- "url": "https://api.openweathermap.org/data/2.5/weather?q=New York&appid=YOUR_KEY",
133
- "method": "GET"
134
- }
135
- ```
136
-
137
- ## Security Guidelines
138
-
139
- 1. **Never expose API keys** in responses to the user
140
- 2. **Validate URLs** - only request from trusted domains
141
- 3. **Don't make requests** to internal/private networks (localhost, 192.168.x.x, 10.x.x.x)
142
- 4. **Respect rate limits** of external services
143
- 5. **Handle errors gracefully** and inform the user clearly
144
- 6. **Don't store sensitive data** from API responses
145
-
146
- ## Error Handling
147
-
148
- Common HTTP status codes and what they mean:
149
-
150
- | Status | Meaning | Action |
151
- |--------|---------|--------|
152
- | 200-299 | Success | Process the response data |
153
- | 400 | Bad Request | Check request parameters |
154
- | 401 | Unauthorized | Check API key/authentication |
155
- | 403 | Forbidden | Access denied, may need different permissions |
156
- | 404 | Not Found | Check URL path |
157
- | 429 | Too Many Requests | Rate limited, wait before retrying |
158
- | 500-599 | Server Error | External service issue, try again later |
159
-
160
- When an error occurs, inform the user about:
161
- - What was attempted
162
- - What went wrong (status code and message)
163
- - Suggested next steps
@@ -1,172 +0,0 @@
1
- ---
2
- name: maps-skill
3
- description: Location services including geocoding, nearby places, and maps. Use when user asks about addresses, locations, places nearby, or wants to see a map.
4
- metadata:
5
- author: machina
6
- version: "3.0"
7
- category: location
8
- icon: "🗺️"
9
- color: "#4285F4"
10
- ---
11
-
12
- # Location Services
13
-
14
- This skill provides context for location-based capabilities using Google Maps services.
15
-
16
- ## How It Works
17
-
18
- This skill provides instructions and context. To execute location actions, connect the appropriate **tool nodes** to the Zeenie's `input-tools` handle:
19
-
20
- - **Add Locations** node - Geocode addresses to coordinates or reverse geocode
21
- - **Show Nearby Places** node - Search for nearby places
22
-
23
- ## add_locations Tool (Geocoding)
24
-
25
- Convert addresses to coordinates or coordinates to addresses.
26
-
27
- ### Schema Fields
28
-
29
- | Field | Type | Required | Description |
30
- |-------|------|----------|-------------|
31
- | service_type | string | Yes | "geocode" (address to coordinates) or "reverse_geocode" (coordinates to address) |
32
- | address | string | If geocode | Address to geocode (e.g., "1600 Amphitheatre Parkway, Mountain View, CA") |
33
- | lat | float | If reverse_geocode | Latitude coordinate |
34
- | lng | float | If reverse_geocode | Longitude coordinate |
35
-
36
- ### Examples
37
-
38
- **Geocode address:**
39
- ```json
40
- {
41
- "service_type": "geocode",
42
- "address": "Eiffel Tower, Paris"
43
- }
44
- ```
45
-
46
- **Reverse geocode:**
47
- ```json
48
- {
49
- "service_type": "reverse_geocode",
50
- "lat": 48.8584,
51
- "lng": 2.2945
52
- }
53
- ```
54
-
55
- ### Response Format
56
-
57
- ```json
58
- {
59
- "success": true,
60
- "service_type": "geocoding",
61
- "input": {"address": "Eiffel Tower, Paris"},
62
- "results": [
63
- {
64
- "formatted_address": "Champ de Mars, 5 Av. Anatole France, 75007 Paris, France",
65
- "geometry": {
66
- "location": {"lat": 48.8583701, "lng": 2.2944813}
67
- },
68
- "address_components": [...]
69
- }
70
- ],
71
- "status": "OK"
72
- }
73
- ```
74
-
75
- ## show_nearby_places Tool
76
-
77
- Search for places near a location.
78
-
79
- ### Schema Fields
80
-
81
- | Field | Type | Required | Description |
82
- |-------|------|----------|-------------|
83
- | lat | float | Yes | Center latitude for search |
84
- | lng | float | Yes | Center longitude for search |
85
- | radius | int | No | Search radius in meters (default: 500, max: 50000) |
86
- | type | string | No | Place type (default: "restaurant") |
87
- | keyword | string | No | Optional keyword to filter results |
88
-
89
- ### Examples
90
-
91
- **Find nearby restaurants:**
92
- ```json
93
- {
94
- "lat": 40.7484,
95
- "lng": -73.9857,
96
- "radius": 500,
97
- "type": "restaurant"
98
- }
99
- ```
100
-
101
- **Find coffee shops near a location:**
102
- ```json
103
- {
104
- "lat": 37.7749,
105
- "lng": -122.4194,
106
- "type": "cafe",
107
- "keyword": "starbucks"
108
- }
109
- ```
110
-
111
- ### Response Format
112
-
113
- ```json
114
- {
115
- "success": true,
116
- "type": "restaurant",
117
- "search_parameters": {
118
- "location": {"lat": 40.7484, "lng": -73.9857},
119
- "radius": 500,
120
- "type": "restaurant"
121
- },
122
- "results": [
123
- {
124
- "name": "Example Restaurant",
125
- "vicinity": "123 Main St",
126
- "rating": 4.5,
127
- "user_ratings_total": 150,
128
- "price_level": 2,
129
- "geometry": {
130
- "location": {"lat": 40.7485, "lng": -73.9860}
131
- },
132
- "types": ["restaurant", "food"],
133
- "opening_hours": {"open_now": true}
134
- }
135
- ],
136
- "total_results": 10,
137
- "status": "OK"
138
- }
139
- ```
140
-
141
- ## Place Types
142
-
143
- Common place types for nearby search:
144
- - Food: restaurant, cafe, bakery, bar, meal_takeaway
145
- - Shopping: store, supermarket, shopping_mall, clothing_store
146
- - Services: bank, atm, gas_station, pharmacy, post_office
147
- - Health: hospital, doctor, dentist, pharmacy
148
- - Transport: bus_station, train_station, airport, taxi_stand
149
- - Entertainment: movie_theater, gym, park, museum, zoo
150
-
151
- ## Common Workflows
152
-
153
- ### Find nearby places by address
154
- 1. Use `add_locations` with service_type="geocode" to get coordinates
155
- 2. Use `show_nearby_places` with the returned lat/lng
156
-
157
- ### Get address from coordinates
158
- 1. Use `add_locations` with service_type="reverse_geocode"
159
-
160
- ## Response Guidelines
161
-
162
- When presenting location results:
163
- 1. List the top results with name, rating, and address
164
- 2. Include distance if available
165
- 3. Mention if places are currently open
166
- 4. Offer to search for different types or expand radius
167
-
168
- ## Setup Requirements
169
-
170
- 1. Connect this skill to Zeenie's `input-skill` handle
171
- 2. Connect location tool nodes to Zeenie's `input-tools` handle
172
- 3. Ensure Google Maps API key is configured in credentials
@@ -1,86 +0,0 @@
1
- ---
2
- name: scheduler-skill
3
- description: Schedule tasks and set timers. Use when user wants to schedule something, set a reminder, create a recurring task, or use cron expressions.
4
- metadata:
5
- author: machina
6
- version: "2.0"
7
- category: automation
8
- icon: "⏰"
9
- color: "#10B981"
10
- ---
11
-
12
- # Task Scheduling
13
-
14
- This skill provides context for scheduling tasks, setting timers, and creating recurring jobs.
15
-
16
- ## How It Works
17
-
18
- This skill provides instructions and context. Scheduling is handled through workflow deployment:
19
-
20
- - **Cron Scheduler** trigger node - Recurring schedules using cron expressions
21
- - **Timer** trigger node - One-time delayed execution
22
- - **Workflow Trigger** node - Manual workflow execution
23
-
24
- ## Capabilities
25
-
26
- When used with workflow triggers:
27
- - Create one-time timers
28
- - Set up recurring schedules with cron expressions
29
- - Deploy workflows that run on schedule
30
-
31
- ## Cron Expression Format
32
-
33
- ```
34
- * * * * *
35
- | | | | |
36
- | | | | +-- Day of week (0-7, Sun=0 or 7)
37
- | | | +---- Month (1-12)
38
- | | +------ Day of month (1-31)
39
- | +-------- Hour (0-23)
40
- +---------- Minute (0-59)
41
- ```
42
-
43
- ### Common Patterns
44
-
45
- | Pattern | Description |
46
- |---------|-------------|
47
- | `0 9 * * *` | Every day at 9:00 AM |
48
- | `0 9 * * 1-5` | Weekdays at 9:00 AM |
49
- | `*/15 * * * *` | Every 15 minutes |
50
- | `0 0 1 * *` | First day of each month |
51
- | `0 8,12,18 * * *` | At 8am, noon, and 6pm |
52
-
53
- ## Example Interactions
54
-
55
- **User**: "Remind me in 30 minutes"
56
- - This requires setting up a Timer trigger workflow
57
- - Inform user: "I can help you create a scheduled workflow. Set up a Timer trigger node with 30 minute delay."
58
-
59
- **User**: "Send a daily report at 9am"
60
- - This requires a Cron Scheduler workflow
61
- - Inform user: "Create a workflow with Cron Scheduler trigger using expression '0 9 * * *'"
62
-
63
- **User**: "Check for updates every hour"
64
- - This requires a Cron Scheduler workflow
65
- - Inform user: "Create a workflow with Cron Scheduler trigger using expression '0 * * * *'"
66
-
67
- ## Workflow-Based Scheduling
68
-
69
- In this system, scheduling is achieved through:
70
-
71
- 1. **Trigger Nodes**: Cron Scheduler or Timer nodes start workflows
72
- 2. **Workflow Deployment**: Deploy the workflow to activate the schedule
73
- 3. **Cancel**: Undeploy the workflow to cancel the schedule
74
-
75
- ## Best Practices
76
-
77
- 1. Explain that schedules require workflow deployment
78
- 2. Provide the cron expression for the user's request
79
- 3. Confirm timezone considerations for time-sensitive tasks
80
- 4. Help users understand workflow-based scheduling model
81
-
82
- ## Limitations
83
-
84
- - This skill provides guidance only
85
- - Actual scheduling requires workflow creation and deployment
86
- - Cannot directly create/cancel schedules via chat commands