{
  "metadata": {
    "description": "ScopeGate Studio runtime egress firewall, Web Worker micro-sandbox, sly_data boundary filter, and cross-site capability broker (MVP Profile 0.3).",
    "author": "Luu Quoc Trung (@cocvn157)",
    "mvp_profile": "0.3",
    "date_created": "2026-11-20T00:00:00+00:00",
    "sample_queries": [
      "Evaluate an outbound peer call against ScopeGate's egress firewall and sly_data filter.",
      "Run a rogue coded-tool egress attack inside the isolated Web Worker sandbox.",
      "Simulate a composition depth and step-budget overflow tripwire.",
      "Inspect ScopeGate's live WebMCP and action-bridge capabilities."
    ]
  },
  "llm_config": {
    "model_name": "alibaba/qwen3.8-flash"
  },
  "max_steps": 12,
  "max_execution_seconds": 60,
  "allow": {
    "to_downstream": {
      "sly_data": [
        "request_id",
        "caller_origin",
        "policy_mode"
      ]
    },
    "to_upstream": {
      "sly_data": [
        "gate_verdict",
        "audit_receipt_id"
      ]
    }
  },
  "tools": [
    {
      "name": "gatekeeper_broker",
      "function": {
        "description": "Front-desk runtime gatekeeper that routes egress policy checks, sly_data boundary filtering, and execution budget enforcement before any cross-site tool call runs.",
        "parameters": {
          "type": "object",
          "properties": {
            "inquiry": {
              "type": "string",
              "description": "Runtime firewall evaluation request or peer broker query."
            }
          },
          "required": [
            "inquiry"
          ]
        }
      },
      "instructions": "You are Gatekeeper Broker, the front agent of ScopeGate Studio (Open Agentic Web MVP Profile 0.3). Route policy evaluations to egress_policy_guard, private-context leakage inspections to sly_boundary_enforcer, and execution-depth/budget checks to budget_tripwire_monitor. Always return exact verdicts (ALLOW, BLOCK, HITL_REQUIRED), blocked origins, stripped sly_data keys, and signed trace receipt IDs.",
      "tools": [
        "egress_policy_guard",
        "sly_boundary_enforcer",
        "budget_tripwire_monitor"
      ]
    },
    {
      "name": "egress_policy_guard",
      "function": {
        "description": "Evaluates target origins, HTTPS scheme, redirect destinations, allowed_peers, and deny_origins before outbound peer or MCP calls execute.",
        "parameters": {
          "type": "object",
          "properties": {
            "target_url": {
              "type": "string",
              "description": "Destination peer network or MCP URL to inspect."
            },
            "effect": {
              "type": "string",
              "description": "Operation effect classification: 'read' or 'write'."
            }
          },
          "required": [
            "target_url"
          ]
        }
      },
      "instructions": "Fail closed on unlisted origins, non-HTTPS remote URLs, or write actions missing explicit visitor confirmation. Never forward visitor BYOK authorization headers to peer origins."
    },
    {
      "name": "sly_boundary_enforcer",
      "function": {
        "description": "Filters sly_data private context fields across network boundaries using explicit allow.to_downstream.sly_data rules and detects secret/BYOK canary leakage.",
        "parameters": {
          "type": "object",
          "properties": {
            "destination_network": {
              "type": "string",
              "description": "Destination network identifier."
            },
            "candidate_keys": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Keys proposed for downstream propagation."
            }
          },
          "required": [
            "destination_network"
          ]
        }
      },
      "instructions": "Enforce deny-by-default sly_data filtering. Redact all unlisted keys and unconditionally block API keys, bearer tokens, and cookies from leaving the caller origin."
    },
    {
      "name": "budget_tripwire_monitor",
      "function": {
        "description": "Enforces composition depth limits, max_steps, remote-call quotas, and Web Worker execution timeouts.",
        "parameters": {
          "type": "object",
          "properties": {
            "current_depth": {
              "type": "integer",
              "description": "Current peer composition hop depth."
            },
            "steps_used": {
              "type": "integer",
              "description": "Number of execution steps consumed so far."
            }
          },
          "required": [
            "current_depth",
            "steps_used"
          ]
        }
      },
      "instructions": "Abort execution immediately and fail closed whenever composition depth exceeds max_depth, steps exceed max_steps, or Worker execution surpasses timeoutMs."
    }
  ]
}
