| name | scbe-mobile-connector-orchestrator |
| description | Operate the SCBE mobile-goal control plane with external service connectors (Shopify, Zapier, n8n, Slack, Notion, Airtable, GitHub Actions, Linear, Discord, generic webhook). Use when asked to register connectors, bind goals to connectors, run step execution, enforce high-risk approval gates, or troubleshoot connector dispatch failures. |
SCBE Mobile Connector Orchestrator
Use this skill to run phone-driven autonomous workflows through src/api/main.py safely.
Scope
- Register and inspect connectors.
- Create and manage mobile goals.
- Bind connectors to goals.
- Advance execution with high-risk approval gates.
- Troubleshoot connector dispatch and auth failures.
Canonical API Endpoints
GET /mobile/connectors/templates
POST /mobile/connectors
GET /mobile/connectors
GET /mobile/connectors/{connector_id}
DELETE /mobile/connectors/{connector_id}
POST /mobile/goals
GET /mobile/goals
GET /mobile/goals/{goal_id}
POST /mobile/goals/{goal_id}/bind-connector
POST /mobile/goals/{goal_id}/advance
POST /mobile/goals/{goal_id}/approve
Required Safety Rules
- Never auto-approve high-risk steps when
require_human_for_high_risk=true.
- Never execute if connector auth material is missing for protected endpoints.
- Keep Shopify operations read-safe by default (
payload_mode=shopify_graphql_read).
- Treat non-2xx connector responses as failed step dispatch.
- Preserve deterministic event history and return latest goal state.
Standard Workflow
- List templates and pick connector profile.
- Register connector with minimal valid fields.
- Create goal in
execution_mode=connector with that connector_id.
- Call
advance until:
review_required: request explicit user approval, then call approve.
completed: return final state and summary.
failed: return failure reason and dispatch details.
Shopify Path (Preferred Default)
- Register connector with:
kind=shopify
shop_domain=<store>.myshopify.com
auth_type=header
auth_header_name=X-Shopify-Access-Token
auth_token=<admin_api_token>
- Let API auto-build endpoint:
https://<store>.myshopify.com/admin/api/<version>/graphql.json
- Keep first runs read-only and inspect goal events before adding write workflows.
Quick Command Templates (PowerShell)
$api = "http://localhost:8000"
$key = "demo_key_12345"
Invoke-RestMethod -Method Get -Uri "$api/mobile/connectors/templates" -Headers @{"x-api-key"=$key}
# register connector
$conn = Invoke-RestMethod -Method Post -Uri "$api/mobile/connectors" `
-Headers @{"x-api-key"=$key} -ContentType "application/json" `
-Body (@{
name = "shopify-admin-read"
kind = "shopify"
shop_domain = "your-store.myshopify.com"
auth_type = "header"
auth_header_name = "X-Shopify-Access-Token"
auth_token = "<TOKEN>"
enabled = $true
} | ConvertTo-Json)
$connectorId = $conn.data.connector_id
# create and advance goal
$goal = Invoke-RestMethod -Method Post -Uri "$api/mobile/goals" `
-Headers @{"x-api-key"=$key} -ContentType "application/json" `
-Body (@{
goal = "Run storefront operations and publish report"
channel = "store_ops"
priority = "high"
execution_mode = "connector"
connector_id = $connectorId
targets = @("https://your-store.myshopify.com/admin")
require_human_for_high_risk = $true
} | ConvertTo-Json)
$goalId = $goal.data.goal_id
Invoke-RestMethod -Method Post -Uri "$api/mobile/goals/$goalId/advance" -Headers @{"x-api-key"=$key} -ContentType "application/json" -Body "{}"
Invoke-RestMethod -Method Get -Uri "$api/mobile/goals/$goalId" -Headers @{"x-api-key"=$key}
Troubleshooting Matrix
401 Invalid API key -> confirm x-api-key and environment.
404 connector not found -> connector owner mismatch or deleted connector.
blocked / review_required -> call approve before next advance.
connector_http_error -> inspect endpoint auth/header contract.
connector_network_error -> endpoint unreachable, TLS/DNS/firewall issue.
Output Contract
Return:
connector_id and profile summary.
goal_id, current status, and current step index.
- Actionable next command (
approve, advance, or fix auth/endpoint).
- Brief risk note if high-risk steps are pending.