{"schemaVersion":1,"id":"recommended.sm-research","version":"1.0.0","name":"Research workflow","description":"An editable production workflow using Research v2.0.2.","stages":[{"id":"main","blockId":"sm.research","version":"2.0.2","label":"Research"}],"connections":[],"packages":[{"manifest":{"schemaVersion":1,"sdkVersion":"0.1.0","id":"sm.research","version":"2.0.2","name":"Research","description":"Organize reviewed source notes and an HTTPS citation into a reusable research dossier without claiming to browse or verify the source.","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":{"input":{"type":"text","primary":true,"description":"The research question or production topic.","semantic":"research_question","required":true,"accepts":["plain_text"]},"sourceTitle":{"type":"text","default":"Supplied source","description":"The source's reviewed title.","semantic":"source_title","required":false},"sourceUrl":{"type":"text","default":"","description":"The exact HTTPS page cited by the supplied notes.","semantic":"source_url","required":false},"sourceNotes":{"type":"text","default":"","description":"Reviewed facts or excerpts supplied by the user.","semantic":"source_notes","required":false}},"outputs":{"output":{"type":"research","primary":true,"description":"A structured dossier that keeps the source separate from the supplied notes.","semantic":"research_dossier"}},"permissions":{"project":[],"network":[],"filesystem":[],"secrets":[]},"ui":[{"port":"input","control":"text"},{"port":"sourceTitle","control":"text"},{"port":"sourceUrl","control":"text"},{"port":"sourceNotes","control":"text"}]},"code":"const clean = (value, limit) => String(value || '').trim().slice(0, limit);\nconst topic = clean(input.input, 4000);\nconst title = clean(input.sourceTitle, 500) || 'Supplied source';\nconst url = clean(input.sourceUrl, 4000);\nconst notes = clean(input.sourceNotes, 20000);\nif (!topic) throw Error('Add a research question or production topic.');\nif (!notes) throw Error('Add reviewed source notes before creating the dossier.');\nif (url && !/^https:\\/\\/[^\\s/?#]+(?:[/?#][^\\s]*)?$/.test(url)) throw Error('Use the exact HTTPS source URL or leave it blank.');\nconst source = {title, url: url || null, notes, verification: 'user-supplied'};\nreturn {output: {\n  schemaVersion: 1,\n  topic,\n  summary: notes,\n  sources: [source],\n  citations: url ? [{label: title, url}] : [],\n  openQuestions: [],\n  verification: 'not-checked-by-block'\n}};\n","tests":[{"name":"Cited supplied source","input":{"input":"How did the harbor lighthouse restoration begin?","sourceTitle":"Harbor restoration project","sourceUrl":"https://example.org/restoration","sourceNotes":"Local volunteers began restoring the lighthouse after the town acquired it in 2019."},"expected":{"output":{"schemaVersion":1,"topic":"How did the harbor lighthouse restoration begin?","summary":"Local volunteers began restoring the lighthouse after the town acquired it in 2019.","sources":[{"title":"Harbor restoration project","url":"https://example.org/restoration","notes":"Local volunteers began restoring the lighthouse after the town acquired it in 2019.","verification":"user-supplied"}],"citations":[{"label":"Harbor restoration project","url":"https://example.org/restoration"}],"openQuestions":[],"verification":"not-checked-by-block"}}},{"name":"Offline notes without a URL","input":{"input":"What facts are approved for the product film?","sourceTitle":"Approved product brief","sourceUrl":"","sourceNotes":"The battery lasts up to eight hours under the supplied test conditions."},"expected":{"output":{"schemaVersion":1,"topic":"What facts are approved for the product film?","summary":"The battery lasts up to eight hours under the supplied test conditions.","sources":[{"title":"Approved product brief","url":null,"notes":"The battery lasts up to eight hours under the supplied test conditions.","verification":"user-supplied"}],"citations":[],"openQuestions":[],"verification":"not-checked-by-block"}}}],"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 clean = (value, limit) => String(value || '').trim().slice(0, limit);\nconst topic = clean(input.input, 4000);\nconst title = clean(input.sourceTitle, 500) || 'Supplied source';\nconst url = clean(input.sourceUrl, 4000);\nconst notes = clean(input.sourceNotes, 20000);\nif (!topic) throw Error('Add a research question or production topic.');\nif (!notes) throw Error('Add reviewed source notes before creating the dossier.');\nif (url && !/^https:\\/\\/[^\\s/?#]+(?:[/?#][^\\s]*)?$/.test(url)) throw Error('Use the exact HTTPS source URL or leave it blank.');\nconst source = {title, url: url || null, notes, verification: 'user-supplied'};\nreturn {output: {\n  schemaVersion: 1,\n  topic,\n  summary: notes,\n  sources: [source],\n  citations: url ? [{label: title, url}] : [],\n  openQuestions: [],\n  verification: 'not-checked-by-block'\n}};\n"},"lineage":{"parents":[],"changes":"Packaged original Block source for StillMade."}}}],"license":"MIT"}