{"schemaVersion":1,"id":"recommended.sm-stock-search","version":"1.0.0","name":"Stock media search workflow","description":"An editable production workflow using Stock media search v2.0.0.","stages":[{"id":"main","blockId":"sm.stock-search","version":"2.0.0","label":"Stock media search"}],"connections":[],"packages":[{"manifest":{"schemaVersion":1,"sdkVersion":"0.1.0","id":"sm.stock-search","version":"2.0.0","name":"Stock media search","description":"Search licensed stock and select an exact asset for the next Block.","kind":"task","runtime":"javascript","entry":"src/run.js","license":"MIT","provenance":{"notice":"Original source (authorship declared by the packager)\nLicense: MIT\nChanges: Original implementation declared by the packager; no reused repository or dependency code.\nFiles: LICENSE, src/run.js\n\nMIT License\n\nCopyright (c) 2026 StillMade contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","portableSources":[{"kind":"original","license":"MIT","paths":["LICENSE","src/run.js"],"evidence":["upstream/0/LICENSE","upstream/0/src/run.js"],"changes":"Original implementation declared by the packager; no reused repository or dependency code."}]},"inputs":{"query":{"type":"text","primary":true,"semantic":"stock_query","description":"Words describing the licensed media to find.","required":true,"sources":["user","upstream"]},"mediaType":{"type":"text","semantic":"stock_media_type","description":"Choose photos, videos, or audio.","required":false,"default":"photo","sources":["user","default"]}},"outputs":{"stockAction":{"type":"approval","role":"portable_media_action","semantic":"portable_media_action","description":"A scoped licensed-stock search for user review."},"asset":{"type":"asset","semantic":"licensed_asset","description":"One selected licensed asset with its acquisition receipt.","required":false}},"permissions":{"project":[],"network":[],"filesystem":[],"secrets":[],"actions":["stock.search"]},"ui":[{"control":"text","port":"query"},{"control":"select","port":"mediaType","options":["photo","video","audio"]}],"platforms":{"phone":{"supported":true},"browser":{"supported":true},"desktop":{"supported":true}}},"code":"const query=String(input.query||'').trim();\nif(!query||query.length>500)throw new Error('Use a stock search query of at most 500 characters.');\nconst type=String(input.mediaType||'photo');\nif(!['photo','video','audio'].includes(type))throw new Error('Choose photo, video, or audio stock.');\nreturn {stockAction:{schemaVersion:1,kind:'stillmade.media-action',operation:'stock.search',request:{query,type},resultPort:'asset'}};\n","tests":[{"name":"Prepares an approved photo stock search without acquiring an asset","input":{"query":"  ocean sunrise  ","mediaType":"photo"},"expected":{"stockAction":{"schemaVersion":1,"kind":"stillmade.media-action","operation":"stock.search","request":{"query":"ocean sunrise","type":"photo"},"resultPort":"asset"}}},{"name":"Keeps audio search as a distinct typed request","input":{"query":"gentle rain","mediaType":"audio"},"expected":{"stockAction":{"schemaVersion":1,"kind":"stillmade.media-action","operation":"stock.search","request":{"query":"gentle rain","type":"audio"},"resultPort":"asset"}}}],"portable":{"format":"stillmade-block/1","dependencies":[],"sources":[{"kind":"original","license":"MIT","paths":["LICENSE","src/run.js"],"evidence":["upstream/0/LICENSE","upstream/0/src/run.js"],"changes":"Original implementation declared by the packager; no reused repository or dependency code."}],"files":{"upstream/0/LICENSE":"MIT License\n\nCopyright (c) 2026 StillMade contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","upstream/0/src/run.js":"const query=String(input.query||'').trim();\nif(!query||query.length>500)throw new Error('Use a stock search query of at most 500 characters.');\nconst type=String(input.mediaType||'photo');\nif(!['photo','video','audio'].includes(type))throw new Error('Choose photo, video, or audio stock.');\nreturn {stockAction:{schemaVersion:1,kind:'stillmade.media-action',operation:'stock.search',request:{query,type},resultPort:'asset'}};\n"},"lineage":{"parents":[],"changes":"Packaged original Block source for StillMade."}}}],"license":"MIT"}