Skip to content

Commit 5d26072

Browse files
authored
Merge pull request #262 from microsoft/vyokky/dev
Vyokky/dev
2 parents 3bcc7a3 + de34610 commit 5d26072

112 files changed

Lines changed: 9766 additions & 5550 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/ufo/system.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TOP_P: 0.0 # The top_p of the model: the lower the value, the more conservative
88
TIMEOUT: 60 # The call timeout(s), default is 1 mins
99

1010
# Control Backend
11-
CONTROL_BACKEND: ["uia"] # The backend for control action: uia, win32, omniparser
11+
CONTROL_BACKEND: ["uia"] # The backend for control action: uia, omniparser
1212
IOU_THRESHOLD_FOR_MERGE: 0.1 # The iou threshold for merging the boxes between controls
1313

1414
# Execution Limits

documents/docs/configuration/system/agents_config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ APP_AGENT:
212212
API_PROMPT: "ufo/prompts/share/base/api.yaml"
213213
```
214214

215-
You can customize prompts by creating your own YAML files and updating these paths. See the [Customization Guide](../../tutorials/customization.md) for details.
215+
You can customize prompts by creating your own YAML files and updating these paths. See the [Customization Guide](../../ufo2/advanced_usage/customization.md) for details.
216216

217217
#### OPERATOR-Specific Fields
218218

documents/docs/galaxy/constellation_agent/command.md

Lines changed: 65 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# Constellation MCP Server — Structured Task Management
22

3-
!!!quote "The Manipulation Layer for Task Constellations"
4-
The **Constellation MCP Server** provides a standardized, idempotent interface for manipulating Task Constellations. Through Model Context Protocol (MCP), it exposes task and dependency management primitives that bridge LLM-level reasoning and concrete execution state, ensuring reproducibility and auditability.
3+
## Overview
54

6-
---
7-
8-
## 🎯 Overview
5+
The **Constellation MCP Server** provides a standardized, idempotent interface for manipulating Task Constellations. Through Model Context Protocol (MCP), it exposes task and dependency management primitives that bridge LLM-level reasoning and concrete execution state, ensuring reproducibility and auditability.
96

107
The Constellation MCP Server is a lightweight component that operationalizes dynamic graph construction for the Constellation Agent. It serves as the **structured manipulation layer** between LLM reasoning and the Task Constellation data structure.
118

@@ -85,8 +82,8 @@ Add a new atomic task (TaskStar) to the constellation.
8582
| `task_id` | `str` | ✅ Yes | Unique identifier for the task (e.g., `"open_browser"`, `"login_system"`) |
8683
| `name` | `str` | ✅ Yes | Human-readable name (e.g., `"Open Browser"`, `"Login to System"`) |
8784
| `description` | `str` | ✅ Yes | Detailed task specification including steps and expected outcomes |
88-
| `target_device_id` | `str` | ❌ No | Device where task executes (e.g., `"DESKTOP-ABC123"`, `"iPhone-001"`) |
89-
| `tips` | `List[str]` | ❌ No | Critical hints for successful execution |
85+
| `target_device_id` | `str` | ❌ No (default: `None`) | Device where task executes (e.g., `"DESKTOP-ABC123"`, `"iPhone-001"`) |
86+
| `tips` | `List[str]` | ❌ No (default: `None`) | Critical hints for successful execution |
9087

9188
#### Return Value
9289

@@ -123,15 +120,13 @@ constellation = json.loads(result)
123120
#### Validation
124121

125122
- **Unique task_id**: Must not conflict with existing tasks
126-
- **Valid device**: `target_device_id` must exist in AgentProfile registry (if provided)
127123
- **Auto-timestamps**: `created_at` and `updated_at` are automatically set
128124
- **Default values**: `status=PENDING`, `priority=MEDIUM` if not specified
129125

130-
!!!tip "Task ID Naming"
131-
Use descriptive, action-oriented identifiers:
132-
133-
`"fetch_user_data"`, `"train_model"`, `"send_notification"`
134-
`"task1"`, `"t"`, `"temp"`
126+
**Task ID Naming Best Practice**: Use descriptive, action-oriented identifiers:
127+
128+
✅ Good: `"fetch_user_data"`, `"train_model"`, `"send_notification"`
129+
❌ Avoid: `"task1"`, `"t"`, `"temp"`
135130

136131
---
137132

@@ -169,18 +164,17 @@ constellation = json.loads(result)
169164

170165
#### Side Effects
171166

172-
!!!warning "Cascade Deletion"
173-
Removing a task automatically removes:
174-
175-
- All **incoming dependencies** (edges pointing to this task)
176-
- All **outgoing dependencies** (edges from this task)
177-
178-
This maintains DAG integrity by preventing dangling references.
167+
**Cascade Deletion**: Removing a task automatically removes:
168+
169+
- All **incoming dependencies** (edges pointing to this task)
170+
- All **outgoing dependencies** (edges from this task)
171+
172+
This maintains DAG integrity by preventing dangling references.
179173

180174
#### Validation
181175

182176
- **Task exists**: `task_id` must exist in constellation
183-
- **Modifiable status**: Task must be in `PENDING` or `WAITING_DEPENDENCY` (not `RUNNING`, `COMPLETED`, `FAILED`)
177+
- **Modifiable status**: Task must not be in `RUNNING`, `COMPLETED`, or `FAILED` states
184178

185179
---
186180

@@ -193,10 +187,10 @@ Modify specific fields of an existing task.
193187
| Parameter | Type | Required | Description |
194188
|-----------|------|----------|-------------|
195189
| `task_id` | `str` | ✅ Yes | Task identifier |
196-
| `name` | `str` | ❌ No | New human-readable name |
197-
| `description` | `str` | ❌ No | New detailed description |
198-
| `target_device_id` | `str` | ❌ No | New target device |
199-
| `tips` | `List[str]` | ❌ No | New tips list |
190+
| `name` | `str` | ❌ No (default: `None`) | New human-readable name |
191+
| `description` | `str` | ❌ No (default: `None`) | New detailed description |
192+
| `target_device_id` | `str` | ❌ No (default: `None`) | New target device |
193+
| `tips` | `List[str]` | ❌ No (default: `None`) | New tips list |
200194

201195
#### Return Value
202196

@@ -262,7 +256,7 @@ Create a dependency relationship (TaskStarLine) between two tasks.
262256
| `dependency_id` | `str` | ✅ Yes | Unique line identifier (e.g., `"task_a->task_b"`, `"line_001"`) |
263257
| `from_task_id` | `str` | ✅ Yes | Source/prerequisite task that must complete first |
264258
| `to_task_id` | `str` | ✅ Yes | Target/dependent task that waits for source |
265-
| `condition_description` | `str` | ❌ No | Human-readable explanation of dependency logic |
259+
| `condition_description` | `str` | ❌ No (default: `None`) | Human-readable explanation of dependency logic |
266260

267261
#### Return Value
268262

@@ -310,14 +304,13 @@ Future extensions may support:
310304
- **Unique line_id**: `dependency_id` must be unique
311305
- **No self-loops**: `from_task_id != to_task_id`
312306

313-
!!!danger "Cycle Detection"
314-
The server validates DAG acyclicity after adding each dependency:
315-
316-
```
317-
A → B → C
318-
319-
A ❌ Creates cycle!
320-
```
307+
**Cycle Detection**: The server validates DAG acyclicity after adding each dependency:
308+
309+
```
310+
A → B → C
311+
312+
A ❌ Creates cycle!
313+
```
321314

322315
---
323316

@@ -405,7 +398,7 @@ Batch-create a complete constellation from structured configuration.
405398
| Parameter | Type | Required | Description |
406399
|-----------|------|----------|-------------|
407400
| `config` | `TaskConstellationSchema` | ✅ Yes | Constellation configuration with tasks and dependencies |
408-
| `clear_existing` | `bool` | ❌ No | Clear existing constellation before building (default: `true`) |
401+
| `clear_existing` | `bool` | ❌ No (default: `True`) | Clear existing constellation before building |
409402

410403
#### Configuration Schema
411404

@@ -522,8 +515,7 @@ result = await mcp_client.call_tool(
522515
- **DAG acyclicity**: Final graph must have no cycles
523516
- **Schema compliance**: Pydantic validation ensures type correctness
524517

525-
!!!tip "Creation Mode Usage"
526-
In **creation mode**, the Constellation Agent uses `build_constellation` to generate the initial constellation in a single operation. This is more efficient than incremental add_task calls.
518+
**Creation Mode Usage**: In creation mode, the Constellation Agent uses `build_constellation` to generate the initial constellation in a single operation, which is more efficient than incremental `add_task` calls.
527519

528520
---
529521

@@ -678,43 +670,47 @@ Where:
678670

679671
## 💡 Best Practices
680672

681-
!!!tip "Tool Selection"
682-
**Creation Mode:** Use `build_constellation` for initial synthesis
683-
684-
**Editing Mode:** Use granular tools (`add_task`, `update_task`, etc.)
685-
686-
**Bulk Edits:** Accumulate changes and apply via `build_constellation` with `clear_existing=false`
673+
### Tool Selection
687674

688-
!!!warning "Modification Safety"
689-
Always check task/dependency modifiability before calling update/remove tools:
690-
691-
```python
692-
modifiable = constellation.get_modifiable_tasks()
693-
if task in modifiable:
694-
await mcp_client.call_tool("update_task", ...)
695-
```
696-
697-
!!!example "Idempotent Operations"
698-
Design agent logic to be idempotent:
699-
700-
```python
701-
# Safe to retry - will fail gracefully if task exists
702-
try:
703-
await mcp_client.call_tool("add_task", {...})
704-
except ToolError:
705-
# Task already exists, continue
706-
pass
707-
```
675+
**Creation Mode:** Use `build_constellation` for initial synthesis
676+
677+
**Editing Mode:** Use granular tools (`add_task`, `update_task`, etc.)
678+
679+
**Bulk Edits:** Accumulate changes and apply via `build_constellation` with `clear_existing=False`
680+
681+
### Modification Safety
682+
683+
Always check task/dependency modifiability before calling update/remove tools:
684+
685+
```python
686+
modifiable = constellation.get_modifiable_tasks()
687+
if task in modifiable:
688+
await mcp_client.call_tool("update_task", ...)
689+
```
690+
691+
### Idempotent Operations
692+
693+
Design agent logic to be idempotent:
694+
695+
```python
696+
# Safe to retry - will fail gracefully if task exists
697+
try:
698+
await mcp_client.call_tool("add_task", {...})
699+
except ToolError:
700+
# Task already exists, continue
701+
pass
702+
```
708703

709704
---
710705

711706
## 🔗 Related Documentation
712707

713-
- **[Overview](overview.md)** — Constellation Agent architecture
714-
- **[State Machine](state.md)** — FSM lifecycle
715-
- **[Strategy Pattern](strategy.md)** — Prompter implementation
716-
- **[ConstellationEditor](../constellation/constellation_editor.md)** — Underlying editor logic
717-
- **[Task Constellation](../constellation/overview.md)** — DAG model
708+
- [Constellation Agent Overview](overview.md) — Architecture and weaving modes
709+
- [Constellation Agent State Machine](state.md) — FSM lifecycle and transitions
710+
- [Constellation Agent Strategy Pattern](strategy.md) — Processing strategies and prompters
711+
- [Constellation Editor MCP Server](../../mcp/servers/constellation_editor.md) — Detailed MCP server reference
712+
- [Task Constellation Overview](../constellation/overview.md) — DAG model and data structures
713+
- [Processor Framework](../../infrastructure/agents/design/processor.md) — Agent processing architecture
718714

719715
---
720716

@@ -766,6 +762,4 @@ def build_constellation(
766762

767763
---
768764

769-
<div align="center">
770-
<p><em>Constellation MCP Server — Structured, idempotent task manipulation for adaptive orchestration</em></p>
771-
</div>
765+
**Constellation MCP Server — Structured, idempotent task manipulation for adaptive orchestration**

0 commit comments

Comments
 (0)