stillmade-sdk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/MODULES.md CHANGED
@@ -135,9 +135,11 @@ WebAssembly codec. Images arrive as saved references: read the bytes with
135
135
  - Generating code at run time (`new Function`, used by Emscripten bindings) is
136
136
  allowed inside the sandbox.
137
137
 
138
- Module Blocks run in StillMade in the browser. Scheduled and unattended server
139
- runs need the server sandbox, which is not enabled yet; those runs report
140
- `RUNTIME_UNAVAILABLE`.
138
+ Module Blocks run in StillMade in the person's browser, only while StillMade is
139
+ open. They cannot run on a schedule, from an event or on new media: StillMade has
140
+ no server sandbox for them. A workflow's background run stops before a module Step
141
+ and the person runs it in the project. Marketplace listings show module Blocks as
142
+ **Browser only**. For work that must run unattended, use a JavaScript Block.
141
143
 
142
144
  ## Test, pack and import
143
145
 
package/SDK.md CHANGED
@@ -1888,8 +1888,8 @@ event through an input with `"semantic": "workflow_event"` and
1888
1888
  `"sources": ["project"]`.
1889
1889
 
1890
1890
  Triggers work for recipe, JavaScript and hosted (`runtime: "capability"`)
1891
- Blocks. Module Blocks run in a browser and cannot run unattended until
1892
- StillMade enables its server sandbox. Sandboxed code has 25 seconds per run.
1891
+ Blocks. Module Blocks run only in the person's browser, so they cannot declare
1892
+ triggers or run unattended. Sandboxed code has 25 seconds per run.
1893
1893
 
1894
1894
  ### Hosted Blocks run inside an approved budget
1895
1895
 
@@ -2136,9 +2136,11 @@ WebAssembly codec. Images arrive as saved references: read the bytes with
2136
2136
  - Generating code at run time (`new Function`, used by Emscripten bindings) is
2137
2137
  allowed inside the sandbox.
2138
2138
 
2139
- Module Blocks run in StillMade in the browser. Scheduled and unattended server
2140
- runs need the server sandbox, which is not enabled yet; those runs report
2141
- `RUNTIME_UNAVAILABLE`.
2139
+ Module Blocks run in StillMade in the person's browser, only while StillMade is
2140
+ open. They cannot run on a schedule, from an event or on new media: StillMade has
2141
+ no server sandbox for them. A workflow's background run stops before a module Step
2142
+ and the person runs it in the project. Marketplace listings show module Blocks as
2143
+ **Browser only**. For work that must run unattended, use a JavaScript Block.
2142
2144
 
2143
2145
  ### Test, pack and import
2144
2146
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stillmade-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "StillMade Block SDK, CLI and examples",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "type": "module",
@@ -55,7 +55,7 @@ export async function runPackageAsync(pkg, values, options = {}) {
55
55
  // A module runs only through an injected executor: StillMade's sandboxed
56
56
  // browser Worker, or the CLI's local Node worker for the creator's own tests.
57
57
  const pinned=structuredClone(pkg),input=validateValues(pinned.manifest.inputs,values);
58
- assert(typeof options.module==='function','RUNTIME_UNAVAILABLE','Module Blocks run in StillMade in the browser, or locally with the SDK CLI. Unattended server runs need the server sandbox, which is not enabled on this host.');
58
+ assert(typeof options.module==='function','RUNTIME_UNAVAILABLE','Module Blocks run in StillMade in the browser, or locally with the SDK CLI. They cannot run unattended: StillMade has no server sandbox for module Blocks.');
59
59
  const result=await executeHostCall(structuredClone(pinned),input,{signal:options.signal,execute:options.module});
60
60
  assert(!options.signal?.aborted,'CANCELLED','Run cancelled');
61
61
  assert(result&&typeof result==='object'&&Object.keys(result).every(key=>['outputs','logs'].includes(key)),'MODULE_RESULT','The module host returned an unexpected result');
@@ -6,8 +6,8 @@
6
6
 
7
7
  export const BLOCK_TRIGGER_EVENTS=Object.freeze(['media.saved','schedule','webhook','project.completed','provider']);
8
8
  export const BLOCK_TRIGGER_LIMITS=Object.freeze({triggers:4,labelLength:120,minEverySeconds:60,maxEverySeconds:31536000});
9
- // Runtimes StillMade can run without anyone present. Module Blocks join them
10
- // when the server sandbox is enabled; until then they run in a browser.
9
+ // Runtimes StillMade can run without anyone present. Module Blocks run only in
10
+ // the person's browser (StillMade has no server sandbox for them).
11
11
  export const UNATTENDED_RUNTIMES=Object.freeze(['recipe','javascript','capability']);
12
12
  const MEDIA_TYPES=['image','video','audio','asset'];
13
13
  const MEDIA_KINDS=['image','video','audio'];
@@ -27,7 +27,7 @@ export function triggerProblems(manifest){
27
27
  const triggers=manifest?.triggers,problems=[],add=(path,message)=>problems.push({path,message});
28
28
  if(triggers===undefined)return problems;
29
29
  if(!Array.isArray(triggers)||!triggers.length||triggers.length>BLOCK_TRIGGER_LIMITS.triggers){add('triggers',`Declare 1–${BLOCK_TRIGGER_LIMITS.triggers} triggers`);return problems;}
30
- if(!UNATTENDED_RUNTIMES.includes(manifest.runtime))add('triggers',manifest.runtime==='module'?'Module Blocks run in a browser; triggers need a recipe, JavaScript or hosted (capability) Block until StillMade enables its server sandbox':'Triggers need a recipe, JavaScript or hosted (capability) Block');
30
+ if(!UNATTENDED_RUNTIMES.includes(manifest.runtime))add('triggers',manifest.runtime==='module'?'Module Blocks run only in the person\'s browser, so they cannot have triggers. Use a recipe, JavaScript or hosted (capability) Block for triggers':'Triggers need a recipe, JavaScript or hosted (capability) Block');
31
31
  const seen=new Set();
32
32
  triggers.forEach((trigger,index)=>{
33
33
  const path=`triggers.${index}`;