{
  "manifest": {
    "schemaVersion": 1,
    "license": "MIT",
    "provenance": {
      "notice": "MIT License\n\nCopyright (c) 2026 StillMade SDK contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and \nassociated documentation files (the \"Software\"), to deal in the Software without restriction, including \nwithout limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \ncopies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the \nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial \nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT \nLIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO \nEVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER \nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE \nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n"
    },
    "sdkVersion": "0.1.0",
    "id": "example.clean-text-interface",
    "version": "1.1.0",
    "name": "Clean text studio",
    "description": "Edit text, run the cleanup, and compare the result in a responsive self-contained workspace.",
    "kind": "task",
    "runtime": "recipe",
    "inputs": {
      "text": {
        "type": "text",
        "semantic": "plain_text",
        "required": true,
        "description": "Text whose surrounding whitespace should be removed."
      }
    },
    "outputs": {
      "text": {
        "type": "text",
        "semantic": "plain_text",
        "description": "The same text with surrounding whitespace removed."
      }
    },
    "permissions": {
      "project": [],
      "network": [],
      "filesystem": [],
      "secrets": []
    },
    "ui": [
      {
        "control": "text",
        "port": "text"
      }
    ]
  },
  "recipe": {
    "schemaVersion": 1,
    "steps": [
      {
        "id": "clean",
        "op": "text.trim",
        "args": {
          "text": {
            "$input": "text"
          }
        }
      }
    ],
    "outputs": {
      "text": {
        "$step": "clean"
      }
    }
  },
  "tests": [
    {
      "name": "Trims surrounding whitespace",
      "input": {
        "text": "  StillMade\n"
      },
      "expected": {
        "text": "StillMade"
      }
    }
  ],
  "view": {
    "html": "<main class=\"clean-studio\"><header><h1>Clean text</h1><p>Shape a draft and keep the result visible while settings move for the available space.</p></header><div class=\"clean-layout\"><section class=\"clean-settings\" aria-labelledby=\"settings-title\"><h2 id=\"settings-title\">Draft</h2><label for=\"source\">Your text</label><textarea id=\"source\" data-stillmade-input=\"text\" data-stillmade-share=\"text\"></textarea><div class=\"clean-actions\"><button id=\"run\" data-stillmade-action=\"run\">Clean text</button></div></section><section class=\"clean-result\" aria-labelledby=\"result-title\"><h2 id=\"result-title\">Result</h2><output id=\"result\" aria-live=\"polite\" data-stillmade-state=\"empty\">Your result appears here.</output></section></div></main>",
    "css": ".clean-studio{container:clean-studio/inline-size;min-width:0}.clean-studio>header p{max-width:60ch;color:var(--fg-muted)}.clean-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:16px;align-items:start}.clean-settings,.clean-result{min-width:0;padding:16px;border:1px solid var(--border-tok);border-radius:var(--r-3)}.clean-settings label{display:block;margin-bottom:8px}.clean-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.clean-actions button{min-width:44px;min-height:44px}.clean-result output{display:block;min-height:120px;white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;border:1px solid var(--border-tok);border-radius:var(--r-3)}@container clean-studio (max-width:600px){.clean-layout{grid-template-columns:minmax(0,1fr)}.clean-settings,.clean-result{padding:12px}}",
    "javascript": "const source=document.getElementById(\"source\"), button=document.getElementById(\"run\"), result=document.getElementById(\"result\"); StillMade.onInput(input=>{source.value=input.text||\"\";document.querySelector(\"main\").dataset.stillmadeState=source.value?\"populated\":\"empty\"}); button.addEventListener(\"click\",async()=>{button.disabled=true;result.dataset.stillmadeState=\"loading\";result.textContent=\"Cleaning…\";try{const output=await StillMade.run({text:source.value});result.dataset.stillmadeState=\"success\";result.textContent=output.text||\"The result is empty.\"}catch(error){result.dataset.stillmadeState=\"error\";result.textContent=error.message}finally{button.disabled=false}});"
  }
}