dgi.synapse.map_capabilities ​
Map operations to library_ids, identify missing params
Map decomposed operations to real workflow library_ids.
The third synapse (runs parallel with check_auth). Takes operations from decompose and maps each to a registered workflow type, identifying which parameters are available and which are missing.
Inputs:
- operations: list of operation dicts from dgi.synapse.decompose (required)
- parameter_flow: dict from decompose (required)
- understanding: dict from dgi.synapse.understand (required)
- workflow_catalog: list of workflow descriptors with schemas (required)
Outputs (terminal state_data):
- mappings: list of mapping dicts with library_id, param_mapping, missing_params
- unmapped_operations: list of operation IDs that couldn't be mapped
- all_missing_params: consolidated list of params the user needs to provide
- input_tokens: int
- output_tokens: int
Plugin required: context.get_plugin("ai")
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-dgi |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Explicit AI CloudConnection UUID — threaded to ai.chat.complete so synapse uses the org's resolved connection (org-context-free) |
model | string | No | — | Optional model override threaded to ai.chat.complete |
operations | json | Yes | — | Operations from decompose |
parameter_flow | json | Yes | — | Parameter flow from decompose |
understanding | json | Yes | — | Understanding from understand |
workflow_catalog | json | Yes | — | Workflow descriptors with schemas |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
all_missing_params | list | No | — | — |
input_tokens | integer | No | — | — |
mappings | list | No | — | — |
output_tokens | integer | No | — | — |
unmapped_operations | list | No | — | — |
connection_uuid | uuid | No | — | — |
model | string | No | — | — |
operations | json | No | — | — |
parameter_flow | json | No | — | — |
understanding | json | No | — | — |
workflow_catalog | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "dgi.synapse.map_capabilities",
"initial_data": {
"operations": "value",
"parameter_flow": "value",
"understanding": "value",
"workflow_catalog": "value"
}
}